[llvm-commits] [llvm] r142530 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/2011-10-18-DisableMovtSize.ll

James Molloy james.molloy at arm.com
Wed Oct 26 00:37:58 PDT 2011


Hi Anton, Eli, Evan,

I'm reverting the patch now, at least temporarily (just running a build to
ensure it doesn't break anything).

The patch gave a 5% codesize drop on SPEC.gcc, and I've already had a
request from a user to try and remove more MOVW/MOVT pairs generated
elsewhere in the codebase. *Size does matter* to some people, us included.

I personally think LLVM has rather a crude mechanism for defining size-based
optimizations. How hard do you want to optimize - where is your tradeoff?
-Os/-Oz go some way towards this, but there is no way to check which has
been asked for.

I think we need to sort out what to do for these kind of optimizations now -
there are people and cores (Cortex-M/R class for example) where codesize
does matter massively, and for M/R series processors the MOVW/MOVT pair may
well be slower.

I also heavily dislike the Darwin-specific stuff in the backend and the
whole idea of "We don't want to do this for Darwin" - if something is a
negative tradeoff, have an appropriate target-independent knob that can be
turned to a different position for Darwin.

Cheers,

James

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Anton Korobeynikov
Sent: 26 October 2011 08:12
To: Eli Friedman
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [llvm] r142530 - in /llvm/trunk:
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/2011-10-18-DisableMovtSize.ll

> On Tue, Oct 25, 2011 at 6:08 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>> 2. Where is code size saving from? You are talking about movw + movt vs.
ldr + a constantpool entry.
> movw+movt is 8 bytes, ldr+constantpool entry is roughly 6 bytes.
Yes. That's why I asked James to present the results of something big
(gcc from SPEC in this case) so the code save size would be clearly
visible.

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits








More information about the llvm-commits mailing list