[LLVMdev] [llvm] r184698 - Add a flag to defer vectorization into a phase after the inliner and its

Andrew Trick atrick at apple.com
Mon Jun 24 18:21:16 PDT 2013


On Jun 24, 2013, at 4:24 PM, Hal Finkel <hfinkel at anl.gov> wrote:

>> Indvars should ideally preserve NSW flags whenever possible. However,
>> we don't want to rely on SCEV to preserve them. SCEV expressions are
>> implicitly reassociated and uniqued in a flow-insensitive universe
>> independent of the def-use chain of values. SCEV simply can't
>> represent the flags in most cases. I think the only flag that makes
>> sense in SCEV is the no-wrap flag on a recurrence (that's
>> independent of signed/unsigned overflow).
> 
> Why can't SCEV keep a flow sensitive (effectively per-BB) map of expressions and their original flags (and perhaps cached deduced flags)? It seems like this problem is solvable within SCEV.
> 
> -Hal


I think you would have to track all the uses of each expression...

You can turn SCEV into an IR and inherit all the representational problems inherent in llvm IR. Or you can use it as an analysis that efficiently reprents only the mathematical properties of an expression and is simple to work with. I think it's fantastic as an analysis but really stinks at being an IR.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130624/46290639/attachment.html>


More information about the llvm-dev mailing list