SuccessChanges

Summary

  1. [NewPM] Port ConstraintElimination to the new pass manager (details)
  2. [LVI][CVP] Use block value when simplifying icmps (details)
  3. [CVP] Remove unnecessary block splits in tests (NFC) (details)
  4. [OpenMP] Add Missing _static Director for OpenMP Documentation (details)
  5. [BuildLibCalls] Add noalias for strcat and stpcpy (details)
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/Transforms/Scalar/ConstraintElimination.cpp
The file was modifiedllvm/test/Transforms/ConstraintElimination/dom.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was addedllvm/include/llvm/Transforms/Scalar/ConstraintElimination.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
Commit fe79061be2b2915993b5568cddc6b64ea0a525f6 by nikita.ppv
[LVI][CVP] Use block value when simplifying icmps

Add a flag to getPredicateAt() that allows making use of the block
value. This allows us to take into account range information from
the current block, rather than only information that is threaded
over edges, making the icmp simplification in CVP a lot more
powerful.

I'm not changing getPredicateAt() to use the block value
unconditionally to avoid any impact on the JumpThreading pass,
which is somewhat picky about LVI query order.

Most test changes here are just icmps that now get dropped (while
previously only a result used in a return was replaced). The three
tests in icmp.ll show some representative improvements. Some of
the folds this enables have been covered by IPSCCP in the meantime,
but LVI can reason about some cases which are hard to support in
IPSCCP, such as in test_br_cmp_with_offset.

The compile-time time cost of doing this is fairly minimal, with
a ~0.05% CTMark regression for ReleaseThinLTO:
https://llvm-compile-time-tracker.com/compare.php?from=709d03f8af4da4204849a70f01798e7cebba2e32&to=6236fd503761f43c99f4537121e057a01056f185&stat=instructions

This is because the block values will typically already be queried
and cached by other CVP optimizations anyway.

Differential Revision: https://reviews.llvm.org/D69686
The file was modifiedllvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
The file was modifiedllvm/lib/Analysis/LazyValueInfo.cpp
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/basic.ll
The file was modifiedllvm/include/llvm/Analysis/LazyValueInfo.h
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/range.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
Commit 01bde7310bb92d39d86ff4ceae8ae626555e30eb by nikita.ppv
[CVP] Remove unnecessary block splits in tests (NFC)

These are no longer necessary since D69686.
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/select.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/overflows.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/srem.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/basic.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/minmaxabs.ll
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/overflow_predicate.ll
Commit 0103df7903b328aa4ca8116a5c4cb4c01d48ea7d by huberjn
[OpenMP] Add Missing _static Director for OpenMP Documentation

Summary:
Adding a missing directory needed for generating Sphinx documentation without
errors. Directory current contains a placeholder image just to populate the
directory.
The file was addedopenmp/docs/_static/lines.gif
Commit 155ac333945d7af507bb28dc6f2539300a4c0666 by Dávid Bolvanský
[BuildLibCalls] Add noalias for strcat and stpcpy

strcat:
destination and source shall not overlap. (http://www.cplusplus.com/reference/cstring/strcat/)

stpcpy:
The strings may not overlap, and the destination string dest must be  large enough to receive the copy. (https://man7.org/linux/man-pages/man3/stpcpy.3.html)

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D88335
The file was modifiedllvm/test/Transforms/InferFunctionAttrs/annotate.ll
The file was modifiedllvm/lib/Transforms/Utils/BuildLibCalls.cpp