[llvm] r218920 - [Stackmaps] Make ithe frame-pointer required for stackmaps.
Juergen Ributzka
juergen at apple.com
Thu Oct 2 15:21:50 PDT 2014
Author: ributzka
Date: Thu Oct 2 17:21:49 2014
New Revision: 218920
URL: http://llvm.org/viewvc/llvm-project?rev=218920&view=rev
Log:
[Stackmaps] Make ithe frame-pointer required for stackmaps.
Do not eliminate the frame pointer if there is a stackmap or patchpoint in the
function. All stackmap references should be FP relative.
This fixes PR21107.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
llvm/trunk/test/CodeGen/X86/patchpoint-webkit_jscc.ll
llvm/trunk/test/CodeGen/X86/patchpoint.ll
llvm/trunk/test/CodeGen/X86/stackmap-fast-isel.ll
llvm/trunk/test/CodeGen/X86/stackmap-liveness.ll
llvm/trunk/test/CodeGen/X86/stackmap-nops.ll
llvm/trunk/test/CodeGen/X86/stackmap-shadow-optimization.ll
llvm/trunk/test/CodeGen/X86/stackmap.ll
Modified: llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64FrameLowering.cpp Thu Oct 2 17:21:49 2014
@@ -92,7 +92,8 @@ bool AArch64FrameLowering::hasFP(const M
#endif
return (MFI->hasCalls() || MFI->hasVarSizedObjects() ||
- MFI->isFrameAddressTaken());
+ MFI->isFrameAddressTaken() || MFI->hasStackMap() ||
+ MFI->hasPatchPoint());
}
/// hasReservedCallFrame - Under normal circumstances, when a frame pointer is
Modified: llvm/trunk/lib/Target/X86/X86FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameLowering.cpp?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FrameLowering.cpp Thu Oct 2 17:21:49 2014
@@ -53,7 +53,8 @@ bool X86FrameLowering::hasFP(const Machi
MFI->hasVarSizedObjects() ||
MFI->isFrameAddressTaken() || MFI->hasInlineAsmWithSPAdjust() ||
MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer() ||
- MMI.callsUnwindInit() || MMI.callsEHReturn());
+ MMI.callsUnwindInit() || MMI.callsEHReturn() ||
+ MFI->hasStackMap() || MFI->hasPatchPoint());
}
static unsigned getSUBriOpcode(unsigned IsLP64, int64_t Imm) {
Modified: llvm/trunk/test/CodeGen/X86/patchpoint-webkit_jscc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/patchpoint-webkit_jscc.ll?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/patchpoint-webkit_jscc.ll (original)
+++ llvm/trunk/test/CodeGen/X86/patchpoint-webkit_jscc.ll Thu Oct 2 17:21:49 2014
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim < %s | FileCheck %s
-; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim -fast-isel -fast-isel-abort < %s | FileCheck %s --check-prefix=FAST
+; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7 < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7 -fast-isel -fast-isel-abort < %s | FileCheck %s --check-prefix=FAST
; Test the webkit_jscc calling convention.
; One argument will be passed in register, the other will be pushed on the stack.
Modified: llvm/trunk/test/CodeGen/X86/patchpoint.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/patchpoint.ll?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/patchpoint.ll (original)
+++ llvm/trunk/test/CodeGen/X86/patchpoint.ll Thu Oct 2 17:21:49 2014
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim < %s | FileCheck %s
-; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim -fast-isel -fast-isel-abort < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7 < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7 -fast-isel -fast-isel-abort < %s | FileCheck %s
; Trivial patchpoint codegen
;
Modified: llvm/trunk/test/CodeGen/X86/stackmap-fast-isel.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stackmap-fast-isel.ll?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/stackmap-fast-isel.ll (original)
+++ llvm/trunk/test/CodeGen/X86/stackmap-fast-isel.ll Thu Oct 2 17:21:49 2014
@@ -1,5 +1,5 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim | FileCheck %s
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim -fast-isel -fast-isel-abort | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 -fast-isel -fast-isel-abort | FileCheck %s
; CHECK-LABEL: .section __LLVM_STACKMAPS,__llvm_stackmaps
; CHECK-NEXT: __LLVM_StackMaps:
Modified: llvm/trunk/test/CodeGen/X86/stackmap-liveness.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stackmap-liveness.ll?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/stackmap-liveness.ll (original)
+++ llvm/trunk/test/CodeGen/X86/stackmap-liveness.ll Thu Oct 2 17:21:49 2014
@@ -1,5 +1,5 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -disable-fp-elim -enable-patchpoint-liveness=false | FileCheck %s
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -disable-fp-elim | FileCheck -check-prefix=PATCH %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -enable-patchpoint-liveness=false | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck -check-prefix=PATCH %s
;
; Note: Print verbose stackmaps using -debug-only=stackmaps.
Modified: llvm/trunk/test/CodeGen/X86/stackmap-nops.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stackmap-nops.ll?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/stackmap-nops.ll (original)
+++ llvm/trunk/test/CodeGen/X86/stackmap-nops.ll Thu Oct 2 17:21:49 2014
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
define void @nop_test() {
entry:
Modified: llvm/trunk/test/CodeGen/X86/stackmap-shadow-optimization.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stackmap-shadow-optimization.ll?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/stackmap-shadow-optimization.ll (original)
+++ llvm/trunk/test/CodeGen/X86/stackmap-shadow-optimization.ll Thu Oct 2 17:21:49 2014
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
; Check that the X86 stackmap shadow optimization is only outputting a 1-byte
; nop here. 8-bytes are requested, but 7 are covered by the code for the call to
@@ -18,4 +18,4 @@ entry:
}
declare void @llvm.experimental.stackmap(i64, i32, ...)
-declare void @bar()
\ No newline at end of file
+declare void @bar()
Modified: llvm/trunk/test/CodeGen/X86/stackmap.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/stackmap.ll?rev=218920&r1=218919&r2=218920&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/stackmap.ll (original)
+++ llvm/trunk/test/CodeGen/X86/stackmap.ll Thu Oct 2 17:21:49 2014
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 -disable-fp-elim | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
;
; Note: Print verbose stackmaps using -debug-only=stackmaps.
More information about the llvm-commits
mailing list