SuccessChanges

Summary

  1. GlobalISel: Move load/store lowering to separate functions (details)
  2. GlobalISel: Fix redundant variable and shadowing (details)
  3. GlobalISel: Simplify code (details)
  4. GlobalISel: Use buildAnyExtOrTrunc (details)
  5. DomTree: Make PostDomTree immune to block successors swap (details)
  6. [BPI][NFC] Unify handling of normal and SCC based loops (details)
  7. Revert "DomTree: Make PostDomTree immune to block successors swap" (details)
Commit 54615ec48f3ef6e9ea004bb2b84caadac2dead5b by Matthew.Arsenault
GlobalISel: Move load/store lowering to separate functions
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
Commit 8f65c933c42879ff807e3518d9f84892babd30a5 by Matthew.Arsenault
GlobalISel: Fix redundant variable and shadowing
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Commit 1ea182ce79eedae740e20bbb33bdb3c4c4eb53cb by Matthew.Arsenault
GlobalISel: Simplify code

This cannot be a vector of pointers, so using getScalarSizeInBits just
added a bit extra noise.
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Commit 93cebb190ad24ea367c1302ee989e7cafcf238ac by Matthew.Arsenault
GlobalISel: Use buildAnyExtOrTrunc
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Commit c35585e209efe69e2233bdc5ecd23bed7b735ba3 by yrouban
DomTree: Make PostDomTree immune to block successors swap

This is another fix for the bug 46098 where PostDominatorTree
is unexpectedly changed by InstCombine's branch swapping
transformation.
This patch fixes PostDomTree builder. While looking for
the furthest away node in a reverse unreachable subgraph
this patch runs DFS with successors in their function order.
This order is indifferent to the order of successors, so is
the furthest away node.

Reviewers: kuhar, nikic, lebedev.ri
Differential Revision: https://reviews.llvm.org/D84763
The file was modifiedllvm/include/llvm/Support/GenericDomTreeConstruction.h
The file was addedllvm/test/Transforms/InstCombine/infinite-loop-postdom.ll
Commit 02a629daad0a1b7c8f70b11b312e94725c386dee by ybrevnov
[BPI][NFC] Unify handling of normal and SCC based loops

This is one more NFC part extracted from D79485. Normal and SCC based loops have very different representation and have to be handled separatly each time we deal with loops. D79485 is going to introduce much more extensive use of loops what will be problematic with out this change.

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D84838
The file was modifiedllvm/include/llvm/Analysis/BranchProbabilityInfo.h
The file was modifiedllvm/lib/Analysis/BranchProbabilityInfo.cpp
Commit 1366d66a22a5f0d25fcc6e922118bb51ab22f8c1 by joker.eph
Revert "DomTree: Make PostDomTree immune to block successors swap"

This reverts commit c35585e209efe69e2233bdc5ecd23bed7b735ba3.

The MLIR is broken with this patch, reproduce by adding
-DLLVM_ENABLE_PROJECTS=mlir to the cmake configuration and
build `ninja tools/mlir/lib/IR/CMakeFiles/obj.MLIRIR.dir/Dominance.cpp.o`
The file was modifiedllvm/include/llvm/Support/GenericDomTreeConstruction.h
The file was removedllvm/test/Transforms/InstCombine/infinite-loop-postdom.ll