This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Support running without a register allocator in the default CodeGen passes
ClosedPublic

Authored by sunfish on Sep 8 2015, 6:03 AM.

Details

Summary

WebAssembly doesn't currently use a register allocator, but it does need PHI lowering and other passes. This pass adds support to the default TargetPassConfig::addFastRegAlloc and TargetPassConfig::addOptimizedRegAlloc for detecting when a target has requested no register allocation pass.

This allows the removal of WebAssembly's custom implementations of addFastRegAlloc and addOptimizedRegAlloc.

Diff Detail

Repository
rL LLVM

Event Timeline

sunfish updated this revision to Diff 34210.Sep 8 2015, 6:03 AM
sunfish retitled this revision from to [WebAssembly] Support running without a register allocator in the default CodeGen passes.
sunfish updated this object.
sunfish set the repository for this revision to rL LLVM.
sunfish added a subscriber: llvm-commits.
jfb accepted this revision.Sep 8 2015, 9:50 AM
jfb added a reviewer: jfb.

Are there other virtual ISAs that would benefit from this?

Otherwise lgtm.

This revision is now accepted and ready to land.Sep 8 2015, 9:50 AM
This revision was automatically updated to reflect the committed changes.

NVPTX could theoretically benefit as well, though I didn't update it because its pass list is currently slightly different.