This is an archive of the discontinued LLVM Phabricator instance.

Change the default attributes for llvm.prefetch to enable optimization.
ClosedPublic

Authored by echristo on Mar 23 2017, 6:24 PM.

Details

Summary
Change the default attributes for llvm.prefetch to inaccessiblemem_or_argmemonly
so that we can perform some optimizations across it.

Fixes PR32365

Diff Detail

Event Timeline

echristo created this revision.Mar 23 2017, 6:24 PM
dberlin accepted this revision.Mar 25 2017, 12:55 PM

This looks at least as correct as what we do now, so LGTM.

This revision is now accepted and ready to land.Mar 25 2017, 12:55 PM
sanjoy added a subscriber: sanjoy.Mar 25 2017, 1:13 PM
sanjoy added inline comments.
include/llvm/IR/Intrinsics.td
334

Should the comment read IntrInaccessibleMemOrArgMemOnly is a ... ?

echristo closed this revision.Mar 25 2017, 1:32 PM

Given that this is the suggested direction from Hal originally I'm going to take Danny's LGTM as an OK.

Happy to pull back if Hal would like something different though.

Committed thusly:

echristo@athyra ~/s/llvm> git svn dcommit
Committing to https://llvm.org/svn/llvm-project/llvm/trunk ...
A test/Transforms/InstCombine/prefetch-load.ll
M include/llvm/IR/Intrinsics.td
M test/Bitcode/compatibility-3.6.ll
M test/Bitcode/compatibility-3.7.ll
M test/Bitcode/compatibility-3.8.ll
M test/Bitcode/compatibility-3.9.ll
M test/Bitcode/compatibility-4.0.ll
M test/Bitcode/compatibility.ll
Committed r298781

-eric

include/llvm/IR/Intrinsics.td
334

Yes it should I'm not sure how what's there happened. :)

Fixed locally.