This is an archive of the discontinued LLVM Phabricator instance.

[rs4gc] avoid insert base computation instructions for deopt uses
ClosedPublic

Authored by reames on Mar 3 2021, 1:15 PM.

Details

Summary

If we have a value live over a call which is used for deopt at the call, we know that the value must be a base pointer. We can avoid potentially inserting IR to materialize a base for this value.

I'm not actually sure this is worth landing. I'm posting it mostly because it came up in another discussion thread, and I wanted to make it concrete. If we're actually seeing cases this is profitable, we're probably better off tackling the insertion algorithm.

Diff Detail

Event Timeline

reames created this revision.Mar 3 2021, 1:15 PM
reames requested review of this revision.Mar 3 2021, 1:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2021, 1:15 PM

Don't you think that it is a significant compile-time improvement and it makes sense to land anyway?
findBasePointers does not look like a cheap operation...

skatkov accepted this revision.Mar 4 2021, 6:28 PM

ok, I convinced myself this is a general good improvement. LGTM then,

This revision is now accepted and ready to land.Mar 4 2021, 6:28 PM
This revision was landed with ongoing or failed builds.Mar 5 2021, 9:58 AM
This revision was automatically updated to reflect the committed changes.