search for: getpointerbase

Displaying 19 results from an estimated 19 matches for "getpointerbase".

2011 Nov 11
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...; To analyze a load, you would do: > >> > >> LoadInst *Load = ... > >> Value *Pointer = Load->getPointer(); > >> const SCEV *PointerSCEV = 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(). >...
2011 Nov 11
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...; To analyze a load, you would do: >>>> >>>> LoadInst *Load = ... Value *Pointer = Load->getPointer(); const >>>> SCEV *PointerSCEV = 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->get...
2012 Nov 02
2
[LLVMdev] DependenceAnalysis and PR14241
...hould just be a single base pointer %s in the >> resulting >> SCEVS. You can then extract this base pointer, subtract it from the >> scev >> and analyze the remaining scev as subscript. The base pointer in this >> test case is loop invariant. > > Does const SCEV *getPointerBase(const SCEV *V) do this? It give you the base pointer. Yes. Tobi
2012 Nov 02
0
[LLVMdev] DependenceAnalysis and PR14241
...the >>> resulting >>> SCEVS. You can then extract this base pointer, subtract it from the >>> scev >>> and analyze the remaining scev as subscript. The base pointer in this >>> test case is loop invariant. >>> >> >> Does const SCEV *getPointerBase(const SCEV *V) do this? >> > > It give you the base pointer. Yes. > > Tobi > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121102/4c397b71/attachment.html>
2011 Nov 11
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...larEvolution. >> >> To analyze a load, you would do: >> >> LoadInst *Load = ... >> Value *Pointer = Load->getPointer(); >> const SCEV *PointerSCEV = 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-&...
2011 Nov 11
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...t create > any vector instructions. I also played a little with the vectorizer > options, but was not able to get this example vectorized. Is this > because the chain is too short? > > >>> One problem with the current implementation is that it relies on > >>> GetPointerBaseWithConstantOffset to determine if two loads or stores > >>> share the same base address. This fails with partially-unrolled loops > >>> because it cannot "undo" all of the additions to the offset induction > >>> variable in order to understand that some...
2011 Nov 19
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...affine access functions for arrays"), > + cl::Hidden, cl::init(false)); > + > //===----------------------------------------------------------------------===// > // Statistics. > > @@ -236,7 +241,9 @@ > BasePointer = dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction)); > > if (!BasePointer) > + { > INVALID(AffFunc, "No base pointer"); > + } This change is unneeded and unrelated. > > BaseValue = BasePointer->getValue(); > > @@ -245,8 +252,9 @@ > > AccessFunction = SE->getMinusS...
2011 Nov 14
1
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...terOperand(). > bool ScopDetection::isValidMemoryAccess(Instruction&Inst, > DetectionContext&Context) const { > Value *Ptr = getPointerOperand(Inst); > @@ -236,8 +254,12 @@ > BasePointer = dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction)); > > if (!BasePointer) > - INVALID(AffFunc, "No base pointer"); > - > + { > +// INVALID(AffFunc, "No base pointer"); > + BaseValue = (Value*) GetBaseValue(AccessFunction); > + } > + else > + { > BaseValue = B...
2012 Nov 02
0
[LLVMdev] DependenceAnalysis and PR14241
...stores > to SCEV, there should just be a single base pointer %s in the > resulting > SCEVS. You can then extract this base pointer, subtract it from the > scev > and analyze the remaining scev as subscript. The base pointer in this > test case is loop invariant. Does const SCEV *getPointerBase(const SCEV *V) do this? -Hal > > Cheers > Tobi > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > -- Hal Finkel Postdoctoral Ap...
2012 Nov 02
2
[LLVMdev] DependenceAnalysis and PR14241
On 11/02/2012 10:21 AM, Preston Briggs wrote: > > My initial guess is that a conservative fix is quick and small (make > sure the underlying pointers are loop invariant, otherwise give up). A > better approach would be to somehow turn code like the example into > array references that can be analyzed. I'll need to think about this and > do some reading. Hi Preston, I looked
2011 Nov 10
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...-O3 -vectorize on it, does not create any vector instructions. I also played a little with the vectorizer options, but was not able to get this example vectorized. Is this because the chain is too short? >>> One problem with the current implementation is that it relies on >>> GetPointerBaseWithConstantOffset to determine if two loads or stores >>> share the same base address. This fails with partially-unrolled loops >>> because it cannot "undo" all of the additions to the offset induction >>> variable in order to understand that some of the loads a...
2011 Nov 14
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...bool ScopDetection::isValidMemoryAccess(Instruction&Inst, >>                                          DetectionContext&Context) const { >>    Value *Ptr = getPointerOperand(Inst); >> @@ -236,8 +254,12 @@ >>    BasePointer = >> dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction)); >> >>    if (!BasePointer) >> -    INVALID(AffFunc, "No base pointer"); >> - >> +  { >> +//    INVALID(AffFunc, "No base pointer"); >> +    BaseValue = (Value*) GetBaseValue(AccessFunction); >> +  } >> +  el...
2011 Nov 02
5
[LLVMdev] How to make Polly ignore some non-affine memory accesses
Mmm I found out a very strange behavior (to me) of the SCEV analysis of the loop bound of the external loop I posted. When in ScopDetection it gets the SCEV of the external loop bound in the "isValidLoop()" function with: const SCEV *LoopCount = SE->getBackedgeTakenCount(L); It returns a SCEVCouldNotCompute, but if I change the "if" block inside the loop from: if
2011 Nov 15
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...would do: > >>>> > >>>> LoadInst *Load = ... Value *Pointer = Load->getPointer(); const > >>>> SCEV *PointerSCEV = 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 wi...
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
...>> +               cl::Hidden, cl::init(false)); >> + >> >>  //===----------------------------------------------------------------------===// >>  // Statistics. >> >> @@ -236,7 +241,9 @@ >>    BasePointer = >> dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction)); >> >>    if (!BasePointer) >> +  { >>      INVALID(AffFunc, "No base pointer"); >> +  } > > This change is unneeded and unrelated. > >> >>    BaseValue = BasePointer->getValue(); >> >> @@ -245,8 +252,9 @@...
2011 Nov 08
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...oller > > chose the unrolling factor to preserve the maximum available alignment, > > but I don't think that it currently does so. > I don't know, but it sounds like a good thing to do. > > > One problem with the current implementation is that it relies on > > GetPointerBaseWithConstantOffset to determine if two loads or stores > > share the same base address. This fails with partially-unrolled loops > > because it cannot "undo" all of the additions to the offset induction > > variable in order to understand that some of the loads and stores...
2011 Nov 16
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...gt;>> > > >>>> LoadInst *Load = ... Value *Pointer = Load->getPointer(); const > > >>>> SCEV *PointerSCEV = 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...
2011 Nov 21
0
[LLVMdev] How to get ELF section virtual starting address from MCSymbolRefExpr?
...>> + ? ? ? ? ? ? ? cl::Hidden, cl::init(false)); >> + >> >> ?//===----------------------------------------------------------------------===// >> ?// Statistics. >> >> @@ -236,7 +241,9 @@ >> ? ?BasePointer = >> dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction)); >> >> ? ?if (!BasePointer) >> + ?{ >> ? ? ?INVALID(AffFunc, "No base pointer"); >> + ?} > > This change is unneeded and unrelated. > >> >> ? ?BaseValue = BasePointer->getValue(); >> >> @@ -245,8 +252,9 @@...