[patch] Fix pr24486

Maxim Ostapenko via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 01:09:58 PDT 2015


On 03/10/15 21:50, Rafael EspĂ­ndola wrote:
>> Thank you for your patch.
>>
>> I've performed some investigation for failures occurred and found two
>> issues:
>>
>> - We should assign a dummy fragment in current section in EmitLabel
>> function.
>> - In MCObjectStreamer::getCurrentFragment(), we should skip dummy fragments
>> (or perhaps just not push them into appropriate section's fragments list at
>> all). If we don't do this, MCExpr::evaluateAsAbsolute() will fail to
>> evaluate .La - .Lb expressions.
> Thanks for all the work on this.
>
> There were still some things that needed improvement:
>
> * There should really only be one dummy fragment per section.
> * Ideally they would only be used by the asm streamer and not show up
> in during relaxation.
>
> The attached patch is an extension of yours.The only exception to
> second goal is that the dummy fragment is still used as a placeholder
> in the pending labels optimization. The entire area of bundles is a
> bit fuzzy to me. In any case, it is a local enough issue that it is
> probably not worth making this patch bigger to clean it up.
>
> So, the summary is that the attached patch fixes the bug and LGTM.
> Does it work for you? Do you have commit access?
>
> Cheers,
> Rafael

The patch works perfectly fine for me, thank you!

Actually I haven't a commit access to LLVM repository, so could you 
please land it?

Thanks,
-Maxim


More information about the llvm-commits mailing list