[llvm-commits] PATCH: Add single entry / single exit accessors
Frits van Bommel
fvbommel at gmail.com
Tue Jan 11 08:52:20 PST 2011
+ for (pred_iterator PI = pred_begin(entry), PE = pred_end(entry); PI != PE;
+ ++PI) {
+ Pred = *PI;
+ if (DT->getNode(Pred) && !contains(Pred)) {
+ if (EE) {
+ EE = 0;
+ break;
+ }
+
+ EE = new RegionEdge(Pred, entry);
+ }
+ }
You seem to be leaking memory when a second edge is found.
(Occurs in both getSingleEntryEdge() and getSingleExitEdge())
More information about the llvm-commits
mailing list