[PATCH] D17015: ARM: Introduce conservative load/store optimization mode

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 15:23:53 PST 2016


MatzeB added a comment.

Thanks for the views.


================
Comment at: lib/Target/ARM/ARMLoadStoreOptimizer.cpp:67
@@ +66,3 @@
+static cl::opt<bool>
+ConservativeARMLoadStoreOpt("arm-conservative-load-store", cl::Hidden,
+    cl::init(false), cl::desc("Be more conservative in ARM load/store opt"));
----------------
rengolin wrote:
> Maybe a name that has more to do with alignment?
> 
> Like "arm-unaligned-load-store", enabled by default?
What about arm-assume-misaligned-load-store?
I'd not enable this by default, in the end there is code with undefined behavior involved for this option to be necessary, such workarounds should not be defaults.

================
Comment at: lib/Target/ARM/ARMLoadStoreOptimizer.cpp:929
@@ +928,3 @@
+/// pointers.
+static bool isConservativelyFine(const TargetSubtargetInfo &STI,
+                                 const MachineInstr &MI) {
----------------
jmolloy wrote:
> Should this return "true" if unaligned accesses are disabled?
I check at the place where I used the function. I'd like to think of this function as a check for a property on the program. A property of the program should be independent of the state of some cl::opt switch to I rather check that switch where the function is used.


Repository:
  rL LLVM

http://reviews.llvm.org/D17015





More information about the llvm-commits mailing list