aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-02-16 23:48:04 +0000
committerDan Gohman <dan433584@gmail.com>2016-02-16 23:48:04 +0000
commit94c6566055b856c9580a2b27bf4dd3aa8ac61482 (patch)
treeea3a0b8565018a7b4d96ada0c27b1b2806f86b21 /llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
parent0520929231d9517a13ec66da6675485aa649b312 (diff)
downloadllvm-94c6566055b856c9580a2b27bf4dd3aa8ac61482.zip
llvm-94c6566055b856c9580a2b27bf4dd3aa8ac61482.tar.gz
llvm-94c6566055b856c9580a2b27bf4dd3aa8ac61482.tar.bz2
[WebAssembly] Implement __builtin_frame_address.
Differential Revision: http://reviews.llvm.org/D17307 llvm-svn: 261032
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
index 27274c0..1c358b3 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
@@ -44,11 +44,11 @@ using namespace llvm;
/// register.
bool WebAssemblyFrameLowering::hasFP(const MachineFunction &MF) const {
const MachineFrameInfo *MFI = MF.getFrameInfo();
- assert(!MFI->isFrameAddressTaken());
const auto *RegInfo =
MF.getSubtarget<WebAssemblySubtarget>().getRegisterInfo();
- return MFI->hasVarSizedObjects() || MFI->hasStackMap() ||
- MFI->hasPatchPoint() || RegInfo->needsStackRealignment(MF);
+ return MFI->isFrameAddressTaken() || MFI->hasVarSizedObjects() ||
+ MFI->hasStackMap() || MFI->hasPatchPoint() ||
+ RegInfo->needsStackRealignment(MF);
}
/// Under normal circumstances, when a frame pointer is not required, we reserve