[polly] r238092 - Remove unnecessary indirection through SCEV

Johannes Doerfert doerfert at cs.uni-saarland.de
Sat May 23 03:24:56 PDT 2015


On 05/23, Tobias Grosser wrote:
>  const ScopArrayInfo *Scop::getScopArrayInfo(Value *BasePtr) {
> -  const SCEV *PtrSCEV = SE->getSCEV(BasePtr);
> -  const SCEVUnknown *PtrBaseSCEV =
> -      cast<SCEVUnknown>(SE->getPointerBase(PtrSCEV));
> -  const ScopArrayInfo *SAI = ScopArrayInfoMap[PtrBaseSCEV->getValue()].get();
> +  const ScopArrayInfo *SAI = ScopArrayInfoMap[BasePtr].get();
At some point I thought this would allow something like:
  LoadInst *LI = ...
  SCEV *PtrSCEV = SE.getSCEV(LI->getPointerOp())
  S->getScopArrayInfo(PtrSCEV)
which would need the indirection via SCEV. However, we do not even have
users for this function so we can just force them to compute the base
pointer on their own.

LGTM.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150523/26ea3dc3/attachment.sig>


More information about the llvm-commits mailing list