Changes

Summary

  1. [ExpandMemCmp] Update CFG before DTU (details)
  2. Revert "[lldb] [lldb-server] Refactor ConnectToRemote()" (details)
  3. [lldb] [lldb-server] Refactor ConnectToRemote() (details)
  4. [InlineAdvisor] Add -inline-replay-scope=<Function|Module> to control replay scope (details)
  5. [SLP]Fix emission of the shrink shuffles. (details)
  6. [NewPM] Add PipelineTuningOption to eagerly invalidate analyses (details)
  7. [DebugInfo][ARM] Fix incorrect debug information for RWPI accessed globals (details)
  8. [x86] Implement a tagged-globals backend feature. (details)
  9. [RISCV] Use a lambda to avoid having the Support library depend on Option library. (details)
  10. [flang] Fold BTEST (details)
  11. [X86] Regenerate testb-je-fusion.ll with common NOFUSION/FUSION prefixes (details)
  12. [mlir][sparse] generalize sparse_tensor.convert on static/dynamic dimension sizes (details)
  13. [InlineCost] Add empty line between call sites when printing inline costs (details)
  14. Suppress some bitwise-or-of-bool warnings with explicit int cast (details)
  15. [X86] combineMulToPMADDWD - replace ASHR(X,16) -> LSHR(X,16) (details)
  16. [InlineAdvisor][NFC] Fix tests added in D110658 on (details)
  17. workflows: Migrate repo-lockdown to GitHub Actions (details)
  18. repo-lockdown: Add pr comment and fix typo (details)
  19. [CMake] Cache the compiler-rt library search results (details)
  20. [mlir][sparse] Renaming variables for consistency/clarity (details)
  21. [InlineAdvisor][NFC] Fix tests added in D110658 V2 (details)
  22. Add a "command container" hierarchy to allow users to add container nodes. (details)
  23. [RISCV] Fix typo in comment. NFC (details)
  24. [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols (details)
  25. [RISCV][TableGen] Remove HasMaskedOffOperand as a member of RVVIntrinsic. NFC (details)
Commit 54d868991ab79abc5c52cf38939f0a45292e7506 by nikita.ppv
[ExpandMemCmp] Update CFG before DTU

The applyUpdates() API requires that the CFG is already updated,
so make sure to insert the new terminator first.
The file was modifiedllvm/lib/CodeGen/ExpandMemCmp.cpp
Commit 62293e7d33ff0344b767ac66188981774c8b5197 by mgorny
Revert "[lldb] [lldb-server] Refactor ConnectToRemote()"

This reverts commit d8bc7e40ce1cdd8c1a3fac7937ce1ea85c262728.  I've
linked the wrong Differential Revision.
The file was modifiedlldb/tools/lldb-server/lldb-gdbserver.cpp
Commit a229a4aa6418bf34678a32f368324ae2c47051b7 by mgorny
[lldb] [lldb-server] Refactor ConnectToRemote()

Refactor ConnectToRemote() to improve readability and make future
changes easier:

1. Replace static buffers with std::string.
2. When handling errors, prefer reporting the actual error over dumb
   'connection status is not success'.
3. Move host/port parsing directly into reverse_connection condition
   that is its only user, and simplify it to make its purpose (verifying
   that a valid port is provided) clear.
4. Use llvm::errs() and llvm::outs() instead of fprintf().

Differential Revision: https://reviews.llvm.org/D111963
The file was modifiedlldb/tools/lldb-server/lldb-gdbserver.cpp
Commit 313c657fcea371a533ad5f3adcff44fabc6531ae by modimo
[InlineAdvisor] Add -inline-replay-scope=<Function|Module> to control replay scope

The goal is to allow grafting an inline tree from Clang or GCC into a new compilation without affecting other functions. For GCC, we're doing this by extracting the inline tree from dwarf information and generating the equivalent remarks.

This allows easier side-by-side asm analysis and a trial way to see if a particular inlining setup provides benefits by itself.

Testing:
ninja check-all

Reviewed By: wenlei, mtrofin

Differential Revision: https://reviews.llvm.org/D110658
The file was modifiedllvm/lib/Analysis/ReplayInlineAdvisor.cpp
The file was modifiedllvm/include/llvm/Analysis/ReplayInlineAdvisor.h
The file was modifiedllvm/test/Transforms/Inline/cgscc-inline-replay.ll
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
The file was modifiedllvm/test/Transforms/SampleProfile/inline-replay.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/Inliner.h
The file was modifiedllvm/include/llvm/Analysis/InlineAdvisor.h
The file was modifiedllvm/lib/Analysis/InlineAdvisor.cpp
The file was addedllvm/test/Transforms/SampleProfile/Inputs/inline-topdown-inline-all.prof
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was addedllvm/test/Transforms/SampleProfile/Inputs/inline-replay-function-scope.txt
The file was modifiedllvm/test/Transforms/SampleProfile/Inputs/inline-replay.txt
Commit b9cfa016daae725e4ed8173b431afb5e01cb80a6 by a.bataev
[SLP]Fix emission of the shrink shuffles.

Need to follow the order of the reused scalars from the
ReuseShuffleIndices mask rather than rely on the natural order.

Differential Revision: https://reviews.llvm.org/D111898
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/shrink_after_reorder2.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit b8ce97372d85ef0e6103ec8055fc5154f3bb5862 by aeubanks
[NewPM] Add PipelineTuningOption to eagerly invalidate analyses

This trades off more compile time for less peak memory usage. Right now
it invalidates all function analyses after a module->function or
cgscc->function adaptor.

https://llvm-compile-time-tracker.com/compare.php?from=1fb24fe85a19ae71b00875ff6c96ef1831dcf7e3&to=cb28ddb063c87f0d5df89812ab2de9a69dd276db&stat=instructions
https://llvm-compile-time-tracker.com/compare.php?from=1fb24fe85a19ae71b00875ff6c96ef1831dcf7e3&to=cb28ddb063c87f0d5df89812ab2de9a69dd276db&stat=max-rss

For now this is just experimental.

See comments on why this may affect optimizations.

Reviewed By: asbirlea, nikic

Differential Revision: https://reviews.llvm.org/D111575
The file was addedllvm/test/Other/new-pm-eager-invalidate.ll
The file was modifiedllvm/lib/Analysis/CGSCCPassManager.cpp
The file was modifiedllvm/lib/IR/PassManager.cpp
Commit 04dc68710ad2b30a1d3b4a2ca33005af2c9460eb by alexandroslamprineas
[DebugInfo][ARM] Fix incorrect debug information for RWPI accessed globals

When compiling for the RWPI relocation model the debug information is wrong:

* the debug location is described as { DW_OP_addr Var }
  instead of { DW_OP_constNu Var DW_OP_bregX 0 DW_OP_plus }
* the relocation type is R_ARM_ABS32 instead of R_ARM_SBREL32

Differential Revision: https://reviews.llvm.org/D111404
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
The file was modifiedllvm/include/llvm/Target/TargetLoweringObjectFile.h
The file was modifiedllvm/lib/Target/ARM/ARMTargetObjectFile.cpp
The file was addedllvm/test/DebugInfo/ARM/rwpi.ll
The file was modifiedllvm/lib/Target/ARM/ARMTargetObjectFile.h
Commit 431a5d8411952b4c9c2185303afd703123ef55cc by mascasa
[x86] Implement a tagged-globals backend feature.

The feature tells the backend to allow tags in the upper bits of global
variable addresses.  These tags will be ignored by upcoming CPUs with
the Intel LAM feature but may be used in instrumentation passes (e.g.,
HWASan).

This patch implements the feature by using @GOTPCREL relocations instead
of direct references to the locally defined global.  Thus the full
tagged address can be loaded by a single instruction:
  movq global@GOTPCREL(%rip), %rax

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D111343
The file was addedllvm/test/CodeGen/X86/tagged-globals-pic.ll
The file was modifiedllvm/lib/Target/X86/X86Subtarget.cpp
The file was modifiedllvm/lib/Target/X86/X86Subtarget.h
The file was addedllvm/test/CodeGen/X86/tagged-globals-static.ll
The file was modifiedllvm/lib/Target/X86/X86.td
Commit 1053e0b27ce135ce2da63af01aa986b9425386ee by craig.topper
[RISCV] Use a lambda to avoid having the Support library depend on Option library.

RISCVISAInfo::toFeatures needs to allocate strings using
ArgList::MakeArgString, but toFeatures lives in Support and
MakeArgString lives in Option.

toFeature only has one caller, so the simple fix is to have that
caller pass a lamdba that wraps MakeArgString to break the
dependency.

Differential Revision: https://reviews.llvm.org/D112032
The file was modifiedllvm/lib/Support/RISCVISAInfo.cpp
The file was modifiedclang/lib/Driver/ToolChains/Arch/RISCV.cpp
The file was modifiedllvm/include/llvm/Support/RISCVISAInfo.h
Commit 2f80b73e0cf03ddfebc5d0851d5fae29fe1de5d0 by pklausler
[flang] Fold BTEST

Implements constant folding for BTEST intrinsic function.

Differential Revision: https://reviews.llvm.org/D111849
The file was addedflang/test/Evaluate/fold-btest.f90
The file was modifiedflang/lib/Evaluate/fold-logical.cpp
The file was modifiedflang/include/flang/Evaluate/type.h
The file was modifiedflang/test/Evaluate/folding19.f90
Commit cdf9df65f48cc7a9e6e85f10f7575d89762727aa by llvm-dev
[X86] Regenerate testb-je-fusion.ll with common NOFUSION/FUSION prefixes
The file was modifiedllvm/test/CodeGen/X86/testb-je-fusion.ll
Commit 9d1db3d4a1970ebb88803fdd862ce1d633b46bdc by ajcbik
[mlir][sparse] generalize sparse_tensor.convert on static/dynamic dimension sizes

This revison lifts the artificial restriction on having exact matches between
source and destination type shapes. A static size may become dynamic. We still
reject changing a dynamic size into a static size to avoid the need for a
runtime "assert" on the conversion. This revision also refactors some of the
conversion code to share same-content buffers.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D111915
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
The file was modifiedmlir/test/Dialect/SparseTensor/conversion.mlir
The file was modifiedmlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
The file was modifiedmlir/test/Dialect/SparseTensor/invalid.mlir
The file was addedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_convert.mlir
Commit ecd25edfc5d908a1010fdf81419d779e8347de79 by aeubanks
[InlineCost] Add empty line between call sites when printing inline costs
The file was modifiedllvm/test/Transforms/Inline/inline-cost-annotation-pass.ll
The file was modifiedllvm/lib/Analysis/InlineCost.cpp
Commit 7cf1fef45f13991e2d3b97e0612cfb88bf906a50 by dblaikie
Suppress some bitwise-or-of-bool warnings with explicit int cast

These look like they have intentional side effects that would break from
shortcircuiting.
The file was modifiedllvm/examples/IRTransforms/SimplifyCFG.cpp
Commit a83384498bee076aca07cc88b726e6bd51926e6f by llvm-dev
[X86] combineMulToPMADDWD - replace ASHR(X,16) -> LSHR(X,16)

If we're using an ashr to sign-extend the entire upper 16 bits of the i32 element, then we can replace with a lshr. The sign bit will be correctly shifted for PMADDWD's implicit sign-extension and the upper 16 bits are zero so the upper i16 sext-multiply is guaranteed to be zero.

The lshr also has a better chance of folding with shuffles etc.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/pmulh.ll
Commit 2786dc1096a5147eb034603c32391d2281f1867c by modimo
[InlineAdvisor][NFC] Fix tests added in D110658 on

Windows which outputs "is a directory" rather than "Is a directory" on error compared to linux
The file was modifiedllvm/test/Transforms/SampleProfile/inline-replay.ll
The file was modifiedllvm/test/Transforms/Inline/cgscc-inline-replay.ll
Commit 20d397f853335e9f8e7b1f773e228bed527fd699 by tstellar
workflows: Migrate repo-lockdown to GitHub Actions

https://github.com/dessant/repo-lockdown/issues/6
The file was removed.github/lockdown.yml
The file was added.github/workflows/repo-lockdown.yml
Commit 3be1f4b8fd53b42c412c307a2a377b0fd6e8cb76 by tstellar
repo-lockdown: Add pr comment and fix typo
The file was modified.github/workflows/repo-lockdown.yml
Commit 0eed292fbae22a8856682b07e1cb968424b49941 by phosek
[CMake] Cache the compiler-rt library search results

There's a lot of duplicated calls to find various compiler-rt libraries
from build of runtime libraries like libunwind, libc++, libc++abi and
compiler-rt. The compiler-rt helper module already implemented caching
for results avoid repeated Clang invocations.

This change moves the compiler-rt implementation into a shared location
and reuses it from other runtimes to reduce duplication and speed up
the build.

Differential Revision: https://reviews.llvm.org/D88458
The file was modifiedcompiler-rt/CMakeLists.txt
The file was removedlibcxxabi/cmake/Modules/HandleCompilerRT.cmake
The file was modifiedlibcxx/CMakeLists.txt
The file was modifiedlibcxx/cmake/config-ix.cmake
The file was modifiedlibunwind/CMakeLists.txt
The file was removedcompiler-rt/cmake/Modules/HandleCompilerRT.cmake
The file was modifiedcompiler-rt/cmake/config-ix.cmake
The file was modifiedlibcxxabi/src/CMakeLists.txt
The file was modifiedlibcxxabi/cmake/config-ix.cmake
The file was modifiedlibunwind/cmake/config-ix.cmake
The file was modifiedlibcxxabi/CMakeLists.txt
The file was modifiedcompiler-rt/cmake/Modules/AddCompilerRT.cmake
The file was removedlibunwind/cmake/Modules/HandleCompilerRT.cmake
The file was modifiedlibcxx/src/CMakeLists.txt
The file was removedlibcxx/cmake/Modules/HandleCompilerRT.cmake
The file was modifiedcompiler-rt/lib/builtins/CMakeLists.txt
The file was addedcmake/Modules/HandleCompilerRT.cmake
Commit bd0cae6d16508d835d72d7500963422ede07943a by 2998727+wrengr
[mlir][sparse] Renaming variables for consistency/clarity

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D112029
The file was modifiedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
Commit 41f814589f20eb82093107ec4d3875aa0ed74cd4 by modimo
[InlineAdvisor][NFC] Fix tests added in D110658 V2

On Windows there's an *.exe suffix to opt that isn't present in Linux.
Remove the check for opt in the string
The file was modifiedllvm/test/Transforms/SampleProfile/inline-replay.ll
The file was modifiedllvm/test/Transforms/Inline/cgscc-inline-replay.ll
Commit c5011aed9c297d6ddd8ee4f77453b215aa27554a by jingham
Add a "command container" hierarchy to allow users to add container nodes.

The point is to allow users with a related set of script based commands
to organize their commands in a hierarchy in the command set, rather than
having to have only top-level commands.

Differential Revision: https://reviews.llvm.org/D110298
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
The file was modifiedlldb/include/lldb/Interpreter/CommandObjectMultiword.h
The file was modifiedlldb/source/Commands/CommandCompletions.cpp
The file was modifiedlldb/include/lldb/Interpreter/CommandInterpreter.h
The file was modifiedlldb/test/API/commands/expression/char/main.cpp
The file was modifiedlldb/test/API/functionalities/completion/TestCompletion.py
The file was modifiedlldb/source/Commands/CommandObjectCommands.cpp
The file was modifiedlldb/source/API/SBCommandInterpreter.cpp
The file was modifiedlldb/source/Commands/CommandObjectHelp.cpp
The file was addedlldb/unittests/Interpreter/TestCommandPaths.cpp
The file was modifiedlldb/include/lldb/Interpreter/CommandObject.h
The file was modifiedlldb/unittests/Interpreter/CMakeLists.txt
The file was modifiedlldb/source/Commands/Options.td
The file was addedlldb/test/API/commands/command/container/TestContainerCommands.py
The file was modifiedlldb/source/Commands/CommandObjectApropos.cpp
The file was modifiedlldb/test/API/commands/command/script/TestCommandScript.py
The file was modifiedlldb/source/Interpreter/CommandObject.cpp
The file was modifiedlldb/include/lldb/Interpreter/CommandCompletions.h
The file was modifiedlldb/source/Commands/CommandObjectMultiword.cpp
The file was modifiedlldb/test/API/commands/command/invalid-args/TestInvalidArgsCommand.py
The file was addedlldb/test/API/commands/command/container/welcome.py
Commit b477b927749707982414d06674c7d2af276e046c by craig.topper
[RISCV] Fix typo in comment. NFC
The file was modifiedclang/utils/TableGen/RISCVVEmitter.cpp
Commit 0567f0333176e476e15b7f32b463f58f7475ff22 by Anshil.Gandhi
[HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

By default clang emits complete contructors as alias of base constructors if they are the same.
The backend is supposed to emit symbols for the alias, otherwise it causes undefined symbols.
@yaxunl observed that this issue is related to the llvm options `-amdgpu-early-inline-all=true`
and `-amdgpu-function-calls=false`. This issue is resolved by only inlining global values
with internal linkage. The `getCalleeFunction()` in AMDGPUResourceUsageAnalysis also had
to be extended to support aliases to functions. inline-calls.ll was corrected appropriately.

Reviewed By: yaxunl, #amdgpu

Differential Revision: https://reviews.llvm.org/D109707
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was addedclang/test/CodeGenCUDA/amdgpu-alias-undef-symbols.cu
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/inline-calls.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
Commit 684b6265b31cabf422b01cd8937a3641c6df914f by craig.topper
[RISCV][TableGen] Remove HasMaskedOffOperand as a member of RVVIntrinsic. NFC

This value is only used by the RVVIntrinsic constructor. We don't
need it to be a member.
The file was modifiedclang/utils/TableGen/RISCVVEmitter.cpp