This is an archive of the discontinued LLVM Phabricator instance.

[Dominators][CodeGen] Clean up MachineDominators
ClosedPublic

Authored by kuhar on Sep 24 2019, 12:00 PM.

Details

Summary

This is a cleanup patch for MachineDominatorTree. It would be an NFC, except for replacing custom DomTree verification with the generic one.

Diff Detail

Repository
rL LLVM

Event Timeline

kuhar created this revision.Sep 24 2019, 12:00 PM
Herald added a project: Restricted Project. · View Herald Transcript
kuhar added a reviewer: hliao.Sep 27 2019, 9:04 AM
arsenm accepted this revision.Sep 27 2019, 9:40 AM

LGTM

This revision is now accepted and ready to land.Sep 27 2019, 9:40 AM
This revision was automatically updated to reflect the committed changes.

The changes to verifier caught a MDT bug on AArch64:

test/CodeGen/AArch64/tailmerging_in_mbp.ll -mtriple=aarch64-eabi -verify-machine-dom-info 
DominatorTree is different than a freshly computed one!
	Current:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 25 slow queries.
  [1] %bb.0 {4294967295,4294967295} [0]
    [2] %bb.1 {4294967295,4294967295} [1]
      [3] %bb.2 {4294967295,4294967295} [2]
        [4] %bb.3 {4294967295,4294967295} [3]
          [5] %bb.7 {4294967295,4294967295} [4]
          [5] %bb.4 {4294967295,4294967295} [4]
            [6] %bb.5 {4294967295,4294967295} [5]
              [7] %bb.6 {4294967295,4294967295} [6]
    [2] %bb.8 {4294967295,4294967295} [1]
Roots: %bb.0 

	Freshly computed tree:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %bb.0 {4294967295,4294967295} [0]
    [2] %bb.1 {4294967295,4294967295} [1]
      [3] %bb.2 {4294967295,4294967295} [2]
        [4] %bb.9 {4294967295,4294967295} [3]
        [4] %bb.3 {4294967295,4294967295} [3]
          [5] %bb.7 {4294967295,4294967295} [4]
          [5] %bb.4 {4294967295,4294967295} [4]
            [6] %bb.10 {4294967295,4294967295} [5]
            [6] %bb.5 {4294967295,4294967295} [5]
              [7] %bb.6 {4294967295,4294967295} [6]
                [8] %bb.11 {4294967295,4294967295} [7]
    [2] %bb.8 {4294967295,4294967295} [1]
Roots: %bb.0 
MachineDominatorTree verification failed

Investigating