mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 07:39:31 +00:00
[WebAssembly] Avoid adding redundant EXPR_STACK uses.
llvm-svn: 255563
This commit is contained in:
parent
a7d52d8543
commit
bcdb4cbfb8
@ -78,9 +78,10 @@ static void ImposeStackOrdering(MachineInstr *MI, MachineRegisterInfo &MRI) {
|
||||
ImposeStackInputOrdering(MI);
|
||||
|
||||
// Also read the opaque EXPR_STACK register.
|
||||
MI->addOperand(MachineOperand::CreateReg(WebAssembly::EXPR_STACK,
|
||||
/*isDef=*/false,
|
||||
/*isImp=*/true));
|
||||
if (!MI->readsRegister(WebAssembly::EXPR_STACK))
|
||||
MI->addOperand(MachineOperand::CreateReg(WebAssembly::EXPR_STACK,
|
||||
/*isDef=*/false,
|
||||
/*isImp=*/true));
|
||||
|
||||
// Also, mark any inputs to this instruction as being consumed by an
|
||||
// instruction on the expression stack.
|
||||
|
Loading…
Reference in New Issue
Block a user