File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
include/llvm/Transforms/IPO Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -733,9 +733,7 @@ struct Attributor {
733
733
// / be beneficial to avoid false dependences but it requires the users of
734
734
// / `getAAFor` to explicitly record true dependences through this method.
735
735
void recordDependence (const AbstractAttribute &FromAA,
736
- const AbstractAttribute &ToAA) {
737
- QueryMap[&FromAA].insert (const_cast <AbstractAttribute *>(&ToAA));
738
- }
736
+ const AbstractAttribute &ToAA);
739
737
740
738
// / Introduce a new abstract attribute into the fixpoint analysis.
741
739
// /
@@ -907,7 +905,7 @@ struct Attributor {
907
905
AA.update (*this );
908
906
909
907
if (TrackDependence && AA.getState ().isValidState ())
910
- QueryMap[&AA]. insert ( const_cast <AbstractAttribute *>( QueryingAA));
908
+ recordDependence (AA, const_cast <AbstractAttribute &>(* QueryingAA));
911
909
return AA;
912
910
}
913
911
@@ -929,7 +927,7 @@ struct Attributor {
929
927
KindToAbstractAttributeMap.lookup (&AAType::ID))) {
930
928
// Do not register a dependence on an attribute with an invalid state.
931
929
if (TrackDependence && AA->getState ().isValidState ())
932
- QueryMap[AA]. insert ( const_cast <AbstractAttribute *>( QueryingAA));
930
+ recordDependence (*AA, const_cast <AbstractAttribute &>(* QueryingAA));
933
931
return AA;
934
932
}
935
933
return nullptr ;
Original file line number Diff line number Diff line change @@ -4711,6 +4711,12 @@ void Attributor::initializeInformationCache(Function &F) {
4711
4711
}
4712
4712
}
4713
4713
4714
+ void Attributor::recordDependence (const AbstractAttribute &FromAA,
4715
+ const AbstractAttribute &ToAA) {
4716
+ if (!FromAA.getState ().isAtFixpoint ())
4717
+ QueryMap[&FromAA].insert (const_cast <AbstractAttribute *>(&ToAA));
4718
+ }
4719
+
4714
4720
void Attributor::identifyDefaultAbstractAttributes (Function &F) {
4715
4721
if (!VisitedFunctions.insert (&F).second )
4716
4722
return ;
You can’t perform that action at this time.
0 commit comments