[PATCH] D139861: [llvm] boilerplate for new callbrprepare codegen IR pass
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 10:11:38 PST 2023
jyknight added inline comments.
================
Comment at: llvm/include/llvm/InitializePasses.h:86-87
void initializeCFIInstrInserterPass(PassRegistry&);
+void initializeCFLAndersAAWrapperPassPass(PassRegistry &);
+void initializeCFLSteensAAWrapperPassPass(PassRegistry &);
+void initializeCallBrPreparePass(PassRegistry &);
----------------
Odd artifact here.
================
Comment at: llvm/lib/CodeGen/CallBrPrepare.cpp:9-17
+// This pass lowers callbrs in LLVM IR to something closer that the backend can
+// perform correct instruction selection for. In particular, callbr may have
+// inline asm with output constraints that require specific physical registers.
+// These physical register will need to be copied back to virtual registers
+// somewhere. If we have critical edges, we may need to split them. Regardless
+// of critical edges, we create distinct new SSA values for each indirect
+// destination of the callbr, then remap users of the direct destinations value
----------------
I think this description needs to be substantially edited for clarity.
A few points on substance:
- the problem is not unique to physical register outputs, so mentioning that here is just misleading.
- Worth noting that this is primarily to make things easy for SelectionDAG, and in GlobalISel we may be able to lower directly without the IR pass.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139861/new/
https://reviews.llvm.org/D139861
More information about the llvm-commits
mailing list