diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-07-12 22:08:25 +0000 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-07-12 22:08:25 +0000 |
commit | d8ddf839505a1aeb8a7b1b3cdeea8a5cad3b1db0 (patch) | |
tree | e37f245afecfc8bf64e62e2bfd707529bff9d676 /llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | |
parent | 6d187f0eff662a50057dfb379aeb5e9111239bf0 (diff) | |
download | bcm5719-llvm-d8ddf839505a1aeb8a7b1b3cdeea8a5cad3b1db0.tar.gz bcm5719-llvm-d8ddf839505a1aeb8a7b1b3cdeea8a5cad3b1db0.zip |
[WebAssembly] refactored utilities to not depend on MachineInstr
Summary:
Most of these functions can work for MachineInstr and MCInst
equally now.
Reviewers: dschuff
Subscribers: MatzeB, sbc100, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64643
llvm-svn: 365965
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp index 6463e268c90..31ba6f0e4c2 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp @@ -252,7 +252,7 @@ static void query(const MachineInstr &MI, AliasAnalysis &AA, bool &Read, // Analyze calls. if (MI.isCall()) { - unsigned CalleeOpNo = WebAssembly::getCalleeOpNo(MI); + unsigned CalleeOpNo = WebAssembly::getCalleeOpNo(MI.getOpcode()); queryCallee(MI, CalleeOpNo, Read, Write, Effects, StackPointer); } } @@ -826,7 +826,7 @@ bool WebAssemblyRegStackify::runOnMachineFunction(MachineFunction &MF) { // Argument instructions represent live-in registers and not real // instructions. - if (WebAssembly::isArgument(*Def)) + if (WebAssembly::isArgument(Def->getOpcode())) continue; // Currently catch's return value register cannot be stackified, because |