search for: getupp

Displaying 8 results from an estimated 8 matches for "getupp".

Did you mean: getapp
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 wrote: > Thanks, I think you've fou...
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 NewLower = getLower() - Other.getUpper() + 1; APInt NewUpper = getUpper() - Other.getLower(); Thanks. - xi
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) - Lower + 1 > > They look equivalent to me. Did I miss anything? Thanks. > ... they are. Sorry, I was just surprised to see...
2011 Jun 22
0
[LLVMdev] ConstantRange::sub
...wang at gmail.com> wrote: > 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 NewLower = getLower() - Other.getUpper() + 1; > APInt NewUpper = getUpper() - Other.getLower(); > These aren't quite right, I think it should be: NewLower = Lower -...
2017 Aug 07
2
vrp
...lue>(&I)) > if (v->getType()->isIntegerTy()) { > ConstantRange r = LV.getConstantRange(v, &BB, &I); > I.dump(); > printf("LOWER VALUE : %llu\n",r.getLower().getRawData()); > printf("UPPER VALUE : %llu\n",r.getUpper().getRawData()); > } > } About your other question, "the value range pass was not able to determine any size, even of the induction variable, is it a correct behavior?". Yes, returning a conservative answer is always correct, but not optimal. As reference, a more sop...
2017 Aug 07
2
vrp
...t;getType()->isIntegerTy()) { >> > ConstantRange r = LV.getConstantRange(v, &BB, &I); >> > I.dump(); >> > printf("LOWER VALUE : %llu\n",r.getLower().getRawData()); >> > printf("UPPER VALUE : %llu\n",r.getUpper().getRawData()); >> > } >> > } >> >> About your other question, "the value range pass was not able to >> determine any size, even of the induction variable, is it a correct >> behavior?". Yes, returning a conservative answer is alway...
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()
2013 Jul 11
1
[LLVMdev] Scalar Evolution and Loop Trip Count.
...is negative then the lower of the range is the last possible loop // value. Also note that we already checked for a full range. APInt One(BitWidth,1); APInt A = cast<SCEVConstant>(getOperand(1))->getValue()->getValue(); APInt End = A.sge(One) ? (Range.getUpper() - One) : Range.getLower(); // The exit value should be (End+A)/A. APInt ExitVal = (End + A).udiv(A); ConstantInt *ExitValue = ConstantInt::get(SE.getContext(), ExitVal); In gdb, $6 = {BitWidth = 8, {VAL = 254, pVal = 0xfe}} (gdb) p ExitVal.isNegative() $7 = true (gdb) p E...