This is an archive of the discontinued LLVM Phabricator instance.

[MemorySSA] Special case for assume intrinsics.
AbandonedPublic

Authored by gberry on Apr 28 2016, 11:49 AM.

Details

Summary

Treat assume intrinsics as not reading/writing memory despite
AA->getModRefInfo() saying they do, as is done in BasicAliasAnalysis.

Diff Detail

Event Timeline

gberry updated this revision to Diff 55452.Apr 28 2016, 11:49 AM
gberry retitled this revision from to [MemorySSA] Special case for assume intrinsics..
gberry updated this object.
gberry added a subscriber: llvm-commits.
dberlin edited edge metadata.Apr 28 2016, 12:04 PM
dberlin added a subscriber: dberlin.

So, should we not just move this into getModRefInfo?

(It seems like general applicable alias knowledge that requires no
computation)

I looked at that briefly, and I think that would have additional impact that we may not want. For example, it looked to me like changing getModRefInfo to ignore llvm.assume would cause LICM to hoist/sink assumes which seems at first glance to potentially be bad.

It seems like we should just fix that?
I see why it would do that, but it seems it doesn't separate whether it can
sink thinks with whether it should :)

(Note: there should be no other users, AFAIK, since i added this version of
getModRefInfo)

I can give it a shot. The LICM case might be a false alarm, since I believe it will also check isSafeToSpeculativelyExecute before hoisting/sinking, which should return false for llvm.assume.

gberry abandoned this revision.Apr 29 2016, 10:19 AM

Abandoning in favor of http://reviews.llvm.org/D19730