Added a combiner which can clean up truncs/extends that are created in order to make the types work during legalization.
Also moved the combineMerges to the LegalizeCombiner.
Looking forward to your feedback.
Paths
| Differential D36880
[GSel]: Add a cleanup combiner to cleanup legalization artifacts ClosedPublic Authored by aditya_nandakumar on Aug 18 2017, 10:02 AM.
Details
Diff Detail
Event TimelineComment Actions Previous update didn't have the comment section change staged and was missing from the diff I uploaded.
Comment Actions Thanks Volkan for your feedback. Replied/Updated to most comments.
Comment Actions Thank you Aditya. I added a few more inline comments.
aditya_nandakumar added inline comments.
Comment Actions Added a TODO comment about considering moving the Merges combining into a combiner pass This revision is now accepted and ready to land.Aug 30 2017, 9:57 AM
Revision Contents
Diff 111694 include/llvm/CodeGen/GlobalISel/Legalizer.h
include/llvm/CodeGen/GlobalISel/LegalizerCombine.h
include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
lib/CodeGen/GlobalISel/Legalizer.cpp
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
test/CodeGen/AArch64/GlobalISel/legalize-add.mir
test/CodeGen/AArch64/GlobalISel/legalize-and.mir
test/CodeGen/AArch64/GlobalISel/legalize-cmp.mir
test/CodeGen/AArch64/GlobalISel/legalize-div.mir
test/CodeGen/AArch64/GlobalISel/legalize-gep.mir
test/CodeGen/AArch64/GlobalISel/legalize-itofp.mir
test/CodeGen/AArch64/GlobalISel/legalize-load-store.mir
test/CodeGen/AArch64/GlobalISel/legalize-mul.mir
test/CodeGen/AArch64/GlobalISel/legalize-or.mir
test/CodeGen/AArch64/GlobalISel/legalize-rem.mir
test/CodeGen/AArch64/GlobalISel/legalize-shift.mir
test/CodeGen/AArch64/GlobalISel/legalize-simple.mir
test/CodeGen/AArch64/GlobalISel/legalize-sub.mir
test/CodeGen/AArch64/GlobalISel/legalize-xor.mir
test/CodeGen/ARM/GlobalISel/arm-legalize-fp.mir
|
This doesn't match with the filename. Is it LegalizerCombiner.h or LegalizerCombine.h?