SuccessChanges

Summary

  1. [WebAssembly] Make SjLj lowering globals thread-local (details)
  2. [Instruction] Add dropLocation and updateLocationAfterHoist helpers (details)
  3. [lld-macho][re-land] Initial support for common symbols (details)
  4. [lld-macho][re-land] Implement and test resolution of common symbols (details)
  5. [lld] Make -z keep-text-section-prefix recognize .text.split. as a prefix. (details)
  6. Fix regex in test. (details)
  7. [OpenMP] OpenMPOpt Support for Globalization Remarks (details)
  8. [llvm] Add -bbsections-cold-text-prefix to emit cold clusters to a different section. (details)
  9. [RISCV] Merge the pipeline models for Rocket (details)
Commit 1c5a3c4d382353e582ecf4913e338599028e267f by tlively
[WebAssembly] Make SjLj lowering globals thread-local

Emscripten's longjump and exception mechanism depends on two global variables,
`__THREW__` and `__threwValue`, which are changed to be defined as thread-local
in https://github.com/emscripten-core/emscripten/pull/12056. This patch updates
the corresponding code in the WebAssembly backend to properly declare these
globals as thread-local as well.

Differential Revision: https://reviews.llvm.org/D88262
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll (diff)
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp (diff)
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll (diff)
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp (diff)
Commit dfc5a9eb57aaaac972764bf731503419284bd3dc by Vedant Kumar
[Instruction] Add dropLocation and updateLocationAfterHoist helpers

Introduce a helper which can be used to update the debug location of an
Instruction after the instruction is hoisted. This can be used to safely
drop a source location as recommended by the docs.

For more context, see the discussion in https://reviews.llvm.org/D60913.

Differential Revision: https://reviews.llvm.org/D85670
The file was modifiedllvm/test/DebugInfo/Generic/licm-hoist-debug-loc.ll (diff)
The file was modifiedllvm/test/Transforms/LICM/hoisting-preheader-debugloc.ll (diff)
The file was modifiedllvm/test/Transforms/GVN/PRE/phi-translate.ll (diff)
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp (diff)
The file was modifiedllvm/lib/IR/DebugInfo.cpp (diff)
The file was modifiedllvm/include/llvm/IR/Instruction.h (diff)
The file was modifiedllvm/lib/Transforms/Scalar/LICM.cpp (diff)
The file was modifiedllvm/unittests/IR/InstructionsTest.cpp (diff)
Commit c32e69b2ce7abfb151a87ba363ac9e25abf7d417 by jezng
[lld-macho][re-land] Initial support for common symbols

Fix earlier build break via a static_cast.

This reverts commit 8112d494d344dc0935d5c078f066a43d7c984e0c.

Differential Revision: https://reviews.llvm.org/D86909
The file was modifiedlld/MachO/SyntheticSections.h (diff)
The file was modifiedlld/MachO/Driver.cpp (diff)
The file was modifiedlld/MachO/Symbols.h (diff)
The file was modifiedlld/MachO/SymbolTable.h (diff)
The file was addedlld/test/MachO/common-symbol-coalescing.s
The file was modifiedlld/MachO/InputFiles.cpp (diff)
The file was modifiedlld/MachO/SymbolTable.cpp (diff)
Commit 5213576fa25e6deb7c649032b2893726de2f8b6c by jezng
[lld-macho][re-land] Implement and test resolution of common symbols

Earlier build break fixed in c32e69b2ce7abfb151a87ba363ac9e25abf7d417.

This reverts commit c367f93e8539c4d0bcdc86ad7ea7923e06231a93.
The file was modifiedlld/MachO/SymbolTable.cpp (diff)
The file was modifiedlld/test/MachO/nonweak-definition-override.s (diff)
The file was addedlld/test/MachO/common-symbol-resolution.s
Commit 070555c6c008c57c408c1e99025b12c5d71c9848 by snehasishk
[lld] Make -z keep-text-section-prefix recognize .text.split. as a prefix.

".text.split." holds symbols which are split out from functions in
other input sections. For example, with -fsplit-machine-functions,
placing the cold parts in .text.split instead of .text.unlikely mitigates
against poor profile inaccuracy. Techniques such as hugepage remapping can
make conservative decisions at the section granularity.

Differential Revision: https://reviews.llvm.org/D87840
The file was modifiedlld/test/ELF/text-section-prefix.s (diff)
The file was modifiedlld/ELF/Writer.cpp (diff)
The file was modifiedclang/test/Modules/asm-goto.c (diff)
Commit a22814194e8ea8d581a26992bb27f808e53bbbde by jhuber6
[OpenMP] OpenMPOpt Support for Globalization Remarks

Summary:
This patch add support for printing analysis messages relating to data
globalization on the GPU. This occurs when data is shared between the
threads in a GPU context and must be pushed to global or shared memory.

Reviewers: jdoerfert

Subscribers: guansong hiraditya llvm-commits ormris sstefan1 yaxunl

Tags: #OpenMP #LLVM

Differential Revision: https://reviews.llvm.org/D88243
The file was addedllvm/test/Transforms/OpenMP/globalization_remarks.ll
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp (diff)
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def (diff)
Commit d2696dec45cdcff791cd53b8b8288d33a0d8dddb by snehasishk
[llvm] Add -bbsections-cold-text-prefix to emit cold clusters to a different section.

This change adds an option to basic block sections to allow cold
clusters to be assigned a custom text prefix. With a custom prefix such
as ".text.split." (D87840), lld can place them in a separate output section.
The benefits are -

* Empirically shown to improve icache and itlb metrics by 3-5%
(absolute) compared to placing split parts in .text.unlikely.
* Mitigates against poor profiles, eg samplePGO profiles used with the
machine function splitter. Optimizations such as hugepage remapping can
make different decisions at the section granularity.
* Enables section granularity hotness monitoring (checking on the
decisions made during compilation vs sample data from production).

Differential Revision: https://reviews.llvm.org/D87813
The file was modifiedllvm/lib/CodeGen/BasicBlockSections.cpp (diff)
The file was modifiedllvm/include/llvm/CodeGen/BasicBlockSectionUtils.h (diff)
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-cold.ll (diff)
Commit 1e66e723eb66c19080f259ca7b4c165bfc1f8d08 by ebahapo
[RISCV] Merge the pipeline models for Rocket

Merge the 32 and 64 bit pipeline models for Rocket into a single file.

Differential Revision: https://reviews.llvm.org/D87873
The file was modifiedllvm/lib/Target/RISCV/RISCV.td (diff)
The file was removedllvm/lib/Target/RISCV/RISCVSchedRocket64.td
The file was removedllvm/lib/Target/RISCV/RISCVSchedRocket32.td
The file was addedllvm/lib/Target/RISCV/RISCVSchedRocket.td