SuccessChanges

Summary

  1. [CVP] Pass context instruction when narrowing div/rem (details)
  2. [LVI] Require context instruction in external API (NFCI) (details)
  3. [LVI] Clarify getValueAt/getValueInBlock doc comments (NFC) (details)
  4. [CVP] Make srem test more robust (NFC) (details)
  5. [InstCombine] Simplify code. NFCI. (details)
  6. [NewPM] Port ConstraintElimination to the new pass manager (details)
Commit c8abf1c12dc39f3b07b887808da4bb09d5ddbe3e by nikita.ppv
[CVP] Pass context instruction when narrowing div/rem

This fold was the only place not passing the context instruction.
The tests worked around that fact by introducing a basic block split,
which is now no longer necessary.
The file was modifiedllvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/sdiv.ll
Commit 9b959b59dfaf87ba978480594d2cfcf15fe66218 by nikita.ppv
[LVI] Require context instruction in external API (NFCI)

Require CxtI in getConstant() and getConstantRange() APIs.
Accordingly drop the BB parameter, as it is implied by
CxtI->getParent().

This makes sure we don't forget to pass the context instruction,
and makes the API contract clearer (also clean up the comments to
that effect -- the value holds at the context instruction, not
the end of the block).
The file was modifiedllvm/lib/Analysis/LazyValueInfo.cpp
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
The file was modifiedllvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
The file was modifiedllvm/lib/Transforms/Utils/LowerSwitch.cpp
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/include/llvm/Analysis/LazyValueInfo.h
Commit 709d03f8af4da4204849a70f01798e7cebba2e32 by nikita.ppv
[LVI] Clarify getValueAt/getValueInBlock doc comments (NFC)

The lattice value returned by getValueInBlock() holds at the start
of the block, not at the end. Also make it clearer what the
difference between getValueInBlock() and getValueAt() is.
The file was modifiedllvm/lib/Analysis/LazyValueInfo.cpp
Commit 4f6e11948c37b58e307df5aeeca4c27c546e371e by nikita.ppv
[CVP] Make srem test more robust (NFC)

D69686 will be able to determine that the icmp is always false.
As this is not the purpose of the test, use a different modulus
that doesn't trivialize the condition.
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/srem.ll
Commit 7b782062b4d580e48ab724e278f38cc3da763f02 by benny.kra
[InstCombine] Simplify code. NFCI.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Commit 50bd71e1d727f2fb82bfa306da00e386267572da by i
[NewPM] Port ConstraintElimination to the new pass manager

If -enable-constraint-elimination is specified, add it to the -O2/-O3 pipeline.
(-O1 uses a separate function now.)

Reviewed By: fhahn, aeubanks

Differential Revision: https://reviews.llvm.org/D88365
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Transforms/ConstraintElimination/dom.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/lib/Transforms/Scalar/ConstraintElimination.cpp
The file was addedllvm/include/llvm/Transforms/Scalar/ConstraintElimination.h