[PATCH] D40113: AMDGPU: Fix crash when scheduling DBG_VALUE
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 15:54:39 PST 2017
rampitec 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())
----------------
arsenm wrote:
> 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
Check statement "RegionBegin = Unsched.front()->getIterator();" below at line 415.
https://reviews.llvm.org/D40113
More information about the llvm-commits
mailing list