[PATCH] D38359: [X86] Ignore DBG instructions in X86CmovConversion optimization to resolve PR34565

Amjad Aboud via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 01:41:25 PDT 2017


aaboud added a comment.

> Do we have kill flags set? If so, we could move a use of a virtual register across its kill... But maybe there is some reason to assure that this is not the case.

I would like to think that at this point of the optimizations, we do not preserve liveness of virtual registers. But I might be wrong!

> Looping in Reid as he has been looking at DBG_VALUE a lot more closely than I have recently and may be able to quickly reassure both of us that this is safe. =]

Sure, let is wait for Reid's answer.



================
Comment at: lib/Target/X86/X86CmovConversion.cpp:580-584
+  SmallVector<MachineInstr *, 2> DBGInstructions;
+  for (auto I = First->getIterator(), E = Last->getIterator(); I != E; I++) {
+    if (I->isDebugValue())
+      DBGInstructions.push_back(&*I);
+  }
----------------
chandlerc wrote:
> Any particular reason you moved to a vector rather than doing the increment first, and then splicing?
No, thought it might be more clear and much more safer.
If you prefer the other way, I can change it back.


https://reviews.llvm.org/D38359





More information about the llvm-commits mailing list