Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] ConstantRange::sub"
2011 Jun 22
2
[LLVMdev] ConstantRange::sub
Sure. I will submit a patch.
BTW, what's the difference between the bounds I was expecting
APInt NewLower = getLower() - Other.getUpper() + 1;
APInt NewUpper = getUpper() - Other.getLower();
and the two you mentioned
NewLower = Lower - (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
2011 Jun 22
0
[LLVMdev] ConstantRange::sub
On 22 June 2011 12:51, Xi Wang <xi.wang at gmail.com> wrote:
> Sure. I will submit a patch.
>
> BTW, what's the difference between the bounds I was expecting
>
> APInt NewLower = getLower() - Other.getUpper() + 1;
> APInt NewUpper = getUpper() - Other.getLower();
>
> and the two you mentioned
>
> NewLower = Lower - (Upper-1)
> NewUpper = (Upper-1) -
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
>
2017 Aug 07
2
vrp
On Mon, Aug 7, 2017 at 2:14 AM, Anastasiya Ruzhanskaya via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I am trying to print it like this (maybe here is smth wrong?)
>
>
> LazyValueInfo &LV = getAnalysis<LazyValueInfoWrapperPass>().getLVI();
> DominatorTree &DT =
> getAnalysis<DominatorTreeWrapperPass>().getDomTree();
> LV.printLVI(F,
2017 Aug 07
2
vrp
I am primarily interested in phi nodes and their induction variables, in
ValueTracking file there is an analysis of them, but if the upper bound is
inf, it is not working?
2017-08-07 11:41 GMT+02:00 Anastasiya Ruzhanskaya <
anastasiya.ruzhanskaya at frtk.ru>:
> So, it is not supported to determine by this instruction : %cmp = icmp slt
> i32 %i.03, 99,
> that %i.03 = phi i32 [ 0,
2017 Aug 07
2
vrp
Hello,
I am trying to figure out, what vrp propagation does in llvm. I tried this
program:
#include <stdio.h>
int main() {
int s = 0;
int j = 0;
for (int i = 0; i < 100; i++) {
j = j+i+1;
s+=j;
}
return (s+j);
}
And got this under optimized version ( I don't want everything to be
eliminated)
define i32 @main()
2009 Jul 11
0
[LLVMdev] review request for patch
Hi Ryan,
In this case there already is an implementation for this, it's just hard
to find being in the internals of the LoopVR pass. I'm planning to pull
the multiply and udiv support out of there.
Your patch looks good but beyond what Dan mentioned you have a bug
calculating NewUpper: the constant ranges are half-open intervals where
"[5, 10)" includes the value 9 but not
2013 Jul 11
1
[LLVMdev] Scalar Evolution and Loop Trip Count.
Hi,
Scalar evolution seems to be wrapping around the trip count in the
following loop.
void add (int *restrict a, int *restrict b, int *restrict c) {
char i;
for (i = 0; i < 255; i++)
a[i] = b[i] + c[i];
}
When I run scalar evolution on the bit code, I get a backedge-taken
count which is obviously wrong.
$> cat loop.ll
; Function Attrs: nounwind
define void @add(i32* noalias
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
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
2012 Apr 26
2
[LLVMdev] ConstantRange in PR1255
Hi, Duncan.
unionWith result is differs from set union, since it produces single set
always while set operations may produce two sets.
E.g.:
For ranges
[1, 5) and [10,15)
unionWith produces [1,15), while set union should just keep these sets
without changing, probably with indication that sets are not
intersected. Implementation of set union is simple though.
The "symmetric
2012 Apr 29
0
[LLVMdev] ConstantRange in PR1255
Hi Stepan,
> Hmmm... why?
because you basically want pairs (set, destination) where set could be a
arbitrary set of integers. As in practice these sets are a union of a
small number of 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
2012 Apr 26
3
[LLVMdev] ConstantRange in PR1255
Well... each case is represented as pair<BB, vector<Range> >. Right?
We need "union" for optimal case building. And we need support "difference" if we decided that some ranges or numbers in case will never used (in some optimization passes it happens sometimes).
-Stepan
26.04.2012, 15:18, "Duncan Sands" <baldrick at free.fr>:
> Hi Stepan,
>
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
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
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:
2012 Apr 25
0
[LLVMdev] ConstantRange in PR1255
Hi Stepan,
> Hi Duncan. 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
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.
2001 Aug 30
1
imagenrgb: Function to display RGB images in R
I've writen this function (imagenrgb)
to display a (m,n,3) array
as a RGB image with ngris^3 colors and,optionally,
stretching. If option ver=F, it does not
display but saves a pseudocolor version of the image
as a list (so that subsequent displays are faster).
I'd appreciate feedback and improvements
and hope that it's useful for others.
Example of use:
> dim(imatest)
[1] 100
2017 Jul 24
2
LazyValueInfo vs ScalarEvolution
On Mon, Jul 24, 2017 at 2:29 PM, John Regehr via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On 7/24/17 3:16 PM, Hongbin Zheng via llvm-dev wrote:
>
>> Thanks, maybe we could use ScalarEvolution in LazyValueInfo if it is
>> available?
>>
>
> This should be fairly easy to try, if you want to propose a patch and run
> some experiments. The question is