[PATCH] D27518: Moving isComplex decision to TTI
Michael Kuperstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 12:39:53 PST 2016
mkuper added inline comments.
================
Comment at: include/llvm/Analysis/TargetTransformInfo.h:606
+ /// of address-computation cost
+ struct AddressAccessInfo {
+ bool isStrided; /// True in case the access is strided (AddRec).
----------------
delena wrote:
> mkuper wrote:
> > delena wrote:
> > > Why do you need a struct? "Value *" will contain everything.
> > >
> > > Value *Stride;
> > >
> > > if (Stride == nullptr) - no stride,
> > > dyn_cast<ConstantInt>(Stride) - answers the question isConstant()
> > >
> > IIUC, we don't necessarily have a Value* in hand, this originates from a SCEV, right?
> yes. We can use const SCEV*.
I'm not sure passing a SCEV* to TTI makes sense, in terms of layering.
https://reviews.llvm.org/D27518
More information about the llvm-commits
mailing list