[PATCH] D21374: [RFC] Generate long nop instructions depending on function-specific subtarget info

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 19:15:01 PDT 2016


How is this represented is the assembly file?

We should not create another case where we cannot go from .ll to .s to .o.

Cheers,
Rafael


On 15 June 2016 at 08:42, Andrey Turetskiy via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> aturetsk added a comment.
>
> Hi,
>
> I've been thinking about a way to generate function-specific long nop instructions and here is what I came up with:
>
> 1. Function-specific subtarget info seems to be available only during machine function passes. However I don't think we can start generating long nops somewhere there, so during the pass which creates MCFragments (AsmPrinter) we store the info in the fragments which hold the function.
> 2. We generate long nops in MCAssembler as we've been doing so far, just additionally pass the function subtarget info to the writeNopData function.
> 3. Unfortunately I didn't find a better way to pass a module subtarget info to the writeNopData other that in the rejected http://reviews.llvm.org/D17573 (so to work correctly this patch is applied on top of it). Eric suggested to move writeNopData from AsmBackend somewhere else, but I didn't find a better place with module subtarget info available there. Also, I didn't find a way to reach module subtarget info from MCAssembler. I'd appreciate any advise on how to do that any other way than http://reviews.llvm.org/D17573.
>
> The result of the patch you can see in the test - generated long nops differ from function to function depending on the specified targets.
>
>
> http://reviews.llvm.org/D21374
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list