[PowerPC] Move PPCBranchSelector as close to asm printer as possible
authorKai Luo <lkail@cn.ibm.com>
Fri, 25 Jun 2021 01:43:31 +0000 (01:43 +0000)
committerKai Luo <lkail@cn.ibm.com>
Fri, 25 Jun 2021 02:05:19 +0000 (02:05 +0000)
commitb904574b3dbdf8e4bc9ebcdfa11144fae5c87aaa
treecea4607c53b299a8a2d0ee48ba629af528ae30cf
parentf3ef4f5bff26ac4196a15dad7773a03b9d6df21d
[PowerPC] Move PPCBranchSelector as close to asm printer as possible

Currently, PPCBranchSelector is not immediately preceding asm printer pass. `-debug-pass=Structure` gives
```
      PowerPC Branch Selector
      Contiguously Lay Out Funclets
      StackMap Liveness Analysis
      Live DEBUG_VALUE analysis
      Lazy Machine Block Frequency Analysis
      Machine Optimization Remark Emitter
      Linux PPC Assembly Printer
```
After the patch
```
      Contiguously Lay Out Funclets
      StackMap Liveness Analysis
      Live DEBUG_VALUE analysis
      PowerPC Branch Selector
      Lazy Machine Block Frequency Analysis
      Machine Optimization Remark Emitter
      Linux PPC Assembly Printer
```

Reviewed By: nemanjai, #powerpc

Differential Revision: https://reviews.llvm.org/D104762
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
llvm/test/CodeGen/PowerPC/O3-pipeline.ll