summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-01-19 16:59:23 +0000
committerDan Gohman <dan433584@gmail.com>2016-01-19 16:59:23 +0000
commitb6fd39a3a779295dc7939fd4d79dde513fa73fbe (patch)
tree880a2aeee05182a9b07e4539eb845348734d5f08 /llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h
parent1a7e8b4bc1cde3fea2de164c26bb499bfce3ad39 (diff)
downloadbcm5719-llvm-b6fd39a3a779295dc7939fd4d79dde513fa73fbe.tar.gz
bcm5719-llvm-b6fd39a3a779295dc7939fd4d79dde513fa73fbe.zip
[WebAssembly] Rematerialize constants rather than hold them live in registers.
Teach the register stackifier to rematerialize constants that have multiple uses instead of leaving them in registers. In the WebAssembly encoding, it's the same code size to materialize most constants as it is to read a value from a register. llvm-svn: 258142
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h
index 5ddd9b36f24..bf0c1dc6c95 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h
@@ -34,6 +34,9 @@ public:
const WebAssemblyRegisterInfo &getRegisterInfo() const { return RI; }
+ bool isReallyTriviallyReMaterializable(const MachineInstr *MI,
+ AliasAnalysis *AA) const override;
+
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
DebugLoc DL, unsigned DestReg, unsigned SrcReg,
bool KillSrc) const override;
OpenPOWER on IntegriCloud