[PATCH] D24857: [ARM] Assign cost of scaling used in addressing mode for ARM cores
Javed Absar via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 11 08:18:18 PDT 2016
javed.absar added inline comments.
================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:11608
+ }
+ return -1;
+}
----------------
rengolin wrote:
> I guess -1 here means illegal, though without seeing the code that is using it, I can't assume.
You are right. The same is mentioned in Analysis/TargetTransformInfo.h wherein it is stated "If the AM is not supported, it returns a negative value".
================
Comment at: lib/Target/ARM/ARMISelLowering.h:299
+ /// If the AM is not supported, the return value must be negative.
+ int getScalingFactorCost(const DataLayout &DL, const AddrMode &AM, Type *Ty,
+ unsigned AS) const override;
----------------
rengolin wrote:
> Where is this being used?
It is used in LoopStrengthReduce, where decisions to transform a loop is taken based on a cost-model that takes scaling-factor cost into consideration.
https://reviews.llvm.org/D24857
More information about the llvm-commits
mailing list