llvm-project/llvm/unittests
Jakub Kuderski bea19a9493 [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
2018-07-04 18:37:15 +00:00
..
ADT [ADT] Add llvm::unique_function which is like std::function but 2018-07-02 23:57:29 +00:00
Analysis [PhiValues] Adjust unit test to invalidate instructions before deleting them 2018-06-28 15:17:07 +00:00
AsmParser
BinaryFormat Re-land: [MachO] Fixing ub in MachO BinaryFormat 2018-06-03 20:33:42 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [GISel]: Pattern matchers for GFSUB, GFNEG 2018-05-31 19:30:01 +00:00
DebugInfo Move some code from PDBFileBuilder to MSFBuilder. 2018-06-27 21:18:15 +00:00
Demangle [demangler] Add ItaniumPartialDemangler::isCtorOrDtor 2018-05-24 06:57:57 +00:00
ExecutionEngine [ORC] Add a symbolAliases function to the Core APIs. 2018-06-26 01:22:29 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [Dominators] Add DomTreeUpdater constructor from DT* and PDT* 2018-07-04 18:37:15 +00:00
LineEditor
Linker Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
MC [WebAssembly] Fixed disassembler unit test failure. 2018-06-19 00:02:34 +00:00
MI [LiveIntervals] Handle moving up dead partial write 2018-02-26 14:42:13 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML
Option Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
Passes Fix build warning compiling TestPlugin on Windows and disable Passes plugin stuff on Windows since it fundamentally can't work 2018-05-19 03:05:30 +00:00
ProfileData [NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary. 2018-06-12 05:53:49 +00:00
Support [ThinLTO] Update ThinLTO cache file atimes when on Windows 2018-07-04 14:17:10 +00:00
Target [WebAssembly] Add WebAssemblyException information analysis 2018-06-25 01:20:21 +00:00
Transforms [VPlan] Add Analysis and Core to LLVM_LINK_COMPONENTS 2018-06-18 23:51:16 +00:00
XRay Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
tools [llvm-exegesis] Adjust AArch64 unit test 2018-07-03 10:52:20 +00:00
CMakeLists.txt alphabetize list 2018-05-14 18:23:05 +00:00