[PATCH] D15377: [WebAssembly] Reintroduce ARGUMENT moving logic

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 06:08:10 PST 2015


sunfish created this revision.
sunfish added a subscriber: llvm-commits.
sunfish set the repository for this revision to rL LLVM.
Herald added subscribers: dschuff, jfb.

Reinteroduce the code for moving ARGUMENTS back to the top of the basic block. While the ARGUMENTS physical register prevents sinking and scheduling from moving them, it does not appear to be sufficient to prevent SelectionDAG from moving them down in the initial schedule. This patch introduces a patch that moves them back to the top immediately after SelectionDAG runs.

This is still hopefully a temporary solution. http://reviews.llvm.org/D14750 is one alternative, though the review has not been favorable, and proposed alternatives are longer-term and have other downsides.

This fixes the main outstanding -verify-machineinstrs failures, so it adds -verify-machineinstrs to several tests.

Repository:
  rL LLVM

http://reviews.llvm.org/D15377

Files:
  lib/Target/WebAssembly/CMakeLists.txt
  lib/Target/WebAssembly/WebAssembly.h
  lib/Target/WebAssembly/WebAssemblyArgumentMove.cpp
  lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
  test/CodeGen/WebAssembly/dead-vreg.ll
  test/CodeGen/WebAssembly/phi.ll
  test/CodeGen/WebAssembly/reg-stackify.ll
  test/CodeGen/WebAssembly/switch.ll
  test/CodeGen/WebAssembly/unreachable.ll
  test/CodeGen/WebAssembly/varargs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15377.42290.patch
Type: text/x-patch
Size: 8023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151209/0280ed57/attachment.bin>


More information about the llvm-commits mailing list