diff options
| author | Thomas Lively <tlively@google.com> | 2019-03-09 04:31:37 +0000 |
|---|---|---|
| committer | Thomas Lively <tlively@google.com> | 2019-03-09 04:31:37 +0000 |
| commit | 972d7d514b2fbed4c256ce3a7e258e9e5e5a5ab9 (patch) | |
| tree | 8a0d91bf8f8e0c0444f4d2c79aa23a3cc43f069f /llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp | |
| parent | b62642a1155e2c8ef5fc63071b2093aec7904574 (diff) | |
| download | bcm5719-llvm-972d7d514b2fbed4c256ce3a7e258e9e5e5a5ab9.tar.gz bcm5719-llvm-972d7d514b2fbed4c256ce3a7e258e9e5e5a5ab9.zip | |
[WebAssembly] Use named operands to identify loads and stores
Summary:
Uses the named operands tablegen feature to look up the indices of
offset, address, and p2align operands for all load and store
instructions. This replaces brittle, incorrect logic for identifying
loads and store when eliminating frame indices, which previously
crashed on bulk-memory ops. It also cleans up the SetP2Alignment pass.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59007
llvm-svn: 355770
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp index 995dc88bb33..a7c120963e0 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp @@ -27,6 +27,10 @@ using namespace llvm; #define GET_INSTRINFO_CTOR_DTOR #include "WebAssemblyGenInstrInfo.inc" +// defines WebAssembly::getNamedOperandIdx +#define GET_INSTRINFO_NAMED_OPS +#include "WebAssemblyGenInstrInfo.inc" + WebAssemblyInstrInfo::WebAssemblyInstrInfo(const WebAssemblySubtarget &STI) : WebAssemblyGenInstrInfo(WebAssembly::ADJCALLSTACKDOWN, WebAssembly::ADJCALLSTACKUP, |

