This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Move CFG-changing passes before RegStackify
ClosedPublic

Authored by aheejin on Jan 5 2019, 10:59 AM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

aheejin created this revision.Jan 5 2019, 10:59 AM

I'm not sure if I can create an LLVM regression test for this. All current test cases pass.

kripken accepted this revision.Jan 6 2019, 3:34 PM

From the point of view of FixIrreducibleControlFlow this sounds good.

This revision is now accepted and ready to land.Jan 6 2019, 3:34 PM
This revision was automatically updated to reflect the committed changes.