diff options
author | Davide Italiano <davide@freebsd.org> | 2017-06-05 22:16:41 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-06-05 22:16:41 +0000 |
commit | fb4d5c095b67cca30be4e4a68e308f94c1c9b668 (patch) | |
tree | b361da5cfa05660c8d9dc7d74ca8a8c9a2799061 /llvm/unittests/Support/ProgramTest.cpp | |
parent | 88101dadcc7248133de4add4396ee1e9f2b0e406 (diff) | |
download | llvm-fb4d5c095b67cca30be4e4a68e308f94c1c9b668.zip llvm-fb4d5c095b67cca30be4e4a68e308f94c1c9b668.tar.gz llvm-fb4d5c095b67cca30be4e4a68e308f94c1c9b668.tar.bz2 |
[SelectionDAG] Update the dominator after splitting critical edges.
Running `llc -verify-dom-info` on the attached testcase results in a
crash in the verifier, due to a stale dominator tree.
i.e.
DominatorTree is not up to date!
Computed:
=============================--------------------------------
Inorder Dominator Tree:
[1] %safe_mod_func_uint8_t_u_u.exit.i.i.i {0,7}
[2] %lor.lhs.false.i61.i.i.i {1,2}
[2] %safe_mod_func_int8_t_s_s.exit.i.i.i {3,6}
[3] %safe_div_func_int64_t_s_s.exit66.i.i.i {4,5}
Actual:
=============================--------------------------------
Inorder Dominator Tree:
[1] %safe_mod_func_uint8_t_u_u.exit.i.i.i {0,9}
[2] %lor.lhs.false.i61.i.i.i {1,2}
[2] %safe_mod_func_int8_t_s_s.exit.i.i.i {3,8}
[3] %safe_div_func_int64_t_s_s.exit66.i.i.i {4,5}
[3] %safe_mod_func_int8_t_s_s.exit.i.i.i.lor.lhs.false.i61.i.i.i_crit_edge {6,7}
This is because in `SelectionDAGIsel` we split critical edges without
updating the corresponding dominator for the function (and we claim
in `MachineFunctionPass::getAnalysisUsage()` that the domtree is preserved).
We could either stop preserving the domtree in `getAnalysisUsage`
or tell `splitCriticalEdge()` to update it.
As the second option is easy to implement, that's the one I chose.
Differential Revision: https://reviews.llvm.org/D33800
llvm-svn: 304742
Diffstat (limited to 'llvm/unittests/Support/ProgramTest.cpp')
0 files changed, 0 insertions, 0 deletions