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
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 | ||
---|---|---|
24–25 | I think it would be better to replace all uses od PostDomTree with PostDominatorTree | |
unittests/IR/DominatorTreeTest.cpp | ||
24–25 | 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 | ||
---|---|---|
1368–1369 | I think we can construct it directly here, like: | |
unittests/IR/DominatorTreeTest.cpp | ||
29–30 | 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.
I think we can construct it directly here, like:
new PostDominatorTree(F))