Changes

Summary

  1. [lldb] Don't wait on downstream jobs (details)
Commit 1062d1df54a65b4125c8ba16fad5278f90c44d92 by Jonas Devlieghere
[lldb] Don't wait on downstream jobs
The file was modifiedzorg/jenkins/jobs/jobs/lldb-cmake (diff)

Summary

  1. [OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def (details)
  2. [libc++] NFC: Minor refactoring in std::array (details)
  3. [PowerPC] Add clang option -m[no-]pcrel (details)
  4. [libc++] Add assertions on OOB accesses in std::array when the debug mode is enabled (details)
  5. [analyzer][MallocChecker] Fix the incorrect retrieval of the from argument in realloc() (details)
  6. Clean up clang/test/CodeGenObjC/os_log.m (details)
  7. Updated synopsis of <atomic> to match what is implemented (details)
  8. AMDGPU: Change internal tracking of wave size (details)
  9. [LiveDebugValues] Remove early-exit when testing regmasks, NFC (details)
  10. [AArch64] Fix CollectLOH creating an AdrpAdd LOH when there's a live used reg (details)
  11. [AArch64][GlobalISel] Split G_GLOBAL_VALUE into ADRP + G_ADD_LOW and optimize. (details)
  12. [docs] Sketch outline for HowToUpdateDebugInfo.rst (details)
  13. [os_log][test] Remove -O1 from a test, NFC (details)
  14. Fix UB in EmulateInstructionARM64.cpp (details)
Commit 1a4fb2edcb908d6c9141036d29b46a347b1b6f18 by jhuber6
[OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def

Summary: This changes Clang's generation of OpenMP runtime functions to use the types and functions defined in OpenMPKinds and OpenMPConstants. New OpenMP runtime function information should now be added to OMPKinds.def. This patch also changed the definitions of __kmpc_push_num_teams and __kmpc_copyprivate to match those found in the runtime.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: jfb, AndreyChurbanov, openmp-commits, fghanim, hiraditya, sstefan1, cfe-commits, llvm-commits

Tags: #openmp, #clang, #llvm

Differential Revision: https://reviews.llvm.org/D80222
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
The file was modifiedclang/test/OpenMP/teams_distribute_codegen.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
The file was modifiedclang/test/OpenMP/barrier_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedllvm/test/Transforms/OpenMP/add_attributes.ll
The file was modifiedclang/test/OpenMP/nvptx_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
The file was modifiedclang/test/OpenMP/target_teams_thread_limit_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_codegen.cpp
The file was modifiedclang/test/OpenMP/openmp_win_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_num_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.h
Commit 66a14d151efb8d142e23f88166e76bfe3730adda by Louis Dionne
[libc++] NFC: Minor refactoring in std::array
The file was modifiedlibcxx/include/array
Commit 7cfded350a7edc87f4a67f84e4261e44954600d0 by lei
[PowerPC] Add clang option -m[no-]pcrel

Summary:
Add user-facing front end option to turn off pc-relative memops.
This will be compatible with gcc.

Reviewers: stefanp, nemanjai, hfinkel, power-llvm-team, #powerpc, NeHuang, saghir

Reviewed By: stefanp, NeHuang, saghir

Subscribers: saghir, wuzish, shchenz, cfe-commits, kbarton, echristo

Tags: #clang, #powerpc

Differential Revision: https://reviews.llvm.org/D80757
The file was addedclang/test/Driver/ppc-pcrel.cpp
The file was modifiedclang/lib/Basic/Targets/PPC.cpp
The file was modifiedclang/lib/Basic/Targets/PPC.h
The file was modifiedclang/include/clang/Driver/Options.td
Commit 23776a178f8379e1d9b4d79952bac916c1fa70fe by Louis Dionne
[libc++] Add assertions on OOB accesses in std::array when the debug mode is enabled

Like we do for empty std::array, make sure we have assertions in place
for obvious out-of-bounds issues in std::array when the debug mode is
enabled (which isn't by default).
The file was modifiedlibcxx/include/array
Commit 6bedfaf5200474f9a72b059f0d99dd39ece1c03e by dkszelethus
[analyzer][MallocChecker] Fix the incorrect retrieval of the from argument in realloc()

In the added testfile, the from argument was recognized as
&Element{SymRegion{reg_$0<long * global_a>},-1 S64b,long}
instead of
reg_$0<long * global_a>.
The file was modifiedclang/test/Analysis/malloc.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
Commit 959517ace1cd9e8bcd0af3be6259dd4d78a9bd84 by Akira
Clean up clang/test/CodeGenObjC/os_log.m

Don't run optimization passes at -O2 and remove unneeded #ifdef and test
cases.
The file was modifiedclang/test/CodeGenObjC/os_log.m
Commit 06aaf0b3431f29b6debbb96fdd92ada896f336ff by ogiroux
Updated synopsis of <atomic> to match what is implemented
The file was modifiedlibcxx/include/atomic
Commit a8f720925599f8e44366438f1ccb4b4e9d9375ae by Matthew.Arsenault
AMDGPU: Change internal tracking of wave size

Store the log2 wave size instead of forcing division and log2
operations when querying either.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUFeatures.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
Commit 776708b00bddb01f91b8d44f6853770966d335a5 by Vedant Kumar
[LiveDebugValues] Remove early-exit when testing regmasks, NFC

In transferRegisterDef, if the instruction has a regmask attached, we'll
check if any currently used register is clobbered by the regmask.

The early exit in this scan isn't necessary, costs a set lookup, and is
almost never taken [1]. Delete it.

[1]
http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp.html#L1136
The file was modifiedllvm/lib/CodeGen/LiveDebugValues.cpp
Commit 19ff00dab875d6184618c756df01b57acb908e82 by Amara Emerson
[AArch64] Fix CollectLOH creating an AdrpAdd LOH when there's a live used reg
between the two instructions.

If there's a pattern like:
$xA = ADRP foo @PAGE
[some killing use of reg Xb]
$Xb = ADDXri $Xa, 0, @PAGEOFF

CollectLOH would create an AdrpAdd LOH that resulted in the linker optimizing
this sequence into:
$xB = ADR foo
[some killing use of reg $Xb]
... and therefore clobbers the live $Xb register that was used by the
instruction in between.

This was discovered by a GlobalISel patch D78465 which broke up global variable
accesses into two pseudos, which in some cases could be moved apart.

Differential Revision: https://reviews.llvm.org/D80834
The file was modifiedllvm/lib/Target/AArch64/AArch64CollectLOH.cpp
The file was addedllvm/test/CodeGen/AArch64/loh-use-between-adrp-add.mir
Commit f573d489b6fccca85e0f2b3765aa17a364a4b0a8 by Amara Emerson
[AArch64][GlobalISel] Split G_GLOBAL_VALUE into ADRP + G_ADD_LOW and optimize.

The concept of G_GLOBAL_VALUE is nice and simple, but always using it as the
representation for global var addressing until selection time creates some
problems in optimizing accesses in certain code/relocation models.

The problem comes from trying to optimize adrp -> add -> load/store sequences
in the most common "small" code model. These accesses can be optimized into an
adrp -> load with the add offset being folded into the load's immediate field.
If we try to keep all global var references as a single generic instruction
then by the time we get to the complex operand trying to match these, we end up
generating an adrp at the point of use. The real issue here is that we don't
have any form of CSE during selection, so the code size will bloat from many
redundant adrp's.

This patch custom legalizes small code mode non-GOT G_GLOBALs into target ADRP
and a new "target specific generic opcode" G_ADD_LOW. We also teach the
localizer to localize these instructions via the custom hook that was added
recently. Finally, the complex pattern for indexed loads/stores is extended to
try to fold these G_ADD_LOW instructions into the load immediate.

On -O0 CTMark, we see a 0.8% geomean code size improvement. We should also see
some minor performance improvements too.

Differential Revision: https://reviews.llvm.org/D78465
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64LegalizerInfo.h
The file was modifiedllvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
The file was addedllvm/lib/Target/AArch64/AArch64InstrGISel.td
The file was modifiedllvm/test/CodeGen/AArch64/arm64-ldxr-stxr.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/combine-ext-debugloc.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/legalize-global.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-blockaddress.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
The file was modifiedllvm/test/CodeGen/AArch64/arm64-custom-call-saved-reg.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/call-translator-variadic-musttail.ll
The file was modifiedllvm/test/CodeGen/AArch64/dllimport.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/localizer.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir
Commit b429a0fef047867255e9cb65379677b2af7bb61b by Vedant Kumar
[docs] Sketch outline for HowToUpdateDebugInfo.rst

Summary:
Sketch the outline for a new document that explains how to update debug
info in various kinds of code transformations.

Some of the guidelines that belong in HowToUpdateDebugInfo.rst were in
SourceLevelDebugging.rst already under the debugify section. It seems
like the distinction between the two docs ought to be that the former is
more prescriptive, while the latter is more descriptive.

To that end I've consolidated the "how to update debug info" guidelines
which were in SourceLevelDebugging.rst into the new doc, along with the
information about using "debugify" to test transformations. Since we've
added a mir-debugify pass, I've described that as well.

Reviewers: aprantl, jmorse, chrisjackson, dsanders

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80052
The file was modifiedllvm/docs/SourceLevelDebugging.rst
The file was modifiedllvm/docs/UserGuides.rst
The file was addedllvm/docs/HowToUpdateDebugInfo.rst
Commit a66e1d2aa943959e158821be8956109cb5ef3b3b by Vedant Kumar
[os_log][test] Remove -O1 from a test, NFC
The file was modifiedclang/test/CodeGenObjCXX/os_log.mm
Commit a0b674fd7f06b86241cf19387313b508248a3868 by Adrian Prantl
Fix UB in EmulateInstructionARM64.cpp

This fixes an unhandled signed integer overflow in AddWithCarry() by
using the llvm::checkedAdd() function. Thats to Vedant Kumar for the
suggestion!

<rdar://problem/60926115>

Differential Revision: https://reviews.llvm.org/D80955
The file was modifiedlldb/unittests/CMakeLists.txt
The file was modifiedlldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
The file was addedlldb/unittests/Instruction/TestAArch64Emulator.cpp
The file was modifiedlldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
The file was addedlldb/unittests/Instruction/CMakeLists.txt

Summary

  1. [lldb] Don't wait on downstream jobs (details)
Commit 1062d1df54a65b4125c8ba16fad5278f90c44d92 by Jonas Devlieghere
[lldb] Don't wait on downstream jobs
The file was modifiedzorg/jenkins/jobs/jobs/lldb-cmake