[llvm] 58d257b - [Attributor] Do not add AA to dependency graph after the update stage
Shinji Okumura via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 13:18:11 PDT 2020
Author: Shinji Okumura
Date: 2020-08-28T05:16:18+09:00
New Revision: 58d257b2904bc637dcf8f90381298eb2661d9d95
URL: https://github.com/llvm/llvm-project/commit/58d257b2904bc637dcf8f90381298eb2661d9d95
DIFF: https://github.com/llvm/llvm-project/commit/58d257b2904bc637dcf8f90381298eb2661d9d95.diff
LOG: [Attributor] Do not add AA to dependency graph after the update stage
If an AA is registered to the dependency graph in the manifest stage, Attributor aborts in `::manifestAttributes()`.
This patch prevents such termination.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D86734
Added:
Modified:
llvm/include/llvm/Transforms/IPO/Attributor.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 7c5254d6537d..802d2bdbb110 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -1104,8 +1104,10 @@ struct Attributor {
assert(!AAPtr && "Attribute already in map!");
AAPtr = &AA;
- DG.SyntheticRoot.Deps.push_back(
- AADepGraphNode::DepTy(&AA, unsigned(DepClassTy::REQUIRED)));
+ // Register AA with the synthetic root only before the manifest stage.
+ if (Phase == AttributorPhase::SEEDING || Phase == AttributorPhase::UPDATE)
+ DG.SyntheticRoot.Deps.push_back(
+ AADepGraphNode::DepTy(&AA, unsigned(DepClassTy::REQUIRED)));
return AA;
}
More information about the llvm-commits
mailing list