[PATCH] D11691: [WebAssembly] Add Relooper

Dan Gohman dan433584 at gmail.com
Mon Aug 3 11:45:41 PDT 2015


sunfish added inline comments.

================
Comment at: lib/Target/WebAssembly/CMakeLists.txt:12
@@ -11,2 +11,3 @@
 add_llvm_target(WebAssemblyCodeGen
+  Relooper.cpp
   WebAssemblyAsmPrinter.cpp
----------------
arsenm wrote:
> arsenm wrote:
> > Would it be possible to move this into lib/Transforms/Scalar and set up as a target independent pass? I would be interested in evaluating this as an alternative to StructurizeCFG
> This would also have the added advantage of being able to write IR->IR tests
In reply to these two comments, and "Will this be eventually structuring the IR or on MachineBasicBlocks?",

This pass is closer in function to AMDILCFGStructurizer in the AMDGPU backend, and is meant to be run in a very late codegen pass after most everything else is done. At the same time, WebAssembly's control structures are more expressive than AMDGPU's, and this motivates different algorithms.

Also, there are people working to support serialization of MachineFunctions, which will enable the development of fine-grained unit tests.

We're open to generalizing this code so that other backends can share it. At the same time, the big picture here is that that we're adapting some pre-existing code that we developed for other purposes here, and instead of doing all the work out-of-tree and checking it in as a completed artifact, we're doing much of the work in-tree. The code you see here will likely change significantly before we're really ready to think about this.


Repository:
  rL LLVM

http://reviews.llvm.org/D11691







More information about the llvm-commits mailing list