This is an archive of the discontinued LLVM Phabricator instance.

Use isSafeToLoadUnconditionally in isSafeToSpeculativelyExecute
Needs ReviewPublic

Authored by apilipenko on Jan 15 2016, 9:44 AM.

Details

Reviewers
hfinkel
reames

Diff Detail

Event Timeline

apilipenko updated this revision to Diff 45005.Jan 15 2016, 9:44 AM
apilipenko retitled this revision from to Use isSafeToLoadUnconditionally in isSafeToSpeculativelyExecute.
apilipenko updated this object.
apilipenko added reviewers: hfinkel, reames.
apilipenko added a subscriber: llvm-commits.
hfinkel edited edge metadata.Apr 26 2016, 6:40 PM

Seems reasonable. Do you have a test case, or at least an explanation for why you'd like to do this?

isSafeToLoadUnconditionally is more aggressive than isDereferenceableAndAlignedPointer. Besides calling isDereferenceable it scans the context BB to see if the location was loaded/stored before. So, with this change isSafeToSpeculativelyExecute callers will also benefit from BB scan. Although, so far in practice the only place where isSafeToSpeculativelyExecute is called with a context is LICM.

reames resigned from this revision.Feb 25 2020, 9:02 AM

Resigning from a stale review (2016). Feel free to re-add if thread ever revived.