aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ModuleBuilder.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-10 05:39:21 +0000
committerChris Lattner <sabre@nondot.org>2009-03-10 05:39:21 +0000
commit63c8b14ddc15147f443806408db6459183af26c1 (patch)
tree72d3394e00acc3d177c723dc6070d1b72369133a /lib/CodeGen/ModuleBuilder.cpp
parent0e5c8d4ca6c7e472ddde13495c8d3558983de85a (diff)
Expand %= into ${:uid} so that the code generator emits a unique ID for the
asm. This allows us to properly handle the case when an optimizer duplicates the asm, such as here: void bar() { int i; for (i = 0; i < 3; ++i) asm("foo %=" : : "r"(0)); } we now produce: _bar: xorl %eax, %eax ## InlineAsm Start foo 0 ## InlineAsm End ## InlineAsm Start foo 1 ## InlineAsm End ## InlineAsm Start foo 2 ## InlineAsm End ret instead of: _bar: xorl %eax, %eax ## InlineAsm Start foo 1 ## InlineAsm End ## InlineAsm Start foo 1 ## InlineAsm End ## InlineAsm Start foo 1 ## InlineAsm End ret This also fixes a fixme by eliminating a static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions