diff options
author | Lang Hames <lhames@gmail.com> | 2014-07-24 20:40:55 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-07-24 20:40:55 +0000 |
commit | f49bc3f1b19c24e4957bd3bc2dc08218f4707c55 (patch) | |
tree | 29cb46995b0d6d1ccbbd9f3f39b492f5b982fcce /llvm/lib/CodeGen | |
parent | 9a412d13c14ec27bb99354bebf9a71f74bde2330 (diff) | |
download | bcm5719-llvm-f49bc3f1b19c24e4957bd3bc2dc08218f4707c55.tar.gz bcm5719-llvm-f49bc3f1b19c24e4957bd3bc2dc08218f4707c55.zip |
[X86] Optimize stackmap shadows on X86.
This patch minimizes the number of nops that must be emitted on X86 to satisfy
stackmap shadow constraints.
To minimize the number of nops inserted, the X86AsmPrinter now records the
size of the most recent stackmap's shadow in the StackMapShadowTracker class,
and tracks the number of instruction bytes emitted since the that stackmap
instruction was encountered. Padding is emitted (if it is required at all)
immediately before the next stackmap/patchpoint instruction, or at the end of
the basic block.
This optimization should reduce code-size and improve performance for people
using the llvm stackmap intrinsic on X86.
<rdar://problem/14959522>
llvm-svn: 213892
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 424e759caa8..226e4204224 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -804,6 +804,8 @@ void AsmPrinter::EmitFunctionBody() { } } } + + EmitBasicBlockEnd(MBB); } // If the last instruction was a prolog label, then we have a situation where |