summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/Attributor.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-08-20 05:57:01 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-08-20 05:57:01 +0000
commit028b2aa56a627f6175dbe89ed37c2852a884281a (patch)
treef2344e8c935f6213234447906301c64332efaf4a /llvm/lib/Transforms/IPO/Attributor.cpp
parenta08e139d5074c7ca2b81d780525e958d27d2c8aa (diff)
downloadbcm5719-llvm-028b2aa56a627f6175dbe89ed37c2852a884281a.tar.gz
bcm5719-llvm-028b2aa56a627f6175dbe89ed37c2852a884281a.zip
[Attributor] Fix the "clamp" operator
The clamp operator should not take the known of the given state as the known is potentially based on assumed information. This also adds TODOs to guide improvements. llvm-svn: 369327
Diffstat (limited to 'llvm/lib/Transforms/IPO/Attributor.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/Attributor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 5ad9d4cb977..ee3541b7c1d 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -526,6 +526,8 @@ struct AAReturnedFromReturnedValues : public AAType {
ChangeStatus updateImpl(Attributor &A) override {
StateType S;
clampReturnedValueStates<AAType, StateType>(A, *this, S);
+ // TODO: If we know we visited all returned values, thus no are assumed
+ // dead, we can take the known information from the state T.
return clampStateAndIndicateChange<StateType>(this->getState(), S);
}
};
@@ -585,6 +587,8 @@ struct AAArgumentFromCallSiteArguments : public AAType {
ChangeStatus updateImpl(Attributor &A) override {
StateType S;
clampCallSiteArgumentStates<AAType, StateType>(A, *this, S);
+ // TODO: If we know we visited all incoming values, thus no are assumed
+ // dead, we can take the known information from the state T.
return clampStateAndIndicateChange<StateType>(this->getState(), S);
}
};
@@ -2265,6 +2269,8 @@ struct AAAlignFloating : AAAlignImpl {
VisitValueCB))
indicatePessimisticFixpoint();
+ // TODO: If we know we visited all incoming values, thus no are assumed
+ // dead, we can take the known information from the state T.
return clampStateAndIndicateChange(getState(), T);
}
OpenPOWER on IntegriCloud