[PATCH] D41187: Ignore metainstructions during the shrink wrap analysis

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 03:35:12 PST 2018


thegameg added inline comments.


================
Comment at: llvm/trunk/lib/CodeGen/ShrinkWrap.cpp:244
+  // Ignore DBG_VALUE and other meta instructions that must not affect codegen.
+  if (MI.isMetaInstruction())
+    return false;
----------------
MatzeB wrote:
> thegameg wrote:
> > Do we also want to ignore
> > ```
> > %csr = IMPLICIT_DEF
> > ```
> > ?
> > 
> > I remember @MatzeB suggested this approach to me to write cleaner tests.
> Should probably do `MO.isDef() || MO.readsReg()` below instead of this check.
That would do it for register operands, but seems that `DBG_VALUE` instructions also have `FrameIndex` operands. Is `MI.isDebugValue()` not enough here?


Repository:
  rL LLVM

https://reviews.llvm.org/D41187





More information about the llvm-commits mailing list