[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr

Sanjoy Das sanjoy at playingwithpointers.com
Wed Jun 10 17:14:27 PDT 2015


Hi Gerolf,

I don't have a precise algorithmic notion of "easy" and "hard" for
this.  But, in a hand-wavy sense,

"easy" is a quick check on the flags on the increment expression.  See
definition of 'Flags' in ScalarEvolution::createNodeForPHI.

"hard" is doing things like computing the backedge taken count and
using that to prove no-wrap (amongst other things).  See the
SCEVAddRecExpr case in ScalarEvolution::getSignExtendExpr.

-- Sanjoy



More information about the llvm-dev mailing list