[PATCH] D71620: [Attributor] AAValueConstantRange: Value range analysis using constant range
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 26 08:50:39 PST 2019
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:4980
+ return getKnown().intersectWith(SCEVR).intersectWith(LVIR);
+ }
+
----------------
uenoku wrote:
> jdoerfert wrote:
> > Shouldn't we merge the SCEV and LVI information into the known state during intialization and then be done with it?
> I didn't merge the SCEV and LVI information into initialization because I want to utilize the position where the value is used(=`CtxI`). I mean,
> ```
> int abs(int u){
> if(u>=0){
> return u;
> }
> else
> return -u;
> }
> ```
> In this case, the argument `u` has a different known range in each uses.
> Do you have a better way to handle these kinds of flow- and context-sensitive information?
We can do both, right? I mean you already call the SCEV in some initialize I think. Let's call both in all initializations with the `getCtxI()` context. If the context changes I'm fine with calling it again though.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71620/new/
https://reviews.llvm.org/D71620
More information about the llvm-commits
mailing list