summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/Attributor.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2019-11-02 14:47:45 -0500
committerJohannes Doerfert <johannes@jdoerfert.de>2019-11-02 15:26:30 -0500
commit77a6b358b51f363d0f1626579720e654ca5aae9a (patch)
tree9f3fbfab0da116adac28020779a93c2f63b9ed9a /llvm/lib/Transforms/IPO/Attributor.cpp
parent680f6380278aa5ce871d912072272b393e53b69d (diff)
downloadbcm5719-llvm-77a6b358b51f363d0f1626579720e654ca5aae9a.tar.gz
bcm5719-llvm-77a6b358b51f363d0f1626579720e654ca5aae9a.zip
[Attributor][NFCI] Do not track unnecessary dependences
If we do not look at assumed information there is no need to track dependences.
Diffstat (limited to 'llvm/lib/Transforms/IPO/Attributor.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/Attributor.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 08c682dfcd6..b7471a32faf 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -1685,7 +1685,10 @@ static int64_t getKnownNonNullAndDerefBytesForUse(
unsigned ArgNo = ICS.getArgumentNo(U);
IRPosition IRP = IRPosition::callsite_argument(ICS, ArgNo);
- auto &DerefAA = A.getAAFor<AADereferenceable>(QueryingAA, IRP);
+ // As long as we only use known information there is no need to track
+ // dependences here.
+ auto &DerefAA = A.getAAFor<AADereferenceable>(QueryingAA, IRP,
+ /* TrackDependence */ false);
IsNonNull |= DerefAA.isKnownNonNull();
return DerefAA.getKnownDereferenceableBytes();
}
@@ -1718,8 +1721,10 @@ static int64_t getKnownNonNullAndDerefBytesForUse(
GetPointerBaseWithConstantOffset(UseV, Offset, DL,
/*AllowNonInbounds*/ false)) {
if (Base == &AssociatedValue) {
- auto &DerefAA =
- A.getAAFor<AADereferenceable>(QueryingAA, IRPosition::value(*Base));
+ // As long as we only use known information there is no need to track
+ // dependences here.
+ auto &DerefAA = A.getAAFor<AADereferenceable>(
+ QueryingAA, IRPosition::value(*Base), /* TrackDependence */ false);
IsNonNull |= (!NullPointerIsDefined && DerefAA.isKnownNonNull());
IsNonNull |= (!NullPointerIsDefined && (Offset != 0));
int64_t DerefBytes = DerefAA.getKnownDereferenceableBytes();
OpenPOWER on IntegriCloud