diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-08-18 17:51:27 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-08-18 17:51:27 +0000 |
commit | c9623db884ec044249c85366e9bc94e47d5cc48a (patch) | |
tree | 70ad6fd8b0ee4e7c9e6cb736699348a48a612548 /llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp | |
parent | e2f36bcb84219bcb1298e5245f6507b638645673 (diff) | |
download | llvm-c9623db884ec044249c85366e9bc94e47d5cc48a.zip llvm-c9623db884ec044249c85366e9bc94e47d5cc48a.tar.gz llvm-c9623db884ec044249c85366e9bc94e47d5cc48a.tar.bz2 |
[WebAssembly] Disable the store-results optimization.
The WebAssemly spec removing the return value from store instructions, so
remove the associated optimization from LLVM.
This patch leaves the store instruction operands in place for now, so stores
now always write to "$drop"; these will be removed in a seperate patch.
llvm-svn: 279100
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp index eb157dd..40b7d66 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp @@ -139,15 +139,6 @@ static bool ReplaceDominatedUses(MachineBasicBlock &MBB, MachineInstr &MI, return Changed; } -static bool optimizeStore(MachineBasicBlock &MBB, MachineInstr &MI, - const MachineRegisterInfo &MRI, - MachineDominatorTree &MDT, - LiveIntervals &LIS) { - unsigned ToReg = MI.getOperand(0).getReg(); - unsigned FromReg = MI.getOperand(WebAssembly::StoreValueOperandNo).getReg(); - return ReplaceDominatedUses(MBB, MI, FromReg, ToReg, MRI, MDT, LIS); -} - static bool optimizeCall(MachineBasicBlock &MBB, MachineInstr &MI, const MachineRegisterInfo &MRI, MachineDominatorTree &MDT, @@ -202,17 +193,6 @@ bool WebAssemblyStoreResults::runOnMachineFunction(MachineFunction &MF) { switch (MI.getOpcode()) { default: break; - case WebAssembly::STORE8_I32: - case WebAssembly::STORE16_I32: - case WebAssembly::STORE8_I64: - case WebAssembly::STORE16_I64: - case WebAssembly::STORE32_I64: - case WebAssembly::STORE_F32: - case WebAssembly::STORE_F64: - case WebAssembly::STORE_I32: - case WebAssembly::STORE_I64: - Changed |= optimizeStore(MBB, MI, MRI, MDT, LIS); - break; case WebAssembly::CALL_I32: case WebAssembly::CALL_I64: Changed |= optimizeCall(MBB, MI, MRI, MDT, LIS, TLI, LibInfo); |