[llvm-dev] [cfe-dev] [RFC][ARM] -Oz implies -mthumb

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 15 11:42:46 PST 2018


On 11/15/2018 8:48 AM, Tim Northover via llvm-dev wrote:
> On Thu, 15 Nov 2018 at 14:27, Peter Smith via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> My vote is not imply ARM/Thumb state changes with optimization
>> options. We've already got two ways to do it --target=thumb-none-eabi,
>> --target=arm-none-eabi and -mthumb/-marm I think the potential
>> confusion outweighs the potential benefit. I'm just one voice though.
> I agree with that.

I also agree.  Something that nobody else has mentioned is that forcing 
Thumb mode onto code that uses inline assembly and/or intrinsics can 
cause compile errors.

It's theoretically possible to implement a mode which dynamically 
switches between ARM and Thumb mode; that would avoid compatibility 
issues, but it's probably not worthwhile given that Thumb2 is widely 
supported.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-dev mailing list