[PATCH] D24857: [ARM] Assign cost of scaling used in addressing mode for ARM cores
Renato Golin via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 11 08:06:28 PDT 2016
rengolin added inline comments.
================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:11604
+ if (isLegalAddressingMode(DL, AM, Ty, AS)) {
+ if (Subtarget->hasFPAO())
+ return AM.Scale < 0 ? 1 : 0; // positive offsets execute faster
----------------
This is not really a cost model... but I don't have a better idea. This is a very specific feature.
@jmolloy, are you happy with this?
================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:11608
+ }
+ return -1;
+}
----------------
I guess -1 here means illegal, though without seeing the code that is using it, I can't assume.
================
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;
----------------
Where is this being used?
https://reviews.llvm.org/D24857
More information about the llvm-commits
mailing list