-
Notifications
You must be signed in to change notification settings - Fork 273
Exception edges for live range analysis master #466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
1a18018
eddb7a5
41f3d5e
92e1e4a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ struct procedure_local_cfg_baset< | |
|
||
void operator()(const method_with_amapt& args) | ||
{ | ||
const auto &method=args.first; | ||
const auto& amap=args.second; | ||
for(const auto& inst : amap) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
{ | ||
|
@@ -47,6 +48,29 @@ struct procedure_local_cfg_baset< | |
} | ||
// Add edges declared in the exception table, which don't figure | ||
// in the address map successors/predecessors as yet. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this comment refer to, as it's at the end of a block? |
||
for(const auto& table_entry : method.exception_table) | ||
{ | ||
auto findit=amap.find(table_entry.start_pc); | ||
assert(findit!=amap.end() && | ||
"Exception table entry doesn't point to an instruction?"); | ||
for(; findit->first<table_entry.end_pc; ++findit) | ||
{ | ||
// For now just assume any non-branch | ||
// instruction could potentially throw. | ||
auto succit=findit; | ||
++succit; | ||
if(succit==amap.end()) | ||
continue; | ||
const auto& thisinst=findit->second; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit picking: "&" goes with "thisinst" |
||
if(thisinst.successors.size()==1 && | ||
*thisinst.successors.begin()==succit->first) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
{ | ||
this->add_edge( | ||
entry_map.at(findit->first), | ||
entry_map.at(table_entry.handler_pc)); | ||
} | ||
} | ||
} | ||
} | ||
|
||
unsigned get_first_node(const method_with_amapt& args) const | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const auto &amap