This is an archive of the discontinued LLVM Phabricator instance.

[FastISel] Reduce spills around mem-intrinsic calls
ClosedPublic

Authored by probinson on Nov 5 2020, 1:13 PM.

Details

Summary

FastISel generates instructions to materialize "local values" at the
top of a block, in the hope that these values could be reused within
the block. To reduce spills and restores, FastISel treats calls as
sub-block boundaries, flushing the "local value map" at each call.

This patch treats the mem* intrinsics as if they were calls, because
at O0 generally they are calls. Eliminating these spills/restores is
actually better for debugging (especially a "continue at this line"
command), code size, stack frame size, and maybe even performance.

Diff Detail

Event Timeline

probinson created this revision.Nov 5 2020, 1:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 5 2020, 1:13 PM
probinson requested review of this revision.Nov 5 2020, 1:13 PM
rnk accepted this revision.Nov 5 2020, 1:25 PM

lgtm, I completely agree with the commit description: if these end up being calls, they should probably also be flush points.

This revision is now accepted and ready to land.Nov 5 2020, 1:25 PM
This revision was landed with ongoing or failed builds.Nov 9 2020, 9:50 AM
This revision was automatically updated to reflect the committed changes.