Skip to content

Commit 3415c2d

Browse files
committed
escape_analysist now inspected for make_top/make_bottom/make_entry
1 parent bd5a045 commit 3415c2d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/analyses/escape_analysis.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ class escape_domaint:public ai_domain_baset
5656

5757
void make_top() override final
5858
{
59-
cleanup_map.clear();
60-
is_bottom=false;
59+
// We don't have a proper top.
60+
assert(false);
6161
}
6262

6363
void make_entry() override final
6464
{
65-
make_top();
65+
cleanup_map.clear();
66+
is_bottom=false;
6667
}
6768

6869
typedef union_find<irep_idt> aliasest;
@@ -73,6 +74,9 @@ class escape_domaint:public ai_domain_baset
7374
std::set<irep_idt> cleanup_functions;
7475
};
7576

77+
// We track a set of 'cleanup functions' for specific
78+
// identifiers. The cleanup functions are executed
79+
// once the last pointer to an object is lost.
7680
typedef std::map<irep_idt, cleanupt > cleanup_mapt;
7781
cleanup_mapt cleanup_map;
7882

0 commit comments

Comments
 (0)