search for: constantrange

Displaying 20 results from an estimated 52 matches for "constantrange".

2011 Jun 21
2
[LLVMdev] ConstantRange::sub
Hi, I have a question about ConstantRange::sub(const ConstantRange &Other) at lib/Support/ConstantRange.cpp:524. The code computes the new bounds as follows. APInt NewLower = getLower() - Other.getLower(); APInt NewUpper = getUpper() - Other.getUpper() + 1; Could someone explain this to me? I was expecting something like APInt...
2012 Apr 29
2
[LLVMdev] ConstantRange in PR1255
Hmmm... why? Duncan Sands wrote: > Hi Stepan, > >> Well... each case is represented as pair<BB, vector<Range> >. Right? > > after thinking about this some more I think you are right to not use > ConstantRange, and instead to build your own set abstraction. > > Ciao, Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
2012 Apr 29
0
[LLVMdev] ConstantRange in PR1255
...f intervals, the set abstraction should efficiently represent unions of intervals, but that's more of an optimization than anything else. Probably for the needs of switch lowering you will need to expose the underlying intervals, but the basic abstraction is a set. You could build it on top of ConstantRange if you like, but as most of ConstantRange is not very relevant, you could also quite reasonably build it some other way. In fact I was assuming that that's what you had in mind... Ciao, Duncan. > Duncan Sands wrote: >> Hi Stepan, >> >>> Well... each case is represente...
2012 Apr 26
3
[LLVMdev] ConstantRange in PR1255
...;Duncan Sands" <baldrick at free.fr>: > Hi Stepan, > >>  unionWith result is differs from set union, since it produces single set always >>  while set operations may produce two sets. > > this is true, but that's inevitable if the result is to be a single > ConstantRange.  You can of course define methods that returns a pair > of ConstantRanges and does what you want.  But why do you need these > methods anyway?  A "switch" is just going to be a (probably ordered) > list of disjoint ranges.  Where do set operations come in? > > Ciao, Duncan...
2012 Apr 26
2
[LLVMdev] ConstantRange in PR1255
...indication that sets are not intersected. Implementation of set union is simple though. The "symmetric difference" implementation is little bit more complex. For two sets [1,15) and [7,12) symmetric difference is pair of ranges: [1,7) and [12,15) I propose to implement these methods in ConstantRange (I can do it). -Stepan.
2011 Jun 22
2
[LLVMdev] ConstantRange::sub
...er - (Upper-1) NewUpper = (Upper-1) - Lower + 1 They look equivalent to me. Did I miss anything? Thanks. - xi On Jun 22, 2011, at 2:39 PM, Nick Lewycky wrote: > Thanks, I think you've found a serious bug! > > Would you be willing to fix it? Please add a test to unittests/Support/ConstantRangeTest.cpp and then mail llvm-commits with the patch to fix it and add the test. > > On 20 June 2011 23:09, Xi Wang <xi.wang at gmail.com> wrote: > Hi, > > I have a question about ConstantRange::sub(const ConstantRange &Other) at lib/Support/ConstantRange.cpp:524. The code...
2011 Jun 22
0
[LLVMdev] ConstantRange::sub
Thanks, I think you've found a serious bug! Would you be willing to fix it? Please add a test to unittests/Support/ConstantRangeTest.cpp and then mail llvm-commits with the patch to fix it and add the test. On 20 June 2011 23:09, Xi Wang <xi.wang at gmail.com> wrote: > Hi, > > I have a question about ConstantRange::sub(const ConstantRange &Other) at > lib/Support/ConstantRange.cpp:524. The code compu...
2012 Apr 26
0
[LLVMdev] ConstantRange in PR1255
Hi Stepan, > unionWith result is differs from set union, since it produces single set always > while set operations may produce two sets. this is true, but that's inevitable if the result is to be a single ConstantRange. You can of course define methods that returns a pair of ConstantRanges and does what you want. But why do you need these methods anyway? A "switch" is just going to be a (probably ordered) list of disjoint ranges. Where do set operations come in? Ciao, Duncan. > > E.g.: >...
2011 Jun 22
0
[LLVMdev] ConstantRange::sub
...It sounds to me like you've got this one handled. :-) Nick > > - xi > > On Jun 22, 2011, at 2:39 PM, Nick Lewycky wrote: > > > Thanks, I think you've found a serious bug! > > > > Would you be willing to fix it? Please add a test to > unittests/Support/ConstantRangeTest.cpp and then mail llvm-commits with the > patch to fix it and add the test. > > > > On 20 June 2011 23:09, Xi Wang <xi.wang at gmail.com> wrote: > > Hi, > > > > I have a question about ConstantRange::sub(const ConstantRange &Other) at > lib/Support/...
2012 Apr 25
2
[LLVMdev] ConstantRange in PR1255
Hi Duncan. I have strange problems with you mailbox, my posts are lost sometimes on this way. I just want to duplicate answer on your question in this thread: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138785.html ConstantRange has a little bit another purposes. It is not a classical range. Yes it has Lower and Upper, but "sub" and "add" operations are differs from "difference" and "union" set operations. But it is still possible to replace Range class with the ConstantRange, though...
2019 Dec 01
4
ConstantRange modelling precision?
Hello. This question has come up in https://reviews.llvm.org/D70043 There, i'm teaching ConstantRange how no-wrap flags affect the range of `mul` instruction, with end goal of exploiting this in LVI/CVP. There are certain combinations of ranges and no-wrap flags that result in always-overflowing `mul`. For example, `mul nuw nsw i4 [2,0), [4,0)` always overflows: https://rise4fun.com/Alive/1aK so f...
2012 Apr 25
0
[LLVMdev] ConstantRange in PR1255
...I have strange problems with you mailbox, my posts are lost sometimes on this way. OK, sorry about that. Do you have any details? > I just want to duplicate answer on your question in this thread: > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138785.html > > ConstantRange has a little bit another purposes. It is not a classical range. How do you mean? It looks like a classical range to me! Yes it has Lower and Upper, but "sub" and "add" operations are differs from "difference" and "union" set operations. It has intersec...
2012 Apr 29
0
[LLVMdev] ConstantRange in PR1255
Hi Stepan, > Well... each case is represented as pair<BB, vector<Range> >. Right? after thinking about this some more I think you are right to not use ConstantRange, and instead to build your own set abstraction. Ciao, Duncan.
2009 Jul 10
2
[LLVMdev] review request for patch
I've addressed a "TODO" in ConstantRange and several in its unit test by implementing a stricter "multiply" method (it had been returning a "full" set for anything that wasn't "empty", which broader than necessary) and updated the unit test to match, but I'm not completely confident that I understand...
2017 Jul 24
2
LazyValueInfo vs ScalarEvolution
...ly easy to try, if you want to propose a patch and run > some experiments. The question is whether the benefit in terms of improved > optimization power is worth the compile-time cost. Ok Also, the last time I looked, there seemed to be a fair amount of room for > improvement in LVI and ConstantRange. Could you point some out? Thanks Hongbin > > > John > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > -------------- next part -------------...
2009 Jul 11
0
[LLVMdev] review request for patch
On Jul 10, 2009, at 2:03 PM, Ryan Flynn <parseerror at gmail.com> wrote: > I've addressed a "TODO" in ConstantRange and several in its unit test > by implementing a stricter "multiply" method (it had been returning a > "full" set for anything that wasn't "empty", which broader than > necessary) > and updated the unit test to match, but I'm not completely confiden...
2017 Jul 24
2
LazyValueInfo vs ScalarEvolution
...; preds = %bb85, %bb73 %tmp86 = phi i32 [ 1, %bb73 ], [ %tmp95, %bb85 ] %tmp95 = add nsw i32 %tmp86, 1 %tmp96 = icmp slt i32 %tmp95, 20 br i1 %tmp96, label %bb85, label %bb97 LazyValueInfo give: POP %tmp86 = phi i32 [ 1, %bb73 ], [ %tmp95, %bb85 ] in bb85 = constantrange<-2147483648, 20> While ScalarEvolution give: %tmp86 = phi i32 [ 1, %bb73 ], [ %tmp95, %bb85 ] --> {1,+,1}<nuw><nsw><%bb85> U: [1,20) S: [1,20) Exits: 19 LoopDispositions: { %bb85: Computable, %bb73: Variant, %bb46: Variant } In this example,...
2009 Jul 11
2
[LLVMdev] review request for patch
On Fri, Jul 10, 2009 at 8:35 PM, Dan Gohman<gohman at apple.com> wrote: > > > On Jul 10, 2009, at 2:03 PM, Ryan Flynn <parseerror at gmail.com> wrote: > >> I've addressed a "TODO" in ConstantRange and several in its unit test >> by implementing a stricter "multiply" method (it had been returning a >> "full" set for anything that wasn't "empty", which broader than >> necessary) >> and updated the unit test to match, but I'm not com...
2013 Sep 24
2
[LLVMdev] range-analysis in Function Pass on Eclipse with CMake
...pass, almost verbatim from https://code.google.com/p/range-analysis/wiki/HowToUseRangeAnalysisInAnotherPass. Everything compiles fine, but loading the pass in LLVM gives me the following error: > /opt/llvm/bin/opt: symbol lookup error: ./build/lib/RangeAnalysis.so: undefined symbol: _ZN4llvm13ConstantRangeC1ENS_5APIntES1_ > error: unable to interface with target machine I use LLVM 3.4svn on Ubuntu x64. Do I miss a specific library? Regards
2013 Sep 24
0
[LLVMdev] range-analysis in Function Pass on Eclipse with CMake
dw <dw.dev.mailing at gmail.com> writes: [snip] > Everything compiles fine, but loading the pass in LLVM gives me the > following error: > >> /opt/llvm/bin/opt: symbol lookup error: ./build/lib/RangeAnalysis.so: undefined symbol: _ZN4llvm13ConstantRangeC1ENS_5APIntES1_ >> error: unable to interface with target machine > > I use LLVM 3.4svn on Ubuntu x64. > > Do I miss a specific library? $ c++filt _ZN4llvm13ConstantRangeC1ENS_5APIntES1_ llvm::ConstantRange::ConstantRange(llvm::APInt, llvm::APInt) IIRC ConstantRange is defined i...