]> git.ipfire.org Git - thirdparty/gcc.git/commit
Edge redirection for exceptions.
authorPranil Dey <mkdeyp@gmail.com>
Tue, 20 Aug 2024 16:37:57 +0000 (22:07 +0530)
committerPranil Dey <mkdeyp@gmail.com>
Tue, 1 Oct 2024 04:18:03 +0000 (09:48 +0530)
commit9a70651a2126e4aceefd2ebec63c0cf15ce83695
tree47f540bd286b477ac1e2f59ab71bbeae1107a518
parent0939c8ca2fec3f4d8b6ad35da653d75412870357
Edge redirection for exceptions.

 This commit is contains change in code for the tree-eh.cc, tree-eh.h, MAINTAINERS and tree-cfg.cc files.
 Specifically it contains four functions -
1. void extract_exception_types_for_call which extracts the exception types in a call stmt and adds them into a vector tree.
2. bool stmt_throw_types does the same as stmt_could_throw the difference being that it also gives the list of exception types as given by the
 extract_exception_types_for_call function.
3. bool match_lp checks if a landing pad can handle any of the exception types given as input parameters by looking into the catch handlers.
4. update_stmt_eh_region is the function that walks up the EH tree and changes the landing pad for the last statement in a basic block in the control
 flow graph so that when the edge by make_eh_edge is created it points to the correct handlers.

Further work to be done regarding RESX stmts.
gcc/tree-cfg.cc
gcc/tree-eh.cc
gcc/tree-eh.h