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

Tim Northover via cfe-dev cfe-dev at lists.llvm.org
Thu Nov 15 04:39:39 PST 2018


On Thu, 15 Nov 2018 at 12:25, Bruce Hoult <brucehoult at sifive.com> wrote:
> OK, I just checked, and -mcpu=cortex-{m3,m4,m7,a7,a9,a15,a53} gives Thumb at -O1, -O1, -Os on the following gcc:

If anything I'd be inclined to just default to Thumb always. I haven't
checked myself, but rumour has it the icache benefits make it faster
than ARM code as well as smaller in most cases. My one worry there is
with reset vectors, which I believe must be implemented in ARM in some
cases; but since GCC itself appears to be inconsistent here, hopefully
those people are already explicit about their needs.

Cheers.

Tim.



More information about the cfe-dev mailing list