[llvm-commits] [llvm] r89877 - /llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h
Chris Lattner
clattner at apple.com
Wed Nov 25 18:33:27 PST 2009
On Nov 25, 2009, at 4:45 PM, Bob Wilson wrote:
>
> On Nov 25, 2009, at 4:18 PM, Chris Lattner wrote:
>
>>
>> On Nov 25, 2009, at 11:57 AM, Bob Wilson wrote:
>>
>>> Author: bwilson
>>> Date: Wed Nov 25 13:57:14 2009
>>> New Revision: 89877
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=89877&view=rev
>>> Log:
>>> Tail duplicate indirect branches for PowerPC, too.
>>> With the testcase for pr3120, the "threaded interpreter" runtime decreases
>>> from 1788 to 1413 with this change.
>>
>> Very nice Bob! Silly question: should isProfitableToDuplicateIndirectBranch default to true? That would let targets opt out if it is not beneficial and would save a small bit of code size.
>
> Not silly at all.... I had the same thought.
>
> Having spent more time looking at the effects of this transformation, I have a different proposal that I think you might like. Let's just get rid of that target hook altogether. ;-)
You are very persuasive, I'm convinced!!
> This special treatment of indirect branches for tail duplication just doesn't kick in very often. I was being cautious about blowing up code size, but it doesn't happen often enough to matter. I also wasn't sure if this would matter on anything besides ARM Cortex processors but now we know that it does.
Right. Indirect gotos just aren't that common.
> On a related note, Evan suggested that we be more aggressive about this with -Os, and I think that's also a good idea.
>
> Unless someone objects, I'll go ahead with those changes sometime soon.
Sounds great, thanks Bob!
-Chris
More information about the llvm-commits
mailing list