diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-12-13 11:43:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 11:43:09 +0800 |
commit | 1562b70eaf6e0b95910fa684dfc53bd5ca6252e7 (patch) | |
tree | 415d937ed1f8667229f71565f4e93cdc7f1562f6 /llvm/lib/CodeGen/XRayInstrumentation.cpp | |
parent | ada517b40c6f90a78ea69b9d2d0997c82065c9fd (diff) | |
download | llvm-1562b70eaf6e0b95910fa684dfc53bd5ca6252e7.zip llvm-1562b70eaf6e0b95910fa684dfc53bd5ca6252e7.tar.gz llvm-1562b70eaf6e0b95910fa684dfc53bd5ca6252e7.tar.bz2 |
Reapply "[DomTreeUpdater] Move critical edge splitting code to updater" (#119547)
This relands commit #115111.
Use traditional way to update post dominator tree, i.e. break critical
edge splitting into insert, insert, delete sequence.
When splitting critical edges, the post dominator tree may change its
root node, and `setNewRoot` only works in normal dominator tree...
See
https://github.com/llvm/llvm-project/blob/6c7e5827eda26990e872eb7c3f0d7866ee3c3171/llvm/include/llvm/Support/GenericDomTree.h#L684-L687
Diffstat (limited to 'llvm/lib/CodeGen/XRayInstrumentation.cpp')
-rw-r--r-- | llvm/lib/CodeGen/XRayInstrumentation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/XRayInstrumentation.cpp b/llvm/lib/CodeGen/XRayInstrumentation.cpp index 06a85fb..9035e10 100644 --- a/llvm/lib/CodeGen/XRayInstrumentation.cpp +++ b/llvm/lib/CodeGen/XRayInstrumentation.cpp @@ -176,7 +176,7 @@ bool XRayInstrumentation::runOnMachineFunction(MachineFunction &MF) { auto *MDT = MDTWrapper ? &MDTWrapper->getDomTree() : nullptr; MachineDominatorTree ComputedMDT; if (!MDT) { - ComputedMDT.getBase().recalculate(MF); + ComputedMDT.recalculate(MF); MDT = &ComputedMDT; } @@ -185,7 +185,7 @@ bool XRayInstrumentation::runOnMachineFunction(MachineFunction &MF) { auto *MLI = MLIWrapper ? &MLIWrapper->getLI() : nullptr; MachineLoopInfo ComputedMLI; if (!MLI) { - ComputedMLI.analyze(MDT->getBase()); + ComputedMLI.analyze(*MDT); MLI = &ComputedMLI; } |