[WebAssembly] Move CFG-changing passes before RegStackify
authorHeejin Ahn <aheejin@gmail.com>
Tue, 8 Jan 2019 01:25:12 +0000 (01:25 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Tue, 8 Jan 2019 01:25:12 +0000 (01:25 +0000)
commite95056d69c636ee3d8a6297e838526adf3b92eea
tree5f6c4058383c0d50700c3b87188788e6a281022e
parentadc40baa29a1c16cde63c4bf857afea0eb7b476e
[WebAssembly] Move CFG-changing passes before RegStackify

Summary:
FixIrreducibleControlFlow and LateEHPrepare both possibly modify CFG and
create new registers. There seems to be no reason these passes go after
register-related optimization passes (PrepareForLiveIntervals,
OptimizeLiveIntervals, StoreResults, RegStackify, and RegColoring), and
this also possibly create new optimization opportunities. I think we
should put all current and future optimization passes before RegStackify
(and related passes) unless there's a reason not to.

Reviewers: kripken

Subscribers: dschuff, sbc100, sunfish, jgravelle-google, llvm-commits

Differential Revision: https://reviews.llvm.org/D56356

llvm-svn: 350596
llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp