SuccessChanges

Summary

  1. [RISCV] Add -mtune support (details)
  2. [RISCV] Fix -Wbraced-scalar-init after D89025 (details)
  3. [SCEV][NFC] Split out type balancing in implication engine (details)
  4. [lib/ObjectYAML] - Simplify the code that handles Content/Size fields. (details)
  5. Remove dead variable to silence compiler warning [NFC] (details)
  6. Revert "[SCEV] Use nw flag and symbolic iteration count to sharpen ranges of AddRecs" (details)
  7. Fix hidden-redecls.m test for some environments (details)
  8. Recommit "[DSE] Switch to MemorySSA-backed DSE by default." (details)
  9. [AMDGPU] Correct comment typo in AMDGPUSubtarget.h (details)
Commit cfa7094e49cfb7e37a84c0aa57c85c64c0581d17 by kito.cheng
[RISCV] Add -mtune support

- The goal of this patch is improve option compatible with RISCV-V GCC,
   -mcpu support on GCC side will sent patch in next few days.

- -mtune only affect the pipeline model and non-arch/extension related
   target feature, e.g. instruction fusion; in td file it called
   TuneFeatures, which is introduced by X86 back-end[1].

- -mtune accept all valid option for -mcpu and extra alias processor
   option, e.g. `generic`, `rocket` and `sifive-7-series`, the purpose is
   option compatible with RISCV-V GCC.

- Processor alias for -mtune will resolve according the current target arch,
   rv32 or rv64, e.g. `rocket` will resolve to `rocket-rv32` or `rocket-rv64`.

- Interaction between -mcpu and -mtune:
   * -mtune has higher priority than -mcpu for pipeline model and
     TuneFeatures.

[1] https://reviews.llvm.org/D85165

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D89025
The file was modifiedllvm/lib/Target/RISCV/RISCVTargetMachine.cpp
The file was modifiedclang/lib/Basic/Targets/RISCV.cpp
The file was modifiedllvm/lib/Support/TargetParser.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVSubtarget.cpp
The file was modifiedclang/lib/Basic/Targets/RISCV.h
The file was modifiedclang/test/Driver/riscv-cpus.c
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedllvm/lib/Target/RISCV/RISCVSubtarget.h
The file was modifiedclang/test/Misc/target-invalid-cpu-note.c
The file was modifiedllvm/include/llvm/Support/RISCVTargetParser.def
The file was modifiedllvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
The file was modifiedllvm/include/llvm/Support/TargetParser.h
Commit 5e09c45cbb2411a9636001894b546eb05a6fee3c by i
[RISCV] Fix -Wbraced-scalar-init after D89025
The file was modifiedllvm/include/llvm/Support/RISCVTargetParser.def
Commit 1eb2c6d23f991a16afaaf898aeaf8f78e97be6fc by mkazantsev
[SCEV][NFC] Split out type balancing in implication engine

We plan to introduce more advanced ways of dealing with different types.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit 3cfd9384bff476a4579c956e0c33697fee8bcf29 by grimar
[lib/ObjectYAML] - Simplify the code that handles Content/Size fields.

This is a follow-up for D89039 patch, which adds a support for
`Content`/`Size` for all sections.

Assuming that all of sections have a support of these 2 fields,
we can simplify and generalize the code.

Depends on D89039

Differential revision: https://reviews.llvm.org/D89120
The file was modifiedllvm/lib/ObjectYAML/ELFEmitter.cpp
Commit e5e4653255ff7d78d62923038ff085fae47e950b by mikael.holmen
Remove dead variable to silence compiler warning [NFC]
The file was modifiedclang/lib/AST/ExprConstant.cpp
Commit 7d3b475810baa26eb862bb555a0335eec6b988fc by nikita.ppv
Revert "[SCEV] Use nw flag and symbolic iteration count to sharpen ranges of AddRecs"

This reverts commit 905101c36025fe1c8ecdf9a20cd59db036676073.

This causes a large compile-time regression:
https://llvm-compile-time-tracker.com/compare.php?from=cc175c2cc8e638462bab74e0781e06f9b6eb5017&to=905101c36025fe1c8ecdf9a20cd59db036676073&stat=instructions
The file was modifiedllvm/test/Transforms/IndVarSimplify/promote-iv-to-eliminate-casts.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/test/Transforms/IndVarSimplify/X86/eliminate-trunc.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/no-wrap-symbolic-becount.ll
Commit 6030a075164c7016b29a67680ed5c9e7c5932109 by konstantin.schwarz
Fix hidden-redecls.m test for some environments

This test was failing in our CI environment, because Jenkins mounts the workspaces into Docker containers using their full path, i.e. /home/jenkins/workspaces/llvm-build.
We've seen permission denied errors because /home/jenkins is mounted with root permissions and the default cache directory under Linux is $HOME/.cache.

The fix is to explicitly provide the -fmodules-cache-path, which the other tests already seem to provide.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D89453
The file was modifiedclang/test/Index/hidden-redecls.m
Commit 51ff04567b2f8d06b2062bd3ed72eab2e93e4466 by flo
Recommit "[DSE] Switch to MemorySSA-backed DSE by default."

After investigation by @asbirlea, the issue that caused the
revert appears to be an issue in the original source, rather
than a problem with the compiler.

This patch enables MemorySSA DSE again.

This reverts commit 915310bf14cbac58a81fd60e0fa9dc8d341108e2.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-unreachable.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/memset-unknown-sizes.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/crash.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/lifetime.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/pr11390.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-exceptions.ll
The file was modifiedclang/test/CodeGen/thinlto-distributed-newpm.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-simple.ll
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/invariant.start.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/2011-09-06-EndOfFunction.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/memintrinsics.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/tail-byval.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-memintrinsics.ll
The file was modifiedllvm/test/Other/opt-Os-pipeline.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-throwing.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/noop-stores.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/debuginfo.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-memoryphis.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/2011-03-25-DSEMiscompile.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-loops.ll
The file was modifiedllvm/test/Other/opt-O3-pipeline-enable-matrix.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/atomic-overlapping.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-defaults.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/fence.ll
The file was modifiedllvm/test/Other/new-pm-defaults.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/fence-todo.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/atomic.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/inst-limits.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/memset-and-memcpy.ll
The file was modifiedclang/test/CodeGenObjC/exceptions.m
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/memset-missing-debugloc.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/stats.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/cs-cs-aliasing.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/combined-partial-overwrites.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/merge-stores-big-endian.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/OverwriteStoreBegin.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/overlap.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-multipath-throwing.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/libcalls.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/free.ll
The file was modifiedllvm/test/Analysis/BasicAA/modref.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/pr47285-not-overwritten-on-all-exit-paths.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/opt-pipeline.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/calloc-store.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/const-pointers.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-retcon.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-partial.ll
The file was modifiedllvm/test/Other/opt-O3-pipeline.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/memoryssa-scan-limit.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-captures.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/simple-preservation.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/OverwriteStoreEnd.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-malloc-free.ll
The file was modifiedllvm/test/Transforms/MemCpyOpt/memcpy.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/2011-09-06-MemCpy.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/dominate.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/launder.invariant.group.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/memcpy-complete-overwrite.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/int_sideeffect.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/operand-bundles.ll
The file was modifiedllvm/test/Other/new-pm-lto-defaults.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/PartialStore2.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-multipath.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/PartialStore.ll
The file was modifiedllvm/test/Other/opt-O2-pipeline.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/2016-07-17-UseAfterFree.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/mda-with-dbg-values.ll
The file was modifiedllvm/test/Transforms/Coroutines/ArgAddr.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/merge-stores.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-overlap.ll
The file was modifiedllvm/test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/atomic-todo.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/no-targetdata.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/X86/gather-null-pointer.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/debug-counter.ll
Commit e2af9bd6118eb9e64e28f36dd787da3905b8ba8b by Tony.Tye
[AMDGPU] Correct comment typo in AMDGPUSubtarget.h
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.h