FailedChanges

Summary

  1. [SCEV] Add false->any implication (details)
  2. [CSSPGO] Add attribute metadata for context profile (details)
  3. [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name. (details)
  4. [IndVars] Provide eliminateIVComparison with context (details)
  5. [mlir] Fix Python bindings tests failure in Debug mode after D98474 (details)
  6. [mlir] Support use-def cycles in graph regions during regionDCE (details)
  7. [X86] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds (details)
Commit fff1363ba0ae50da3f8f7b732c90e47e504f18a9 by mkazantsev
[SCEV] Add false->any implication

By definition of Implication operator, `false -> true` and `false -> false`. It means that
`false` implies any predicate, no matter true or false. We don't need to go any further
trying to prove the statement we need and just always say that `false` implies it in this case.

In practice it means that we are trying to prove something guarded by `false` condition,
which means that this code is unreachable, and we can safely prove any fact or perform any
transform in this code.

Differential Revision: https://reviews.llvm.org/D98706
Reviewed By: lebedev.ri
The file was modifiedllvm/test/Transforms/IndVarSimplify/trivial-guard.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/X86/pr35406.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll
Commit 1410db70b98d26e9a354373f02d4e4c407468933 by aktoon
[CSSPGO] Add attribute metadata for context profile

This changes adds attribute field for metadata of context profile. Currently we have an inline attribute that indicates whether the leaf frame corresponding to a context profile was inlined in previous build.

This will be used to help estimating inlining and be taken into account when trimming context. Changes for that in llvm-profgen will follow. It will also help tuning.

Differential Revision: https://reviews.llvm.org/D98823
The file was modifiedllvm/lib/ProfileData/SampleProfReader.cpp
The file was modifiedllvm/test/tools/llvm-profdata/Inputs/cs-sample.proftext
The file was modifiedllvm/lib/ProfileData/SampleProfWriter.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
The file was modifiedllvm/tools/llvm-profgen/PerfReader.h
The file was modifiedllvm/test/tools/llvm-profgen/noinline-cs-pseudoprobe.test
The file was modifiedllvm/test/tools/llvm-profdata/Inputs/pseudo-probe-profile.proftext
The file was modifiedllvm/include/llvm/ProfileData/SampleProfReader.h
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.h
The file was modifiedllvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.cpp
The file was modifiedllvm/test/tools/llvm-profgen/merge-cold-profile.test
The file was modifiedllvm/include/llvm/ProfileData/SampleProf.h
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.h
Commit fc1812a0ad757838b66aab57e1df720ec205a16a by hoy
[UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

C functions may be declared and defined in different prototypes like below. This patch unifies the checks for mangling names in symbol linkage name emission and debug linkage name emission so that the two names are consistent.

static int go(int);

static int go(a) int a;
{
  return a;
}

Test Plan:

Differential Revision: https://reviews.llvm.org/D98799
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was modifiedclang/lib/AST/ItaniumMangle.cpp
The file was modifiedclang/test/CodeGen/unique-internal-linkage-names-dwarf.c
Commit 16370e02a715717dd585537f02eb3e3a3221637e by mkazantsev
[IndVars] Provide eliminateIVComparison with context

We can prove more predicates when we have a context when eliminating ICmp.
As first (and very obvious) approximation we can use the ICmp instruction itself,
though in the future we are going to use a common dominator of all its users.
Need some refactoring before that.

Observed ~0.5% negative compile time impact.

Differential Revision: https://reviews.llvm.org/D98697
Reviewed By: lebedev.ri
The file was modifiedllvm/lib/Transforms/Utils/SimplifyIndVar.cpp
The file was modifiedllvm/test/Transforms/IndVarSimplify/checks_against_min_value.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
The file was modifiedllvm/test/Transforms/LoopLoadElim/pr-49141.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/X86/pr35406.ll
Commit 270a336ff46204acf887def32c92ad695f767471 by joker.eph
[mlir] Fix Python bindings tests failure in Debug mode after D98474

Add extra `type.isa<FloatType>()` check to  `FloatAttr::get(Type, double)` method.
Otherwise it tries to call `type.cast<FloatType>()`, which fails with assertion in Debug mode.

The `!type.isa<FloatType>()` case just redirercts the call to `FloatAttr::get(Type, APFloat)`,
which will perform the actual check and emit appropriate error.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D98764
The file was modifiedmlir/include/mlir/IR/BuiltinAttributes.td
Commit f178c13fa89960c7247a6367269919acf87fd1b3 by youngar17
[mlir] Support use-def cycles in graph regions during regionDCE

When deleting operations in DCE, the algorithm uses a post-order walk of
the IR to ensure that value uses were erased before value defs. Graph
regions do not have the same structural invariants as SSA CFG, and this
post order walk could delete value defs before uses.  This problem is
guaranteed to occur when there is a cycle in the use-def graph.

This change stops DCE from visiting the operations and blocks in any
meaningful order.  Instead, we rely on explicitly dropping all uses of a
value before deleting it.

Reviewed By: mehdi_amini, rriddle

Differential Revision: https://reviews.llvm.org/D98919
The file was modifiedmlir/test/Transforms/canonicalize-dce.mlir
The file was modifiedmlir/lib/Transforms/Utils/RegionUtils.cpp
Commit c241659d1573b0c89fa4d6591d7bd9d3fc84e37a by i
[X86] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds
The file was modifiedllvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp