[llvm] r253465 - [WebAssembly] Enable register coloring and register stackifying.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 14:38:40 PST 2015


>
> +  // FIXME: If scheduling has moved an ARGUMENT virtual register, move it
> back,
> +  // and recompute liveness. This is a temporary hack.
> +  bool SawNonArg = false;
> +  bool MovedArg = false;
> +  MachineBasicBlock &EntryMBB = MF.front();
> +  for (auto MII = EntryMBB.begin(); MII != EntryMBB.end(); ) {
> +    MachineInstr *MI = &*MII++;
> +    if (MI->getOpcode() == WebAssembly::ARGUMENT_I32 ||
> +        MI->getOpcode() == WebAssembly::ARGUMENT_I64 ||
> +        MI->getOpcode() == WebAssembly::ARGUMENT_F32 ||
> +        MI->getOpcode() == WebAssembly::ARGUMENT_F64) {
> +      EntryMBB.insert(EntryMBB.begin(), MI->removeFromParent());
> +      if (SawNonArg)
> +        MovedArg = true;
> +    } else {
> +      SawNonArg = true;
> +    }
> +  }
> +  if (MovedArg) {
> +    SlotIndexes &Slots = getAnalysis<SlotIndexes>();
> +    Liveness->releaseMemory();
> +    Slots.releaseMemory();
> +    Slots.runOnMachineFunction(MF);
> +    Liveness->runOnMachineFunction(MF);
> +  }
>
>
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?)

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151119/8d32c3bd/attachment.html>


More information about the llvm-commits mailing list