[PATCH] D39267: [GISel]: Change Legalization from top down to bottom up + DCE
Volkan Keles via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 13:15:01 PST 2017
volkan accepted this revision.
volkan added a comment.
This revision is now accepted and ready to land.
Hi Aditya,
LGTM, nitpicks below.
Thank you,
Volkan
================
Comment at: include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h:115
+ SmallVectorImpl<MachineInstr *> &DeadInsts) {
+ switch (MI.getOpcode()) {
+ case TargetOpcode::G_ANYEXT:
----------------
This can be simplified as below.
```
unsigned Opcode = MI.getOpcode();
if(Opcode != TargetOpcode::G_ANYEXT && ...)
return false;
```
================
Comment at: lib/CodeGen/GlobalISel/Legalizer.cpp:119
+ const LegalizerInfo &LInfo(Helper.getLegalizerInfo());
+ LegalizerCombiner ArtifactCombiner(Helper.MIRBuilder, MF.getRegInfo(), LInfo);
+ auto RemoveDeadInstFromLists = [&InstList,
----------------
Maybe we can rename LegalizerCombiner as ArtifactCombiner?
https://reviews.llvm.org/D39267
More information about the llvm-commits
mailing list