[PATCH] D13217: [ARM] The Driver does not set the +strict-align flag when targeting armv6m + netbsd

Alexandros Lamprineas via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 4 12:51:42 PDT 2015


labrinea added inline comments.

================
Comment at: lib/Basic/Targets.cpp:4456
@@ -4455,3 +4455,1 @@
 
-    if (ArchVersion < 6  || 
-       (ArchVersion == 6 && ArchProfile == llvm::ARM::PK_M))
----------------
rengolin wrote:
> labrinea wrote:
> > rengolin wrote:
> > > Why is this not necessary any more?
> > The logic is still necessary for the back-end to emit aligned loads and stores, but it should be moved to the Driver, where +strict-align is set for all arch+OS combinations as shown below.
> Oh, so this ended up as a work-around for the correct change that you just did, below?
Apparently yes. The front-end checks this flag in order to decide whether it should define the //__ARM_FEATURE_UNALIGNED// macro, and the back-end needs it to chose the correct instruction lowering for memory accesses. The best place to set this flag is in **Driver**, where all target features are handled.


http://reviews.llvm.org/D13217





More information about the cfe-commits mailing list