SuccessChanges

Summary

  1. Revert "[DDG] Data Dependence Graph - DOT printer" (details)
  2. [libc++] Refactor allocate_shared to use an allocation guard (details)
  3. [AMDGPU] Use multi-dword flat scratch for spilling (details)
  4. [mlir][OpDefGen] Add support for generating local functions for shared utilities (details)
  5. [LoopIdiomRecognize] Teach detectShiftUntilZeroIdiom to recognize loops where the counter is decrementing. (details)
Commit a29ecca7819a6ed4250d3689b12b1f664bb790d7 by bmahjour
Revert "[DDG] Data Dependence Graph - DOT printer"

This reverts commit fd4a10732c8bd646ccc621c0a9af512be252f33a, to
investigate the failure on windows: http://lab.llvm.org:8011/#/builders/127/builds/3274
The file was modifiedllvm/include/llvm/Analysis/CFGPrinter.h
The file was modifiedllvm/lib/CodeGen/ScheduleDAGPrinter.cpp
The file was modifiedllvm/include/llvm/Support/GraphWriter.h
The file was removedllvm/lib/Analysis/DDGPrinter.cpp
The file was removedllvm/include/llvm/Analysis/DDGPrinter.h
The file was modifiedllvm/lib/Analysis/CallPrinter.cpp
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/CodeGen/MachineScheduler.cpp
The file was modifiedllvm/include/llvm/Analysis/DDG.h
The file was modifiedllvm/include/llvm/Support/DOTGraphTraits.h
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngine.cpp
The file was modifiedllvm/lib/Analysis/CFGPrinter.cpp
The file was modifiedllvm/lib/Analysis/CMakeLists.txt
Commit 19d57b5c42b4e80fcbd5b6a2167e4a5f4f7b64c3 by Louis Dionne
[libc++] Refactor allocate_shared to use an allocation guard

This commit is a step towards making it easier to add support for arrays
in allocate_shared. Adding support for arrays will require writing multiple
functions, and the current complexity of writing allocate_shared is
prohibitive for understanding.

Differential Revision: https://reviews.llvm.org/D93130
The file was modifiedlibcxx/include/CMakeLists.txt
The file was addedlibcxx/include/__memory/utilities.h
The file was modifiedlibcxx/include/memory
Commit cf5845d6c428a648b9b6f849122e7acc2db9df21 by Stanislav.Mekhanoshin
[AMDGPU] Use multi-dword flat scratch for spilling

Differential Revision: https://reviews.llvm.org/D93067
The file was modifiedllvm/test/CodeGen/AMDGPU/multi-dword-vgpr-spill.ll
The file was addedllvm/test/CodeGen/AMDGPU/pei-build-spill-partial-agpr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-offset-calculation.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-build-spill.mir
Commit b3ee7f1f312dd41a0ac883d78b71c14d96e78939 by riddleriver
[mlir][OpDefGen] Add support for generating local functions for shared utilities

This revision adds a new `StaticVerifierFunctionEmitter` class that emits local static functions in the .cpp file for shared operation verification. This class deduplicates shared operation verification code by emitting static functions alongside the op definitions. These methods are local to the definition file, and are invoked within the operation verify methods. The first bit of shared verification is for the type constraints used when verifying operands and results. An example is shown below:

```
static LogicalResult localVerify(...) {
  ...
}

LogicalResult OpA::verify(...) {
  if (failed(localVerify(...)))
    return failure();
  ...
}

LogicalResult OpB::verify(...) {
  if (failed(localVerify(...)))
    return failure();
  ...
}
```

This allowed for saving >400kb of code size from a downstream TensorFlow project (~15% of MLIR code size).

Differential Revision: https://reviews.llvm.org/D91381
The file was modifiedmlir/test/mlir-tblgen/predicate.td
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/include/mlir/TableGen/Constraint.h
Commit 25067f179f33ba1b764ac7a7d83385c8fd73801f by craig.topper
[LoopIdiomRecognize] Teach detectShiftUntilZeroIdiom to recognize loops where the counter is decrementing.

This adds support for loops like

unsigned clz(unsigned x) {
    unsigned w = sizeof (x) * CHAR_BIT;
    while (x) {
        w--;
        x >>= 1;
    }

    return w;
}

and

unsigned clz(unsigned x) {
    unsigned w = sizeof (x) * CHAR_BIT - 1;
    while (x >>= 1) {
        w--;
    }

    return w;
}

To support these we look for add x, -1 as well as add x, 1 that
we already matched. If the value was -1 we need to subtract from
the initial counter value instead of adding to it.

Fixes PR48404.

Differential Revision: https://reviews.llvm.org/D92745
The file was modifiedllvm/test/Transforms/LoopIdiom/X86/cttz.ll
The file was modifiedllvm/test/Transforms/LoopIdiom/X86/ctlz.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp