<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
+  // FIXME: If scheduling has moved an ARGUMENT virtual register, move it back,<br>
+  // and recompute liveness. This is a temporary hack.<br>
+  bool SawNonArg = false;<br>
+  bool MovedArg = false;<br>
+  MachineBasicBlock &EntryMBB = MF.front();<br>
+  for (auto MII = EntryMBB.begin(); MII != EntryMBB.end(); ) {<br>
+    MachineInstr *MI = &*MII++;<br>
+    if (MI->getOpcode() == WebAssembly::ARGUMENT_I32 ||<br>
+        MI->getOpcode() == WebAssembly::ARGUMENT_I64 ||<br>
+        MI->getOpcode() == WebAssembly::ARGUMENT_F32 ||<br>
+        MI->getOpcode() == WebAssembly::ARGUMENT_F64) {<br>
+      EntryMBB.insert(EntryMBB.begin(), MI->removeFromParent());<br>
+      if (SawNonArg)<br>
+        MovedArg = true;<br>
+    } else {<br>
+      SawNonArg = true;<br>
+    }<br>
+  }<br>
+  if (MovedArg) {<br>
+    SlotIndexes &Slots = getAnalysis<SlotIndexes>();<br>
+    Liveness->releaseMemory();<br>
+    Slots.releaseMemory();<br>
+    Slots.runOnMachineFunction(MF);<br>
+    Liveness->runOnMachineFunction(MF);<br>
+  }<br><br></blockquote><div><br></div><div>How temporary is this and do you plan on making the arguments non-schedulable? (Which is arguably what should be happening right? They should be the equivalent to an alloca yes?)</div><div><br></div><div>-eric</div></div></div>