diff options
author | Craig Topper <craig.topper@intel.com> | 2019-02-04 21:24:13 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-02-04 21:24:13 +0000 |
commit | c45e39b35f2d91012b70f35aa0addd2ec4afd496 (patch) | |
tree | 7c7b4ce062d6d338c9f42e767b740f7fd911fb90 /llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp | |
parent | 1469ff417bba5e14c99edb8c9858a7a80458df4e (diff) | |
download | bcm5719-llvm-c45e39b35f2d91012b70f35aa0addd2ec4afd496.tar.gz bcm5719-llvm-c45e39b35f2d91012b70f35aa0addd2ec4afd496.zip |
[CodeGen][ARC][SystemZ][WebAssembly] Use MachineInstr::isInlineAsm in more places instead of just comparing opcode. NFCI
I'm looking at adding a second INLINEASM opcode for better modeling asm-goto
as a terminator. Using the existing predicate will reduce teh number of
places that will need to use the new opcode.
llvm-svn: 353095
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp index dfd33b99aef..8494737d43d 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp @@ -316,7 +316,7 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) { // with inline asm register operands is to provide local indices as // immediates. if (MO.isDef()) { - assert(MI.getOpcode() == TargetOpcode::INLINEASM); + assert(MI.isInlineAsm()); unsigned LocalId = getLocalId(Reg2Local, CurLocal, OldReg); // If this register operand is tied to another operand, we can't // change it to an immediate. Untie it first. @@ -334,7 +334,7 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) { // Our contract with inline asm register operands is to provide local // indices as immediates. - if (MI.getOpcode() == TargetOpcode::INLINEASM) { + if (MI.isInlineAsm()) { unsigned LocalId = getLocalId(Reg2Local, CurLocal, OldReg); // Untie it first if this reg operand is tied to another operand. MI.untieRegOperand(MI.getOperandNo(&MO)); |