summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CallBrPrepare.cpp
AgeCommit message (Collapse)Author
2024-01-25[Pass] Add hyphen to some pass names (#74287)paperchalice
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.
2023-11-29[CodeGen] Port CallBrPrepare to new pass manager (#73630)paperchalice
IIUC in the new pass manager infrastructure, the analysis result is always computed lazily. So just use `getResult` here.
2023-02-16[CodeGen] Fix warningsKazu Hirata
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[llvm][CallBrPrepare] use SSAUpdater to use intrinsic valueNick Desaulniers
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[llvm][CallBrPrepare] add llvm.callbr.landingpad intrinsicNick Desaulniers
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[llvm][CallBrPrepare] split critical edgesNick Desaulniers
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[llvm] boilerplate for new callbrprepare codegen IR passNick Desaulniers
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