diff options
author | Jakub Kuderski <kubakuderski@gmail.com> | 2018-07-04 18:37:15 +0000 |
---|---|---|
committer | Jakub Kuderski <kubakuderski@gmail.com> | 2018-07-04 18:37:15 +0000 |
commit | bea19a9493b7286a0c79a8be2b788bed8cb4cfa9 (patch) | |
tree | b602c0b3ceb1a646d8fad4f8582207d1a227a353 /llvm/test/CodeGen/PowerPC/Frames-large.ll | |
parent | 9c2e7ceb1a0d77a619b247d3be4774f209fd0d02 (diff) | |
download | bcm5719-llvm-bea19a9493b7286a0c79a8be2b788bed8cb4cfa9.tar.gz bcm5719-llvm-bea19a9493b7286a0c79a8be2b788bed8cb4cfa9.zip |
[Dominators] Add DomTreeUpdater constructor from DT* and PDT*
Summary:
Previously, if a function accepts an optional DT pointer,
```
void Foo (.., DominatorTree * DT = nullptr) {
...
if(DT)
DomTreeUpdater(*DT, ...).insertEdge(A, B);
if(DT){
DomTreeUpdater DTU(*DT, ...);
... // Construct the update vector and applyUpdates
}
...
if(DT){
DomTreeUpdater DTU(*DT, ...);
... // Construct the update vector and applyUpdates
}
}
```
After this patch, it can be simplified as
```
void Foo (.., DominatorTree * DT = nullptr) {
DomTreeUpdater DTU(DT, ...);
...
DTU.insertEdge(A, B);
if(DT){
... // Construct the update vector and applyUpdates
}
...
if(DT){
... // Construct the update vector and applyUpdates
}
}
```
Patch by Chijun Sima <simachijun@gmail.com>.
Reviewers: kuhar, brzycki, dmgreen
Reviewed By: kuhar
Author: NutshellySima
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48923
llvm-svn: 336294
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/Frames-large.ll')
0 files changed, 0 insertions, 0 deletions