search for: getminusscev

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

2011 Nov 11
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...E->getPointerBase(PointerSCEV)); > >> > >> if (!PointerBase) > >> return 'Analysis failed' > >> > >> const Value *BaseValue = PointerBase->getValue(); > >> > >> You get the offset between two load addresses with SE->getMinusSCEV(). > >> The size of an element is SE->getSizeOfExpr(). > >> > > > > The AliasAnalysis class has a set of interfaces that can be used to > > preserve the analysis even when some things are changed. Does > > ScalarEvolution have a similar capability? >...
2011 Nov 11
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ase(PointerSCEV)); >>>> >>>> if (!PointerBase) return 'Analysis failed' >>>> >>>> const Value *BaseValue = PointerBase->getValue(); >>>> >>>> You get the offset between two load addresses with >>>> SE->getMinusSCEV(). The size of an element is >>>> SE->getSizeOfExpr(). >>>> >>> >>> The AliasAnalysis class has a set of interfaces that can be used >>> to preserve the analysis even when some things are changed. Does >>> ScalarEvolution have a similar...
2011 Nov 19
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...interBase(AccessFunction)); > > if (!BasePointer) > + { > INVALID(AffFunc, "No base pointer"); > + } This change is unneeded and unrelated. > > BaseValue = BasePointer->getValue(); > > @@ -245,8 +252,9 @@ > > AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer); > > - if (!isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue)) > + if (!isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue)&& !AllowNonAffine) > INVALID(AffFunc, "Bad memory address "<< *A...
2011 Nov 11
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...> dyn_cast<SCEVUnknown>(SE->getPointerBase(PointerSCEV)); >> >> if (!PointerBase) >> return 'Analysis failed' >> >> const Value *BaseValue = PointerBase->getValue(); >> >> You get the offset between two load addresses with SE->getMinusSCEV(). >> The size of an element is SE->getSizeOfExpr(). >> > > The AliasAnalysis class has a set of interfaces that can be used to > preserve the analysis even when some things are changed. Does > ScalarEvolution have a similar capability? You can state that your pass prese...
2011 Nov 11
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...CEVUnknown *PointerBase = > dyn_cast<SCEVUnknown>(SE->getPointerBase(PointerSCEV)); > > if (!PointerBase) > return 'Analysis failed' > > const Value *BaseValue = PointerBase->getValue(); > > You get the offset between two load addresses with SE->getMinusSCEV(). > The size of an element is SE->getSizeOfExpr(). > The AliasAnalysis class has a set of interfaces that can be used to preserve the analysis even when some things are changed. Does ScalarEvolution have a similar capability? Thanks again, Hal > Hope that helps > Tobi -- Hal...
2011 Nov 18
5
[LLVMdev] How to make Polly ignore some non-affine memory accesses
2011/11/15 Marcello Maggioni <hayarms at gmail.com>: > 2011/11/14 Tobias Grosser <tobias at grosser.es>: >> On 11/14/2011 02:45 PM, Marcello Maggioni wrote: >>> >>> 2011/11/14 Tobias Grosser<tobias at grosser.es>: >>>> >>>> On 11/14/2011 01:24 AM, Marcello Maggioni wrote: >>>>> >>>>> Hi Tobias.
2011 Nov 20
2
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...BasePointer) >> +  { >>      INVALID(AffFunc, "No base pointer"); >> +  } > > This change is unneeded and unrelated. > >> >>    BaseValue = BasePointer->getValue(); >> >> @@ -245,8 +252,9 @@ >> >>    AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer); >> >> -  if (!isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue)) >> +  if (!isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue)&& >>  !AllowNonAffine) >>      INVALID(AffFunc, "Bad memory ad...
2009 Jun 24
1
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...ray is safe. For example, int foo(int s) { int * p = malloc(s * sizeof int); ... int q = p[s - 2]; } then the access of p[s - 2] always stays in bound. I implemented a prototype using the Scalar Evolution pass. Here are the pseudo-code of the implementation: const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); const SCEV * bounds = SE->getSCEV(objSize); if (SE->getSMaxExpr(offset, bounds) == bounds) { ++safeGEPs; } But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, N-2). My question is, is there a plan to support something like this,...
2013 Nov 05
2
[LLVMdev] LICM and SCEV AA?
...2 November 2013 05:59, Hal Finkel <hfinkel at anl.gov> wrote: > > I would be scared to enable SCEV AA because it's not well tested > > This seems like a solvable problem. SCEV AA itself is something like 30 lines of non-boilerplate code, and essentially does one thing (calls getMinusSCEV in both directions and uses getUnsignedRange on the result). We should look it over. > > If SCEV AA itself is conservative, the worst that can happen is that it won't detect all cases it could, but we can extend it later. It seems to me that this piece of code was added as an experiment...
2013 Nov 02
2
[LLVMdev] LICM and SCEV AA?
...gt; LoopUnswitch, all of which preserve SE. > > > > Suggestions? > > I would be scared to enable SCEV AA because it's not well tested This seems like a solvable problem. SCEV AA itself is something like 30 lines of non-boilerplate code, and essentially does one thing (calls getMinusSCEV in both directions and uses getUnsignedRange on the result). We should look it over. > and > updating SCEV across transforms can be problematic. LICM would > require another run of SCEV (bad for compile time). Why? 'Running' SE does not really do anything because we compute every...
2011 Nov 15
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...;> > >>>> if (!PointerBase) return 'Analysis failed' > >>>> > >>>> const Value *BaseValue = PointerBase->getValue(); > >>>> > >>>> You get the offset between two load addresses with > >>>> SE->getMinusSCEV(). The size of an element is > >>>> SE->getSizeOfExpr(). > >>>> > >>> > >>> The AliasAnalysis class has a set of interfaces that can be used > >>> to preserve the analysis even when some things are changed. Does > >>>...
2013 Nov 05
0
[LLVMdev] LICM and SCEV AA?
...r 2013 05:59, Hal Finkel <hfinkel at anl.gov> wrote: > > I would be scared to enable SCEV AA because it's not well tested > > This seems like a solvable problem. SCEV AA itself is something like 30 > lines of non-boilerplate code, and essentially does one thing (calls > getMinusSCEV in both directions and uses getUnsignedRange on the result). > We should look it over. > If SCEV AA itself is conservative, the worst that can happen is that it won't detect all cases it could, but we can extend it later. It seems to me that this piece of code was added as an experiment...
2009 Jun 24
2
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...> int q = p[s - 2]; > > } > > > > then the access of p[s - 2] always stays in bound. > > > > I implemented a prototype using the Scalar Evolution pass. Here are the > > pseudo-code of the implementation: > > > > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); > > const SCEV * bounds = SE->getSCEV(objSize); > > > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > > ++safeGEPs; > > } > > > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, &...
2009 Jun 24
0
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...* p = malloc(s * sizeof int); > ... > int q = p[s - 2]; > } > > then the access of p[s - 2] always stays in bound. > > I implemented a prototype using the Scalar Evolution pass. Here are the > pseudo-code of the implementation: > > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); > const SCEV * bounds = SE->getSCEV(objSize); > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > ++safeGEPs; > } > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N, > N-2). Consider 8-bit integers...
2009 Jun 24
4
[LLVMdev] killing vicmp and vfcmp
Now that icmp and fcmp have supported returning vectors of i1 for a while, I think it's time to remove the vicmp and vfcmp instructions from LLVM. The good news is that we've never shipped a release that included them so we won't be providing auto-upgrade support. There is some existing backend support for vicmp and vfcmp that looks different from what icmp and fcmp do. If this
2011 Nov 10
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...rSCEV = SE->getSCEV(Pointer); const SCEVUnknown *PointerBase = dyn_cast<SCEVUnknown>(SE->getPointerBase(PointerSCEV)); if (!PointerBase) return 'Analysis failed' const Value *BaseValue = PointerBase->getValue(); You get the offset between two load addresses with SE->getMinusSCEV(). The size of an element is SE->getSizeOfExpr(). Hope that helps Tobi -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: simple_vec.ll URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111110/15790d03/attachment.ksh>
2019 Jun 11
3
[RFC][SCEV] Behavior of AddRec in CompareSCEVComplexity
...d `opt -S -disable-output -basicaa -scev-aa -aa-eval -print-no-aliases ptr_test.O1.ll` The core dump message is also in the attachments. Investigations 1. SCEV-AA try to ‘minus' the SCEV expressions of the given two pointers(lib/Analysis/ScalarEvolutionAliasAnalysis.cpp:64) 2. ScalarEvolution::getMinusSCEV will boil down into ScalarEvolution::getAddExpr. On line 2383 of lib/Analysis/ScalarEvolution.cpp, GroupByComplexity is invoked. 3. CompareSCEVComplexity is eventually called to give a partial order between two SCEV expression. 4. If there are two SCEVAddExpr that are located in different loops whi...
2012 Dec 10
3
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
...ion/2012-11-30-AddOfAnd.ll diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index 235adca..79e545d 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -654,6 +654,10 @@ namespace llvm { const SCEV *getMinusSCEV(const SCEV *LHS, const SCEV *RHS, SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap); + /// Return a SCEV that truncates 'V' to 'Ty' *and* then zero extends that + /// value back to 'V's original type. + const SCEV *getTruncateAndZeroExtend...
2012 Nov 02
0
[LLVMdev] DependenceAnalysis and PR14241
Here's the current code (abstracted a bit) const Instruction *Src, const Instruction *Dst, // make sure they are loads and stores, then const Value *SrcPtr = getPointerOperand(Src); // hides a little casting, then Src->getPointerOperand const Value *DstPtr = getPointerOperand(Dst); // ditto // see how underlying objects alias, then const GEPOperator *SrcGEP =
2009 Jun 24
0
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...} > > > > > > then the access of p[s - 2] always stays in bound. > > > > > > I implemented a prototype using the Scalar Evolution pass. Here are the > > > pseudo-code of the implementation: > > > > > > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase); > > > const SCEV * bounds = SE->getSCEV(objSize); > > > > > > if (SE->getSMaxExpr(offset, bounds) == bounds) { > > > ++safeGEPs; > > > } > > > > > > But it turns out that SCEVSMaxExpr do...