@@ -55,14 +55,14 @@ class DGNode {
55
55
56
56
public:
57
57
DGNode (Instruction *I) : I(I), SubclassID(DGNodeID::DGNode) {
58
- assert (!isMemDepCandidate (I) && " Expected Non-Mem instruction, " );
58
+ assert (!isMemDepNodeCandidate (I) && " Expected Non-Mem instruction, " );
59
59
}
60
60
DGNode (const DGNode &Other) = delete ;
61
61
virtual ~DGNode () = default ;
62
62
// / \Returns true if this is before \p Other in program order.
63
63
bool comesBefore (const DGNode *Other) { return I->comesBefore (Other->I ); }
64
64
// / \Returns true if \p I is a memory dependency candidate instruction.
65
- static bool isMemDepCandidate (Instruction *I) {
65
+ static bool isMemDepNodeCandidate (Instruction *I) {
66
66
AllocaInst *Alloca;
67
67
return Utils::isMemDepCandidate (I) ||
68
68
((Alloca = dyn_cast<AllocaInst>(I)) &&
@@ -106,7 +106,7 @@ class MemDGNode final : public DGNode {
106
106
107
107
public:
108
108
MemDGNode (Instruction *I) : DGNode(I, DGNodeID::MemDGNode) {
109
- assert (isMemDepCandidate (I) && " Expected Mem instruction!" );
109
+ assert (isMemDepNodeCandidate (I) && " Expected Mem instruction!" );
110
110
}
111
111
static bool classof (const DGNode *Other) {
112
112
return Other->SubclassID == DGNodeID::MemDGNode;
@@ -150,7 +150,7 @@ class DependencyGraph {
150
150
DGNode *getOrCreateNode (Instruction *I) {
151
151
auto [It, NotInMap] = InstrToNodeMap.try_emplace (I);
152
152
if (NotInMap) {
153
- if (DGNode::isMemDepCandidate (I))
153
+ if (DGNode::isMemDepNodeCandidate (I))
154
154
It->second = std::make_unique<MemDGNode>(I);
155
155
else
156
156
It->second = std::make_unique<DGNode>(I);
0 commit comments