summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CFLGraph.h
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2016-07-06 00:47:21 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2016-07-06 00:47:21 +0000
commite191996a577548cb81a9e6b5ae3fe5359d795594 (patch)
tree47b4dd0aedf844b48e8a1eff56a684a75094a401 /llvm/lib/Analysis/CFLGraph.h
parent1ca8affb24f5cf11766d64b601b008ac4c10f62d (diff)
downloadbcm5719-llvm-e191996a577548cb81a9e6b5ae3fe5359d795594.tar.gz
bcm5719-llvm-e191996a577548cb81a9e6b5ae3fe5359d795594.zip
[CFLAA] Split out more things from CFLSteens. NFC.
"More things" = StratifiedAttrs and various bits like interprocedural summaries. Patch by Jia Chen. Differential Revision: http://reviews.llvm.org/D21964 llvm-svn: 274592
Diffstat (limited to 'llvm/lib/Analysis/CFLGraph.h')
-rw-r--r--llvm/lib/Analysis/CFLGraph.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/Analysis/CFLGraph.h b/llvm/lib/Analysis/CFLGraph.h
index a37951346a8..cbc37f34928 100644
--- a/llvm/lib/Analysis/CFLGraph.h
+++ b/llvm/lib/Analysis/CFLGraph.h
@@ -15,14 +15,11 @@
#ifndef LLVM_ANALYSIS_CFLGRAPH_H
#define LLVM_ANALYSIS_CFLGRAPH_H
-#include "StratifiedSets.h"
+#include "AliasAnalysisSummary.h"
+#include "llvm/ADT/STLExtras.h"
namespace llvm {
-
-class Value;
-
namespace cflaa {
-
/// Edges can be one of four "weights" -- each weight must have an inverse
/// weight (Assign has Assign; Reference has Dereference).
enum class EdgeType {
@@ -62,7 +59,7 @@ class CFLGraph {
struct NodeInfo {
EdgeList Edges;
- StratifiedAttrs Attr;
+ AliasAttrs Attr;
};
typedef DenseMap<Node, NodeInfo> NodeMap;
@@ -104,10 +101,12 @@ public:
const_node_iterator;
bool addNode(Node N) {
- return NodeImpls.insert(std::make_pair(N, NodeInfo{EdgeList(), 0})).second;
+ return NodeImpls
+ .insert(std::make_pair(N, NodeInfo{EdgeList(), getAttrNone()}))
+ .second;
}
- void addAttr(Node N, StratifiedAttrs Attr) {
+ void addAttr(Node N, AliasAttrs Attr) {
auto *Info = getNode(N);
assert(Info != nullptr);
Info->Attr |= Attr;
@@ -123,7 +122,7 @@ public:
ToInfo->Edges.push_back(Edge{flipWeight(Type), From});
}
- StratifiedAttrs attrFor(Node N) const {
+ AliasAttrs attrFor(Node N) const {
auto *Info = getNode(N);
assert(Info != nullptr);
return Info->Attr;
OpenPOWER on IntegriCloud