AbortedChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. Remove static registration for dialects, and the "alwayslink" hack for passes (details)
  2. [DebugInfo] Enable the debug entry values feature by default (details)
  3. [NFC?][SCEV][LoopVectorize] Add datalayout to the X86/float-induction-x86.ll test (details)
  4. [CodeGen] Fix the computation of the alignment of split stores. (details)
  5. Revert "[SCCP] Remove forcedconstant, go to overdefined instead" (details)
  6. [clang] Add -fignore-exceptions (details)
  7. [lldb] Pass a valid SourceLocation to Sema::RequireCompleteType in ASTResultSynthesizer (details)
  8. [llvm-objcopy] Fix pipeline syntax (details)
  9. [ARM] MVE vector reduce add tests. NFC (details)
Commit c64770506b89a2376fe13080bc3b72789e6c752d by joker-eph
Remove static registration for dialects, and the "alwayslink" hack for passes

In the previous state, we were relying on forcing the linker to include
all libraries in the final binary and the global initializer to self-register
every piece of the system. This change help moving away from this model, and
allow users to compose pieces more freely. The current change is only "fixing"
the dialect registration and avoiding relying on "whole link" for the passes.
The translation is still relying on the global registry, and some refactoring
is needed to make this all more convenient.

Differential Revision: https://reviews.llvm.org/D74461
The file was modifiedmlir/test/lib/Transforms/TestLoopParametricTiling.cpp
The file was modifiedmlir/examples/toy/Ch6/CMakeLists.txt
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch7/CMakeLists.txt
The file was modifiedmlir/test/lib/Transforms/TestParallelismDetection.cpp
The file was modifiedmlir/test/lib/IR/TestMatchers.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
The file was modifiedmlir/lib/Transforms/OpStats.cpp
The file was modifiedmlir/test/lib/Transforms/TestCallGraph.cpp
The file was modifiedmlir/tools/mlir-translate/mlir-translate.cpp
The file was modifiedmlir/test/lib/Pass/TestPassManager.cpp
The file was removedmlir/lib/Dialect/LoopOps/DialectRegistration.cpp
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/lib/Dialect/AffineOps/CMakeLists.txt
The file was modifiedmlir/test/lib/IR/TestFunc.cpp
The file was modifiedmlir/include/mlir/Transforms/Passes.h
The file was modifiedmlir/lib/Dialect/FxpMathOps/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/SDBM/CMakeLists.txt
The file was modifiedmlir/test/lib/Transforms/TestAllReduceLowering.cpp
The file was modifiedmlir/tools/mlir-cpu-runner/CMakeLists.txt
The file was modifiedmlir/test/lib/Transforms/TestLoopFusion.cpp
The file was modifiedmlir/include/mlir/Analysis/Passes.h
The file was removedmlir/lib/Dialect/StandardOps/DialectRegistration.cpp
The file was removedmlir/lib/Dialect/VectorOps/DialectRegistration.cpp
The file was modifiedmlir/lib/Dialect/QuantOps/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch6/toyc.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch5/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch5/toyc.cpp
The file was modifiedmlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
The file was removedmlir/lib/Dialect/FxpMathOps/IR/DialectRegistration.cpp
The file was modifiedmlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp
The file was removedmlir/lib/Dialect/SDBM/SDBMDialect.cpp
The file was modifiedmlir/test/lib/Transforms/TestOpaqueLoc.cpp
The file was modifiedmlir/lib/Dialect/CMakeLists.txt
The file was modifiedmlir/test/lib/Transforms/TestLiveness.cpp
The file was modifiedmlir/test/lib/Transforms/TestLoopMapping.cpp
The file was modifiedmlir/include/mlir/Quantizer/Transforms/Passes.h
The file was modifiedmlir/test/SDBM/sdbm-api-test.cpp
The file was modifiedmlir/examples/toy/Ch7/toyc.cpp
The file was modifiedmlir/test/lib/IR/TestSymbolUses.cpp
The file was modifiedmlir/test/lib/Transforms/TestVectorizationUtils.cpp
The file was addedmlir/include/mlir/InitAllDialects.h
The file was removedmlir/lib/Dialect/SPIRV/DialectRegistration.cpp
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
The file was modifiedmlir/test/lib/Transforms/TestLinalgTransforms.cpp
The file was modifiedmlir/unittests/Dialect/QuantOps/QuantizationUtilsTest.cpp
The file was removedmlir/lib/Dialect/QuantOps/IR/DialectRegistration.cpp
The file was modifiedmlir/lib/Dialect/GPU/CMakeLists.txt
The file was modifiedmlir/test/lib/Transforms/TestVectorTransforms.cpp
The file was modifiedmlir/test/lib/Transforms/TestInlining.cpp
The file was modifiedmlir/test/lib/Transforms/TestMemRefDependenceCheck.cpp
The file was removedmlir/lib/Dialect/AffineOps/DialectRegistration.cpp
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
The file was addedmlir/include/mlir/InitAllPasses.h
The file was removedmlir/lib/Dialect/GPU/IR/DialectRegistration.cpp
The file was modifiedmlir/test/lib/Transforms/TestMemRefBoundCheck.cpp
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
The file was removedmlir/lib/Dialect/Linalg/IR/LinalgRegistration.cpp
The file was modifiedmlir/lib/Support/JitRunner.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
The file was modifiedmlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp
The file was modifiedmlir/tools/mlir-translate/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/IR/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/VectorOps/CMakeLists.txt
The file was modifiedmlir/test/Dialect/SPIRV/TestAvailability.cpp
The file was modifiedmlir/test/lib/Transforms/TestConstantFold.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
Commit 9f6ff07f8a396dfc736c4cb6f9fba9a203531329 by djordje.todorovic
[DebugInfo] Enable the debug entry values feature by default

This patch enables the debug entry values feature.

  - Remove the (CC1) experimental -femit-debug-entry-values option
  - Enable it for x86, arm and aarch64 targets
  - Resolve the test failures
  - Leave the llc experimental option for targets that do not
    support the CallSiteInfo yet

Differential Revision: https://reviews.llvm.org/D73534
The file was modifiedllvm/test/DebugInfo/MIR/X86/multiple-param-dbg-value-entry.mir
The file was modifiedclang/test/CodeGen/debug-info-extern-call.c
The file was modifiedllvm/test/CodeGen/MIR/X86/call-site-info-error1.mir
The file was modifiedllvm/include/llvm/Target/TargetMachine.h
The file was modifiedlldb/test/API/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
The file was modifiedllvm/test/DebugInfo/X86/dbgcall-site-zero-valued-imms.ll
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/locstats.ll
The file was modifiedllvm/test/DebugInfo/MIR/ARM/dbgcall-site-interpretation.mir
The file was modifiedllvm/test/DebugInfo/MIR/ARM/dbgcall-site-propagated-value.mir
The file was modifiedllvm/lib/CodeGen/MIRParser/MIRParser.cpp
The file was modifiedllvm/test/DebugInfo/X86/dbgcall-site-64-bit-imms.ll
The file was modifiedllvm/test/DebugInfo/X86/dbg-value-range.ll
The file was modifiedllvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
The file was modifiedllvm/test/tools/llvm-locstats/locstats.ll
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedllvm/test/DebugInfo/MIR/X86/kill-entry-value-after-diamond-bbs.mir
The file was modifiedllvm/test/DebugInfo/ARM/call-site-info-output.ll
The file was modifiedllvm/test/CodeGen/MIR/Hexagon/bundled-call-site-info.mir
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedllvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir
The file was modifiedllvm/test/CodeGen/MIR/X86/call-site-info-error3.mir
The file was modifiedllvm/lib/CodeGen/LiveDebugValues.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/MIR/X86/call-site-info-error4.mir
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
The file was modifiedllvm/lib/CodeGen/TargetOptionsImpl.cpp
The file was modifiedllvm/lib/CodeGen/MachineFunction.cpp
The file was modifiedllvm/test/DebugInfo/MIR/X86/entry-values-diamond-bbs.mir
The file was addedllvm/test/DebugInfo/X86/no-entry-values-with-O0.ll
The file was modifiedllvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpret-movzxi.mir
The file was modifiedllvm/test/CodeGen/X86/call-site-info-output.ll
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbgcall-site-partial-describe.mir
The file was modifiedclang/include/clang/Driver/CC1Options.td
The file was modifiedllvm/test/DebugInfo/MIR/ARM/if-coverter-call-site-info.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir
The file was modifiedllvm/test/DebugInfo/AArch64/call-site-info-output.ll
The file was modifiedllvm/test/DebugInfo/MIR/SystemZ/call-site-lzer.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/debug-call-site-param.mir
The file was modifiedllvm/test/CodeGen/ARM/smml.ll
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/test/DebugInfo/MIR/AArch64/dbgcall-site-interpretation.mir
The file was modifiedllvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbgcall-site-two-fwd-reg-defs.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/propagate-entry-value-cross-bbs.mir
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/stats-dbg-callsite-info.ll
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedllvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir
The file was modifiedllvm/include/llvm/Target/TargetOptions.h
The file was modifiedllvm/test/DebugInfo/X86/loclists-dwp.ll
The file was modifiedllvm/test/DebugInfo/MIR/X86/DW_OP_entry_value.mir
The file was modifiedllvm/test/DebugInfo/Sparc/entry-value-complex-reg-expr.ll
The file was modifiedllvm/test/CodeGen/MIR/X86/call-site-info-error2.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbg-call-site-spilled-arg.mir
The file was modifiedllvm/test/DebugInfo/ARM/entry-value-multi-byte-expr.ll
The file was modifiedllvm/test/DebugInfo/MIR/Hexagon/dbgcall-site-instr-before-bundled-call.mir
The file was modifiedllvm/lib/Target/X86/X86TargetMachine.cpp
The file was modifiedlldb/packages/Python/lldbsuite/test/decorators.py
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/CommandFlags.inc
The file was modifiedclang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/valid-call-site-GNU-extensions.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbgcall-site-copy-super-sub.mir
The file was modifiedllvm/test/DebugInfo/MIR/X86/unreachable-block-call-site.mir
The file was modifiedllvm/lib/Target/ARM/ARMTargetMachine.cpp
The file was modifiedllvm/test/DebugInfo/MIR/X86/dbgcall-site-lea-interpretation.mir
Commit 3bd33ccfdf2f5183062e775e99725930bb4e5403 by lebedev.ri
[NFC?][SCEV][LoopVectorize] Add datalayout to the X86/float-induction-x86.ll test

Summary:
Currently, `SCEVExpander::isHighCostExpansionHelper()` has the following logic:
```
  if (auto *UDivExpr = dyn_cast<SCEVUDivExpr>(S)) {
    // If the divisor is a power of two and the SCEV type fits in a native
    // integer (and the LHS not expensive), consider the division cheap
    // irrespective of whether it occurs in the user code since it can be
    // lowered into a right shift.
    if (auto *SC = dyn_cast<SCEVConstant>(UDivExpr->getRHS()))
      if (SC->getAPInt().isPowerOf2()) {
        if (isHighCostExpansionHelper(UDivExpr->getLHS(), L, At,
                                      BudgetRemaining, TTI, Processed))
          return true;
        const DataLayout &DL =
            L->getHeader()->getParent()->getParent()->getDataLayout();
        unsigned Width = cast<IntegerType>(UDivExpr->getType())->getBitWidth();
        return DL.isIllegalInteger(Width);
      }
```

Since this test does not have a datalayout specified,
`SCEVExpander::isHighCostExpansionHelper()` says that
`[[TMP2:%.*]] = lshr exact i64 [[TMP1]], 5` is high-cost, and didn't perform it.

But future patches will change that logic to solely rely on cost-model,
without any such datalayout checks, so i think it is best to show
that that change is ephemeral, and can already happen without costmodel changes.

Reviewers: reames, fhahn, sanjoy, craig.topper, RKSimon

Reviewed By: RKSimon

Subscribers: javed.absar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73717
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
Commit 15488ff24b4ae205f979be7248b38655acd82f9c by courbet
[CodeGen] Fix the computation of the alignment of split stores.

Summary:
Right now the alignment of the lower half of a store is computed as
align/2, which fails for unaligned stores (align = 1), and is overly
pessimitic for, e.g. a 8 byte store aligned to 4 bytes.
Fixes PR44851
Fixes PR44877

Reviewers: gchatelet, spatel, lebedev.ri

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74311
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/test/Transforms/CodeGenPrepare/X86/split-store-alignment.ll
The file was modifiedllvm/test/Transforms/CodeGenPrepare/PowerPC/split-store-alignment.ll
Commit fa74b31a3e9cd844c7ce2087978568e3f5ec8519 by flo
Revert "[SCCP] Remove forcedconstant, go to overdefined instead"

This causes a crash for the reproducer below

enum { a };
enum b { c, d };
e;
static _Bool g(struct f *h, enum b i) {
   i &&j();
   return a;
}
static k(char h, enum b i) {
   _Bool l = g(e, i);
   l;
}
m(h) {
   k(h, c);
   g(h, d);
}

This reverts commit aadb635e04854220064b77cc10d0e6772f5492fd.
The file was modifiedllvm/test/Transforms/IPConstantProp/PR26044.ll
The file was modifiedllvm/test/Transforms/SCCP/2006-12-19-UndefBug.ll
The file was modifiedllvm/test/Transforms/SCCP/switch-multiple-undef.ll
The file was modifiedllvm/test/Transforms/SCCP/apint-bigint2.ll
The file was modifiedllvm/test/Transforms/SCCP/ip-constant-ranges.ll
The file was modifiedllvm/test/Transforms/SCCP/ipsccp-basic.ll
The file was modifiedllvm/test/Transforms/SCCP/apint-select.ll
The file was modifiedllvm/test/Transforms/SCCP/undef-resolve.ll
The file was modifiedllvm/test/Transforms/SCCP/ub-shift.ll
The file was modifiedllvm/test/Transforms/SCCP/apint-ipsccp3.ll
The file was modifiedllvm/test/Transforms/IPConstantProp/PR16052.ll
The file was modifiedllvm/test/Transforms/SCCP/logical-nuke.ll
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
Commit 55e2678fcd4d7eca3f9a602a919da499c1103041 by jasonliu
[clang] Add -fignore-exceptions

Summary:

This is trying to implement the functionality proposed in:
http://lists.llvm.org/pipermail/cfe-dev/2017-April/053417.html
An exception can throw, but no cleanup is going to happen.
A module compiled with exceptions on, can catch the exception throws
from module compiled with -fignore-exceptions.

The use cases for enabling this option are:
1. Performance analysis of EH instrumentation overhead
2. The ability to QA non EH functionality when EH functionality is not available.
3. User of EH enabled headers knows the calls won't throw in their program and
   wants the performance gain from ignoring EH construct.

The implementation tried to accomplish that by removing any landing pad code
that might get generated.

Reviewed by: aaron.ballman

Differential Revision: https://reviews.llvm.org/D72644
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/CodeGen/CGException.cpp
The file was addedclang/test/CodeGen/ignore-exceptions.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 320647c02ae9827cae0824c6aec2bcdfcf482e44 by Raphael Isemann
[lldb] Pass a valid SourceLocation to Sema::RequireCompleteType in ASTResultSynthesizer

Sema::RequireCompleteTypeImpl is supposed to have an assert that checks that the
SourceLocation that is passed in is always valid. It's currently commented out, but
as soon as this assert goes active, nearly every LLDB expression will start crashing as
we always pass in an invalid SourceLocation from the ASTResultSynthesizer.

This patch just passes in the valid SourceLocation of the expression (which is
the SourceLocation where the complete type is required) to prevent that from happening.
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
Commit 01b5cc28acd9f6c3d5dbb94837752b7eb6d21207 by kadircet
[llvm-objcopy] Fix pipeline syntax
The file was modifiedllvm/test/tools/llvm-objcopy/wasm/remove-section.test
Commit e144620b37f3b6852ddbfb2905db00b1a187a1d5 by david.green
[ARM] MVE vector reduce add tests. NFC
The file was addedllvm/test/CodeGen/Thumb2/mve-vecreduce-add.ll