This is an archive of the discontinued LLVM Phabricator instance.

[RegionInfo] Add debug-time region viewer functions
ClosedPublic

Authored by Meinersbur on Aug 8 2015, 12:34 PM.

Details

Summary

Analogously to Function::viewCFG(), RegionInfo::view() and RegionInfo::viewOnly() are meant to be called in debugging sessions. They open a viewer to show how RegionInfo currently understands the region hierarchy.

The functions viewRegion(Function*) and viewRegionOnly(Function*) invoke a fresh region analysis of the function in contrast to viewRegion(RegionInfo*) and viewRegionOnly(RegionInfo*) which show the current analysis result.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur updated this revision to Diff 31596.Aug 8 2015, 12:34 PM
Meinersbur retitled this revision from to [RegionInfo] Add debug-time region viewer functions.
Meinersbur updated this object.
Meinersbur added a reviewer: grosser.
Meinersbur set the repository for this revision to rL LLVM.
Meinersbur added a subscriber: llvm-commits.
grosser accepted this revision.Aug 9 2015, 12:07 PM
grosser edited edge metadata.

LGTM. Thanks for this nice debugging functionality.

include/llvm/Analysis/RegionInfo.h
856

visualization

include/llvm/Analysis/RegionPrinter.h
44

Maybe mention in the comments here that a new analysis is run (you mention this implicitly, but being explicit about this would be good).

61

Please be explicit about it running a new analysis.

This revision is now accepted and ready to land.Aug 9 2015, 12:07 PM
Meinersbur updated this revision to Diff 31663.Aug 10 2015, 6:17 AM
Meinersbur updated this object.
Meinersbur edited edge metadata.

Addressed comments

Meinersbur marked 3 inline comments as done.Aug 10 2015, 6:17 AM

Otherwise, this lucks good.

include/llvm/Analysis/RegionInfo.h
856

There is still a typo in visalization.

Meinersbur closed this revision.Aug 10 2015, 6:22 AM
Meinersbur marked an inline comment as done.Aug 10 2015, 6:27 AM

Typo corrected in r244445