In order for GlobalISel to re-use the significant amount of analysis and optimization code in SDAG's switch lowering, we first have to extract it and create an interface to be used by both frameworks.
No test changes as it's NFC.
Paths
| Differential D62745
Factor out SelectionDAG's switch analysis and lowering into a separate component ClosedPublic Authored by aemerson on May 31 2019, 12:01 PM.
Details Summary In order for GlobalISel to re-use the significant amount of analysis and optimization code in SDAG's switch lowering, we first have to extract it and create an interface to be used by both frameworks. No test changes as it's NFC.
Diff Detail
Event TimelineComment Actions Hi Amara, LGTM. The only comment I have is regarding the new namespace switchop: should we have one, should we have something camel case? Cheers, This revision is now accepted and ready to land.Jun 5 2019, 1:26 PM Comment Actions
Thanks. I had to introduce one to avoid a naming collision with another definition of JumpTable somewhere else in llvm, and I think in general these utilities are so closely related that a namespace is probably useful. I'm open to renaming it though. what about something like SwitchCG? Closed by commit rL362857: Factor out SelectionDAG's switch analysis and lowering into a separate… (authored by aemerson). · Explain WhyJun 7 2019, 5:06 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 202465 llvm/include/llvm/CodeGen/SwitchLoweringUtils.h
llvm/lib/CodeGen/CMakeLists.txt
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/lib/CodeGen/SwitchLoweringUtils.cpp
|
Missing C++ mode comment