paperchalice
e390c229a4
[Pass] Add hyphen to some pass names ( #74287 )
...
Here is the list of the renamed passes:
- `callbrprepare` -> `callbr-prepare`
- `dwarfehprepare` -> `dwarf-eh-prepare`
- `flattencfg` -> `flatten-cfg`
- `loweratomic` -> `lower-atomic`
- `lowerinvoke` -> `lower-invoke`
- `lowerswitch` -> `lower-switch`
- `winehprepare` -> `win-eh-prepare`
- `targetir` -> `target-ir`
- `targetlibinfo` -> `target-lib-info`
Legacy passes are not affected.
2024-01-25 16:05:54 +08:00
paperchalice
1debbae96b
[CodeGen] Port CallBrPrepare to new pass manager ( #73630 )
...
IIUC in the new pass manager infrastructure, the analysis result is
always computed lazily. So just use `getResult` here.
2023-11-29 10:33:14 +09:00
Kazu Hirata
93de5f13b9
[CodeGen] Fix warnings
...
This patch fixes:
llvm/lib/CodeGen/CallBrPrepare.cpp:154:14: error: unused variable
'IsDominated' [-Werror,-Wunused-variable]
llvm/lib/CodeGen/CallBrPrepare.cpp:150:13: error: unused function
'PrintDebugDomInfo' [-Werror,-Wunused-function]
2023-02-16 20:08:35 -08:00
Nick Desaulniers
28d45c843c
[llvm][CallBrPrepare] use SSAUpdater to use intrinsic value
...
Now that we've inserted a call to an intrinsic, we need to update
certain previous uses of CallBrInst values to use the value of this
intrinsic instead.
There are 3 cases to handle:
1. The @llvm.callbr.landingpad.<type>() intrinsic call is in the same
BasicBlock as the use of the callbr we're replacing.
2. The use is dominated by the direct destination.
3. The use is not dominated by the direct destination, and may or may
not be dominated by the indirect destination.
Part 2c of
https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8 .
Reviewed By: efriedma, void, jyknight
Differential Revision: https://reviews.llvm.org/D139970
2023-02-16 17:58:34 -08:00
Nick Desaulniers
094190c2f5
[llvm][CallBrPrepare] add llvm.callbr.landingpad intrinsic
...
Insert a new intrinsic call after splitting critical edges, and verify
it. Later commits will update the SSA values to use this new value along
indirect branches rather than the callbr's value, and have SelectionDAG
consume this new value.
Part 2b of
https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8 .
Reviewed By: efriedma, jyknight
Differential Revision: https://reviews.llvm.org/D139883
2023-02-16 17:58:33 -08:00
Nick Desaulniers
0a39af0eb7
[llvm][CallBrPrepare] split critical edges
...
If we have a CallBrInst with output that's used, we need to split
critical edges so that we have some place to insert COPYs for physregs
to virtregs.
Part 2a of
https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8 .
Test cases and logic re-purposed from D138078.
Reviewed By: efriedma, void, jyknight
Differential Revision: https://reviews.llvm.org/D139872
2023-02-16 17:58:33 -08:00
Nick Desaulniers
fb471158aa
[llvm] boilerplate for new callbrprepare codegen IR pass
...
Because this pass is to be a codegen pass, it must use the legacy pass
manager.
Link: https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8
Reviewed By: aeubanks, void
Differential Revision: https://reviews.llvm.org/D139861
2023-02-16 17:58:33 -08:00