[PATCH] D11212: [SCEV] Apply NSW and NUW flags via poison value analysis

Sanjoy Das sanjoy at playingwithpointers.com
Wed Jul 15 19:35:36 PDT 2015


sanjoy added a comment.

In http://reviews.llvm.org/D11212#206138, @hfinkel wrote:

> In http://reviews.llvm.org/D11212#206104, @broune wrote:
>
> > Added and used isGuaranteedToTransferExecutionToSuccessor (is there a better name?). Also slight improvement to comments.
> >
> > I checked all the instructions in the langref to see if any others might also not terminate. All I found is that while the langref doesn't explicitly say so, some atomics like atomicrmw do not necessarily terminate if another thread keeps interfering. Looking at the C++14 standard, some thread is guaranteed to make progress but I could not find a statement that any given thread is guaranteed to make progress, so I made isGuaranteedToTransferExecutionToSuccessor conservative on that point.
>
>
> And, thus, when we can assume C++ semantics, any thread is guaranteed to make progress, or call some external function, or access a volatile/atomic variable.


I don't think this is relevant here -- even assuming C++ semantics `CallInst` is not guaranteed to always return -- the called function could be stalled doing an infinite number of volatile accesses for instance.


http://reviews.llvm.org/D11212







More information about the llvm-commits mailing list