Page MenuHomePhabricator

DivergenceAnalysis: added debug output
ClosedPublic

Authored by tpr on Jun 4 2018, 3:13 AM.

Details

Summary

This commit does two things:

  1. modified the existing DivergenceAnalysis::dump() so it dumps the whole function with added DIVERGENT: annotations;
  1. added code to do that dump if the appropriate -debug-only option is on.

Change-Id: Id97b605aab1fc6f5a11a20c58a99bbe8c565bf83

Diff Detail

Repository
rL LLVM

Event Timeline

tpr created this revision.Jun 4 2018, 3:13 AM
arsenm added a subscriber: arsenm.Jun 4 2018, 3:22 AM
arsenm added inline comments.
lib/Analysis/DivergenceAnalysis.cpp
304–307 ↗(On Diff #149699)

Doesn't -print-after=divergence already get you this?

tpr added inline comments.Jun 11 2018, 10:04 AM
lib/Analysis/DivergenceAnalysis.cpp
304–307 ↗(On Diff #149699)

No:

  1. -print-after=divergence (or -print-after-all) does not print anything after this pass, perhaps because it is an analysis that says it has not modified the code.
  1. Even if it did, it would surely be using the standard pass printer that doesn't know anything about annotating with DIVERGENT:.
nhaehnle accepted this revision.Jun 15 2018, 2:47 AM

I guess it would be nice to have something like opt's -analyze output in an llc flow as well, but I don't think we do, so I think this is fine.

This revision is now accepted and ready to land.Jun 15 2018, 2:47 AM
This revision was automatically updated to reflect the committed changes.