[llvm-commits] [LLVM, loop-unswitch] Potential bug in RewriteLoopBodyWithConditionConstant
Stepan Dyatkovskiy
stpworld at narod.ru
Fri Nov 25 11:15:47 PST 2011
Anton Korobeynikov wrote:
>> I think Anton commented on your first patch too, but quite differently
>> to me. Anton, are you OK with this?
> I'm still a bit worried: we're definitely changing the list of users
> on-fly. Won't this invalidate the iterators?
>
They are definitely became invalid. Just look at dumps I attached
before. I found that:
1. Next iterator (++UI) stay correct.
2. After replaceUsesOfWith was invoked, current iterator will redirected
to Replacement's use-list. But for another method we have risk to got
absolutely different behaviour.
Considering this version of patch we need to comment this place IMHO.
About WorkList. I missed it. Of course we can process this one.
More information about the llvm-commits
mailing list