diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-12-03 23:00:12 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-12-03 23:00:12 +0000 |
commit | 66caac5735624f10a90921e43bb8c27eca58bee5 (patch) | |
tree | f8528f3eee049022347110bfcc204712695df366 /llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp | |
parent | 9c89ba7fa7179c1ae70a1da2995d1246e95720b3 (diff) | |
download | llvm-66caac5735624f10a90921e43bb8c27eca58bee5.zip llvm-66caac5735624f10a90921e43bb8c27eca58bee5.tar.gz llvm-66caac5735624f10a90921e43bb8c27eca58bee5.tar.bz2 |
[WebAssembly] Eliminate an ad-hoc command-line argument.
Use the target triple to determine whether to run the explicit-locals
pass, rather than using a separate command-line argument.
llvm-svn: 288602
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp index 56b0f4f..04ede7f 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp @@ -146,6 +146,11 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) { "********** Function: " << MF.getName() << '\n'); + // Disable this pass if we aren't doing direct wasm object emission. + if (MF.getSubtarget<WebAssemblySubtarget>() + .getTargetTriple().isOSBinFormatELF()) + return false; + bool Changed = false; MachineRegisterInfo &MRI = MF.getRegInfo(); WebAssemblyFunctionInfo &MFI = *MF.getInfo<WebAssemblyFunctionInfo>(); |