[PATCH] Fix for PR15086

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Nov 13 14:57:50 PST 2013


On 13 November 2013 17:39, Nick Lewycky <nlewycky at google.com> wrote:
> Sorry, I forgot about this thread entirely. I generally don't approve
> non-trivial changes under lib/Target and lib/CodeGen, I'd rather somebody
> else with more assembly/object file/backend knowledge took a look.
>
> On 13 November 2013 07:31, Rafael EspĂ­ndola <rafael.espindola at gmail.com>
> wrote:
>>
>> I *think* this is a fine improvement, but please add
>>
>> * A comment saying why jmp foo at PLT is not valid or when it would be valid.
>> * A note in tailcallpic2.ll saying that it could be optimized to a
>> direct call (no got, no plt). We don't implement ELF's interposition
>> logic, but then pretend we do during codegen. This patch doesn't need
>> to fix that, but should note that we could do better.
>>
>> Nick, do you agree?
>
>
> I'm a little confused. Either we should implement ELF interposition logic
> (and that means blocking inlining of interposable functions) or we shouldn't

I agree.

> -- and I think we've decided previously that we shouldn't. If the issue is
> just that it's a missed optimization then that's fine.

Yes, the patch in the case of tailcallpic2.ll takes us from one missed
optimization (using GOT when we don't need) to another (using PLT when
we don't need).

Cheers,
Rafael




More information about the llvm-commits mailing list