}
// Profiling (for FoldingSet).
+
+ static inline void Profile(llvm::FoldingSetNodeID& ID,
+ const ProgramPoint& Loc,
+ StateTy state) {
+ ID.Add(Loc);
+ GRTrait<StateTy>::Profile(ID, state);
+ }
+
inline void Profile(llvm::FoldingSetNodeID& ID) const {
- GRTrait<StateTy>::Profile(ID, getState());
+ Profile(ID, getLocation(), getState());
}
// Iterators over successor and predecessor vertices.
llvm::FoldingSetNodeID profile;
void* InsertPos = 0;
- GRTrait<StateTy>::Profile(profile, State);
- profile.Add(L);
+ NodeTy::Profile(profile, L, State);
NodeTy* V = Nodes.FindNodeOrInsertPos(profile, InsertPos);
if (!V) {
template<> struct GRTrait<ValueState*> {
static inline void* toPtr(ValueState* St) { return (void*) St; }
static inline ValueState* toState(void* P) { return (ValueState*) P; }
- static inline void Profile(llvm::FoldingSetNodeID& profile, ValueState* St) {
- ValueState::Profile(profile, St);
+ static inline void Profile(llvm::FoldingSetNodeID& profile, ValueState* St) {
+ // At this point states have already been uniqued. Just
+ // add the pointer.
+ profile.AddPointer(St);
}
};