Changes

Summary

  1. [SCEV] Simplify invalidation after BE count calculation (NFCI) (details)
  2. [SCEV] Simplify forgetSymbolicName() (NFCI) (details)
  3. [DwarfCompileUnit] Set parent DIE right after creating a local entity (details)
  4. [PowerPC] Regenerate ppc64-P9-vabsd.ll tests (details)
  5. [ARM] Fold away unnecessary CSET/CMPZ (details)
  6. [Target] Use range-based for loops (NFC) (details)
  7. [ARM] CSINC/CSINV patterns from CMOV (details)
  8. [mlir] Enable MLIRDialectUtilsTests (details)
Commit c2550e342732d029c3a8ae1eff764d68b1abfc59 by nikita.ppv
[SCEV] Simplify invalidation after BE count calculation (NFCI)

After backedge taken counts have been calculated, we want to
invalidate all addrecs and dependent expressions in the loop,
because we might compute better results with the newly available
backedge taken counts. Previously this was done with a forgetLoop()
style use-def walk. With recent improvements to SCEV invalidation,
we can instead directly invalidate any SCEVs using addrecs in this
loop. This requires a great deal less subtlety to avoid invalidating
more than necessary, and in particular gets rid of the hack from
D113349. The change is similar to D114263 in spirit.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit f492a414bad782ae4202d2af9d3408f8e727599d by nikita.ppv
[SCEV] Simplify forgetSymbolicName() (NFCI)

With the recently introduced tracking as well as D113349, we can
greatly simplify forgetSymbolicName(). In fact, we can simply
replace it with forgetMemoizedResults().

What forgetSymbolicName() used to do is to walk the IR use-def
chain to find all SCEVs that mention the SymbolicName. However,
thanks to use tracking, we can now determine the relevant SCEVs
in a more direct way. D113349 is needed to also clear out the
actual IR to SCEV mapping in ValueExprMap.

Differential Revision: https://reviews.llvm.org/D114263
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit 904328932699cd5e0eefab2c81e4f51421fd3f33 by kbessonova
[DwarfCompileUnit] Set parent DIE right after creating a local entity

No functional changes intended.

Before this patch DwarfCompileUnit::createScopeChildrenDIE() and
DwarfCompileUnit::createAndAddScopeChildrenDIE() used to emit child subtrees
and then when all the children get created, attach them to a parent scope DIE.
However, when a DIE doesn't have a parent, all the requests for its unit DIE
fail.

Currently, this is not a big issue since it isn't usually needed to know unit DIE
for a local (function-scoped) entity. But once we introduce lexical blocks as
a valid scope for global variables (static locals) and type DIEs, any requests
for a unit DIE need to be guarded against local scope due to the potential
absence of the DIE's parent.

To avoid the aforementioned issue, this patch refactors a few DwarfCompileUnit
methods to support the idea of attaching a DIE to its parent as close to the
creation of this DIE as possible.

Reviewed By: ellis

Differential Revision: https://reviews.llvm.org/D114350
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Commit 7ba64ab05a174cc5cecacbc81dadc0ef48cc8ed1 by llvm-dev
[PowerPC] Regenerate ppc64-P9-vabsd.ll tests
The file was modifiedllvm/test/CodeGen/PowerPC/ppc64-P9-vabsd.ll
Commit 7d5d063c7745672afaab9dc2e744d43093fa6062 by david.green
[ARM] Fold away unnecessary CSET/CMPZ

Codegen from expanded vector operations can end up with unnecessary
CMPZ/CSINC, of the form:
  CSXYZ A, B, C1 (CMPZ (CSINC 0, 0, C2, D), 0)

These can be converted to remove the CMPZ and CSINC, depending on the
condition.
  if C1==NE -> CSXYZ A, B, C2, D
  if C1==EQ -> CSXYZ A, B, NOT(C2), D

Differential Revision: https://reviews.llvm.org/D114013
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-or.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-spill.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-ctlz.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpf.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-and.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-xor.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-mlapred.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpfz.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-shuffle.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpz.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-fmath.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-addpred.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-not.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vpsel.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmp.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-fmas.ll
The file was modifiedllvm/test/CodeGen/Thumb2/active_lane_mask.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-cttz.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpr.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-vselect.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-laneinterleaving.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpfr.ll
Commit ff649e08021042a8e828f30ae72d062c9b25c661 by kazu
[Target] Use range-based for loops (NFC)
The file was modifiedllvm/lib/Target/PowerPC/PPCCTRLoops.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCMCInstLower.cpp
The file was modifiedllvm/lib/Target/Sparc/DelaySlotFiller.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.cpp
The file was modifiedllvm/lib/Target/Sparc/SparcMCInstLower.cpp
The file was modifiedllvm/lib/Target/Lanai/LanaiMCInstLower.cpp
The file was modifiedllvm/lib/Target/MSP430/MSP430MCInstLower.cpp
The file was modifiedllvm/lib/Target/Mips/MipsConstantIslandPass.cpp
The file was modifiedllvm/lib/Target/XCore/XCoreMCInstLower.cpp
The file was modifiedllvm/lib/Target/Mips/MipsSEISelLowering.cpp
The file was modifiedllvm/lib/Target/Lanai/LanaiDelaySlotFiller.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZElimCompare.cpp
The file was modifiedllvm/lib/Target/Mips/MipsAsmPrinter.cpp
The file was modifiedllvm/lib/Target/Mips/MipsMCInstLower.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
The file was modifiedllvm/lib/Target/Lanai/LanaiInstrInfo.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZMCInstLower.cpp
Commit 5c64d8ef8cc0c0ed3e0f2ae693d99e7f70f20a84 by david.green
[ARM] CSINC/CSINV patterns from CMOV

We sometimes end up generating CMOV with constant operands that can be
simplified to CSINC or CSINV under Arm-8.1m. This adds some simple
patterns for them.

Differential Revision: https://reviews.llvm.org/D114349
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpr.ll
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-ldst.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-minmax.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-store.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmaxv-vminv-scalar.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vctp.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-ext.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-fpclamptosat_vec.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpfr.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vqmovn.ll
The file was modifiedllvm/test/CodeGen/Thumb2/active_lane_mask.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vqshrn.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpf.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmpfz.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-fmas.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-load.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcmp.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vqdmulh.ll
Commit 2afd16fe725ffa98723abda6dc19ee6d70f60a4d by chiahungduan
[mlir] Enable MLIRDialectUtilsTests

Also remove `TooFewDims` test which tried to create an invalid AffineMap.
The creation of an invalid AffineMap is rejected by `willBeValidAffineMap`,
as a result we can deprecate the test.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D114657
The file was modifiedmlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp
The file was modifiedmlir/unittests/Dialect/CMakeLists.txt