[PATCH] D36880: [GSel]: Add a cleanup combiner to cleanup legalization artifacts

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 09:47:55 PDT 2017


aditya_nandakumar added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/Legalizer.cpp:170
+      SmallVector<MachineInstr *, 4> DeadInsts;
+      Changed |= C.tryCombineMerges(*MI, DeadInsts);
+      for (auto *DeadMI : DeadInsts)
----------------
volkan wrote:
> Do we still need this code block? I think the `tryCombineInstruction` call above already handles this case.
Yes - the tryCombine is currently only called on newly created instructions (legalization artifacts) where as we want to try to combine already existing merges.


https://reviews.llvm.org/D36880





More information about the llvm-commits mailing list