This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Don't add IMPLICIT_DEFs in PrepareForLiveIntervals
AbandonedPublic

Authored by aheejin on Dec 26 2018, 2:23 PM.

Details

Reviewers
dschuff
sunfish
Summary

Not sure about the situation when this pass was first added, but uses
without defs are generated from IMPLICIT_DEF instructions from
instruction selection phase correctly now, and all IMPLICIT_DEFs
generated by this pass result in dead live ranges that start and end in
the same instruction. So the only thing we need to do with this pass is
to make sure we track the liveness again.

All test changes are local number changes, which are not meaningful.

Diff Detail

Event Timeline

aheejin created this revision.Dec 26 2018, 2:23 PM
dschuff added inline comments.Jan 9 2019, 10:32 AM
lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp
60

This (setting the MachineFunctionProperty) is now the only thing that this pass does. Do we really need all the pass boilerplate just to do that? e.g. can we stick it at the beginning of OptimizeLiveIntervals or RegisterColoring or wherever we actually need it?

aheejin marked an inline comment as done.Jan 9 2019, 11:22 AM

@sunfish Do you have any concerns on removing this? I am not familiar with the situation when this code was first written, so I'm not sure if there's something I'm missing.

lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp
60

I wanted to do that, but we can't. The next pass (OptimizeLiveIntervals) requires LiveIntervals analysis, which means LiveIntervals pass will run before OptimizeLiveIntervals starts. If this precondition is not set before LiveIntervals starts, LiveIntervals pass will fail. I also thought about setting it in the pass before PrepareForLiveIntervals, but that seemed to make less sense, because the pass before it could be anything depending on the compilation pipeline.

@sunfish Ping :) Do you have any concerns on this?

Can we land this if no one has concerns?

Ping! Can we land it? :$

sunfish accepted this revision.Jan 14 2019, 12:41 PM

Sorry for the delay here. Yes, let's land this.

This revision is now accepted and ready to land.Jan 14 2019, 12:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2019, 11:27 AM
aheejin abandoned this revision.May 12 2022, 8:37 PM

Closing in favor of D125515.

Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2022, 8:37 PM