This patch adds a PDT constructor from Function and lets codes previously using a local class to do this use PostDominatorTree class directly.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
We can also try to refactor other places in the codebase that first construct PDT and then immediately do PDT.recalculate(F).
unittests/IR/DominatorTreeBatchUpdatesTest.cpp | ||
---|---|---|
25 ↗ | (On Diff #146166) | I think it would be better to replace all uses od PostDomTree with PostDominatorTree |
unittests/IR/DominatorTreeTest.cpp | ||
24 ↗ | (On Diff #146166) | Same as above. |
Comment Actions
- Replace PostDomTree with PostDominatorTree in unittests.
- Refactor codes that first construct PDT and do recalculation immediately in PostDominators.cpp.
- Replace PostDomTreeBase<BasicBlock> with PostDominatorTree in lib/Transforms/IPO/SampleProfile.cpp.
Comment Actions
Looks almost ready -- I found only a couple of cosmetic issues. Once they are fix I can commit it for you.
lib/Transforms/IPO/SampleProfile.cpp | ||
---|---|---|
1369 ↗ | (On Diff #148066) | I think we can construct it directly here, like: |
unittests/IR/DominatorTreeTest.cpp | ||
29 ↗ | (On Diff #148066) | This seems to exceed the 80-character line limit. Can you format you patch with clang-format-diff.py? |
Comment Actions
- Construct PostDominatorTree directly from Function in lib/Transforms/IPO/SampleProfile.cpp.
- Format the patch.