[llvm-dev] [inline-asm][asm-goto] Supporting "asm goto" in inline assembly

Yatsina, Marina via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 29 00:37:45 PDT 2017


Hi,

I wanted to revive this issue of supporting asm goto (Bug 9295<https://bugs.llvm.org/show_bug.cgi?id=9295>).
As was already proposed, the best way seems to be introducing new IR.
If we're changing the IR, we should probably provide an infrastructure that solves or at least enables future support for things like:

1.      MS-style inline asm jmps and goto (Bug 24529<https://bugs.llvm.org/show_bug.cgi?id=24529>)

2.      Analyzing symbols defined/references in the inline assembly (Bug 28970<https://bugs.llvm.org/show_bug.cgi?id=28970>), taking into account module/file-scope inline assembly.

3.      Provide some information about the cost of the inline assembly? (I'm not sure if we want to couple it with this issue and if the cost should be represented in this new IR or some other way)

This new IR should contain:

1.      A list of symbols referenced by the inline assembly

a.      Should we try to provide better analysis of how we use these symbols (e.g. in jmp instructions, in call instructions)? Can it help us do some error checking?

2.      A list of symbols defines by the inline assembly

a.      Should we provide additional information about how symbols defined (e.g. which symbols defined as globals)?.

At a later stage we also need to discuss other aspects of this new instruction (e.g. it being a block terminator and other behaviors we might want to be affected by it).
Any other thoughts and ideas we want to include in this change that I'm missing?

Thanks,
Marina
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170329/461db485/attachment-0001.html>


More information about the llvm-dev mailing list