[llvm-commits] [llvm] r85346 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/BranchFolding.cpp lib/CodeGen/BranchFolding.h lib/CodeGen/IfConversion.cpp lib/CodeGen/LLVMTargetMachine.cpp lib/Target/ARM/ARMTargetMachine.cpp

Sandeep Patel deeppatel1987 at gmail.com
Wed Oct 28 19:56:58 PDT 2009


On Wed, Oct 28, 2009 at 8:24 PM, Chris Lattner <clattner at apple.com> wrote:
> On Oct 28, 2009, at 11:18 AM, Evan Cheng wrote:
>>
>> This is tricky. I don't think there is a *right* answer. On x86, I
>> don't believe the extra branch matters. To me, tail merge for 1
>> instruction tails is not saving much code size and it's potentially
>> bad for performance. We should disable it except for -Os.
>>
>> I don't know if we want to differentiate between -O2 and -O3 here.
>> We either do tail merging or we disable tail merging. Unless we can
>> show it does hurt performance I'd prefer to leave it along.
>
> I agree with Evan: the only case that should change is tail merge of 1
> instruction, which should be enabled at -Os only, and only when it
> actually reduces # instructions.  O2 and O3 should have the same
> policy IMO.

On ARM, a simple BX_RET can be folded into any conditional branch that
points at it, so tail merging even 1 instruction may help.

PPC also has conditional returns, right?

deep




More information about the llvm-commits mailing list