Page MenuHomePhabricator

[DominatorTree] Print roots unconditionally in `print()`.
ClosedPublic

Authored by courbet on May 16 2019, 3:43 AM.

Details

Summary

This came up in a debugging session. I was failing to update the root of
the tree, and got during verification:

DominatorTree is different than a freshly computed one!
        Current:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %"entry+land.rhs.i" {4294967295,4294967295} [0]
    [2] %opeq1.exit {4294967295,4294967295} [1]

        Freshly computed tree:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %"entry+land.rhs.i" {4294967295,4294967295} [0]
    [2] %opeq1.exit {4294967295,4294967295} [1]

We now print:

DominatorTree is different than a freshly computed one!
        Current:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %"entry+land.rhs.i" {4294967295,4294967295} [0]
    [2] %opeq1.exit {4294967295,4294967295} [1]
Roots: <badref>

        Freshly computed tree:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %"entry+land.rhs.i" {4294967295,4294967295} [0]
    [2] %opeq1.exit {4294967295,4294967295} [1]
Roots: %"entry+land.rhs.i"

Diff Detail

Repository
rL LLVM

Event Timeline

courbet created this revision.May 16 2019, 3:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2019, 3:43 AM
jdoerfert accepted this revision.May 16 2019, 5:32 AM
jdoerfert added a subscriber: jdoerfert.

Do we have a test for this? I don't think it is a problem but if we do we could update it. Otherwise, LGTM.

This revision is now accepted and ready to land.May 16 2019, 5:32 AM

Do we have a test for this? I don't think it is a problem but if we do we could update it. Otherwise, LGTM.

We don't. This is just for debug IIUC.

This revision was automatically updated to reflect the committed changes.