[PATCH] D40113: AMDGPU: Fix crash when scheduling DBG_VALUE

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 15:49:59 PST 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/GCNSchedStrategy.cpp:333
   Unsched.reserve(NumRegionInstrs);
-  for (auto &I : *this)
-    Unsched.push_back(&I);
+  for (auto &I : *this) {
+    if (!I.isDebugValue())
----------------
rampitec wrote:
> I am afraid this will push RegionBegin iterator. Maybe you need to skip a debug value in the loop at line 389 instead.
That's what I did originally, but then it seems to just be adding unneeded instructions to the vector.  The loop over this uses MI->getIterator(), so I don't think there's a difference


https://reviews.llvm.org/D40113





More information about the llvm-commits mailing list