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


  1. Add LLD to slow builder sanitizer bot. (details)
Commit 7b38316441a50c2a3f48cd3e5691c85b7234085f by 31459023+hctim
Add LLD to slow builder sanitizer bot.
Bots started spuriously failing this morning because the gcc-built
bootstrap clang then is used to check-*san. Some of the check-*san
suites (like check-hwasan) use -fuse-ld=lld in their lit config, and we
didn't build LLD.
Fix this by building LLD when we build the bootstrap clang.
The file was modifiedzorg/buildbot/builders/sanitizers/

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


  1. [LoopPred] Fix two subtle issues found by inspection (details)
  2. [lldb] Record framework build path and use it everywhere (details)
  3. [Analysis] Attribute deref/deref_or_null should not prevent tail call (details)
  4. [WC] Fix a subtle bug in our definition of widenable branch (details)
  5. [JumpThreading] Factor out code to clone instructions (NFC) (details)
  6. [Orc] Fix iterator usage after remove (details)
  7. [LLDB] Fix handling for the clang name mangling extension for block (details)
  8. Testuite: Support Asan test with remote testing (details)
  9. [JITLink] Refactor EH-frame handling to support eh-frames with existing (details)
  10. [ConstantRange] TestAddWithNo*WrapExhaustive: check that all overflow (details)
  11. [ConstantRange] Cleanup addWithNoWrap() by just piggybacking on (details)
  12. [ConstantRange] Add `subWithNoWrap()` method (details)
  13. [docs] Fix references to a renamed flag. (details)
  14. [lldb] Remove dead code from STLUtils.h (details)
  15. [test] Fix apple_simulator_test decorator when simulators are (details)
  16. [lldb] Mark ASan & TSan as test dependencies (details)
  17. When lowering calls and tail calls in AArch64, the register mask and (details)
  18. gn build: (manually) merge b5913e6d2f (details)
  19. [LoopPred] Selectively disable to preserve test cases (details)
  20. [LoopPred] Enable new transformation by default (details)
  21. unwind: reflow some of the build rules (NFC) (details)
  22. unwind: restore the LINKER_LANGUAGE (details)
  23. [AMDGPU] Add handling of 160 bit registers in analyzeResourceUsage (details)
  24. [LLDB] Adding caching to libc++ std::function formatter for lookups that (details)
  25. Temporarily Revert: (details)
  26. TableGen: Remove assert that pattern results match input number (details)
  27. AMDGPU: Select global atomicrmw fadd (details)
  28. Revert "Introduce llvm-install-name-tool" (details)
  29. Revert "gn build: (manually) merge b5913e6d2f" (details)
Commit 9bfa5ab3d1982a7cef60ee00b935f4ddc89fc98e by listmail
[LoopPred] Fix two subtle issues found by inspection
This patch fixes two issues noticed by inspection when going to enable
the loop predication code in IndVarSimplify.
Issue 1 - Both the LoopPredication transform, and the already on by
default optimizeLoopExits transform, modify the exit count of the exits
they modify. (either to 0 or Infinity) Looking at the code more closely,
this was not reflected into SCEV and we were instead running later
transforms with incorrect SCEVs. Fixing this requires forgetting the
loop, weakening a too strong assert, and updating SCEV to not pessimize
results when a loop is provable untaken. I haven't been able to find a
test case to demonstrate the miscompile.
Issue 2 - For modules without a data layout, we can end up with unsized
pointer typed exit counts. Just bail out of this case.
I think these are the last two issues which need addressed before we
enable this by default. The code has already survived a decent amount of
fuzzing without revealing either of the above.
Differential Revision:
The file was modifiedllvm/lib/Transforms/Scalar/IndVarSimplify.cpp
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 77a60f0df673074a2c9276498f95a9eaadeece56 by hhb
[lldb] Record framework build path and use it everywhere
This avoids config time dependencies on liblldb. And enables other
The file was modifiedlldb/cmake/modules/LLDBFramework.cmake
The file was modifiedlldb/tools/debugserver/source/CMakeLists.txt
The file was modifiedlldb/cmake/modules/AddLLDB.cmake
The file was modifiedlldb/cmake/modules/LLDBConfig.cmake
The file was modifiedlldb/test/API/CMakeLists.txt
The file was modifiedlldb/tools/lldb-vscode/CMakeLists.txt
The file was modifiedlldb/CMakeLists.txt
The file was modifiedlldb/tools/driver/CMakeLists.txt
Commit 62ad2128255877ed41c714366861eee9c1da30dd by Dávid Bolvanský
[Analysis] Attribute deref/deref_or_null should not prevent tail call
The file was addedllvm/test/CodeGen/X86/tail-call-deref.ll
The file was modifiedllvm/lib/CodeGen/Analysis.cpp
Commit 686f449e3d4ecad6413427aef35557f5adac100c by listmail
[WC] Fix a subtle bug in our definition of widenable branch
We had a subtle, but nasty bug in our definition of a widenable branch,
and thus in the transforms which used that utility. Specifically, we
returned true for any branch which included a widenable condition within
it's condition, regardless of whether that widenable condition also had
other uses.
The problem is that the result of the WC() call is defined to be one
particular value. As such, all users must agree as to what that value
is. If we widen a branch without also updating *all other users* of the
WC in the same way, we have broken the required semantics.
Most of the textual diff is updating existing transforms not to leave
dead uses hanging around. They're largely NFC as the dead instructions
would be immediately deleted by other passes. The reason to make these
changes is so that the transforms preserve the widenable branch form.
In practice, we don't get bitten by this only because it isn't
profitable to CSE WC() calls and the lowering pass from guards uses
distinct WC calls per branch.
Differential Revision:
The file was modifiedllvm/lib/Transforms/Scalar/LoopPredication.cpp
The file was modifiedllvm/lib/Transforms/Scalar/GuardWidening.cpp
The file was modifiedllvm/lib/Analysis/GuardUtils.cpp
The file was modifiedllvm/test/Transforms/GuardWidening/mixed_guards.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/wc-widen-block.ll
The file was modifiedllvm/test/Transforms/GuardWidening/basic_widenable_condition_guards.ll
Commit f0f73ed8b004d213a3710b7b850e09c5bbd8e93d by kazu
[JumpThreading] Factor out code to clone instructions (NFC)
Summary: This patch factors out code to clone instructions -- partly for
readability and partly to facilitate an upcoming patch of my own.
Reviewers: wmi
Subscribers: hiraditya, jfb, llvm-commits
Tags: #llvm
Differential Revision:
The file was modifiedllvm/include/llvm/Transforms/Scalar/JumpThreading.h
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
Commit 007d173e2e0c29903bc17a9d5108f531a6f2ea4d by alexandre.ganea
[Orc] Fix iterator usage after remove
Differential Revision:
The file was modifiedllvm/lib/ExecutionEngine/Orc/Core.cpp
Commit 83393d27af6631d1df5c549feb214abbdd1d6054 by shafik
[LLDB] Fix handling for the clang name mangling extension for block
Add support for clangs  mangling extension for block invocations.
Differential Revision:
The file was modifiedlldb/source/Core/Mangled.cpp
The file was modifiedlldb/include/lldb/Core/Mangled.h
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
The file was modifiedlldb/unittests/Core/MangledTest.cpp
Commit 8243918f43c6eedc2b018c1edc9c6b72fe9b3c1e by Fred Riss
Testuite: Support Asan test with remote testing
To do so, we need to register the sanitizer libraries with the target so
that they get uploaded before running. This patch adds a helper to the
test class to this effect.
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/asan/
The file was modifiedlldb/packages/Python/lldbsuite/test/
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/asan/
Commit 76aee8a389447409905c58b178b0554c9bae8a0a by Lang Hames
[JITLink] Refactor EH-frame handling to support eh-frames with existing
Some targets (E.g. MachO/arm64) use relocations to fix some CFI record
fields in the eh-frame section. When relocations are used the initial
(pre-relocation) content of the eh-frame section can no longer be
interpreted by following the eh-frame specification. This causes errors
in the existing eh-frame parser.
This patch moves eh-frame handling into two LinkGraph passes that are
run after relocations have been parsed (but before they are applied).
The first] pass breaks up blocks in the eh-frame section into
per-CFI-record blocks, and the second parses blocks of (potentially
multiple) CFI records and adds the appropriate edges to any CFI fields
that do not have existing relocations. These passes can be run
independently of one another. By handling eh-frame splitting/fixing with
LinkGraph passes we can both re-use existing relocations for CFI record
fields and avoid applying eh-frame fixups before parsing the section
(which would complicate the linker and require extra temporary
allocations of working memory).
The file was addedllvm/test/ExecutionEngine/JITLink/AArch64/MachO_arm64_ehframe.test
The file was addedllvm/test/ExecutionEngine/JITLink/AArch64/Inputs/MachO_arm64_ehframe.o
The file was modifiedllvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
The file was modifiedllvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
The file was modifiedllvm/lib/ExecutionEngine/JITLink/EHFrameSupportImpl.h
The file was modifiedllvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
The file was modifiedllvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
The file was modifiedllvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
Commit b5ddcb9f1e41b142f89110fc9be78b3c6997f090 by lebedev.ri
[ConstantRange] TestAddWithNo*WrapExhaustive: check that all overflow
means empty set
As disscussed in / that is an implied postcondition, but
it's not really fully tested.
The file was modifiedllvm/unittests/IR/ConstantRangeTest.cpp
Commit 365d729e1075a9391b7520306d8d9beee84d52b5 by lebedev.ri
[ConstantRange] Cleanup addWithNoWrap() by just piggybacking on
As discussed in that happens to work as
intended, and returns empty set if there is always an overflow because
we get lucky with intersection. Since there's now an explicit test for
that, let's prefer cleaner code.
The file was modifiedllvm/lib/IR/ConstantRange.cpp
Commit 7fbe5d4b2ab905792158669149ae4f547761ac9c by lebedev.ri
[ConstantRange] Add `subWithNoWrap()` method
Summary: Much like D67339, adds ConstantRange handling for when we know
no-wrap behavior of the `sub`.
Unlike addWithNoWrap(), we only get lucky re returning empty set for
signed wrap. For unsigned, we must perform overflow check manually.
A patch that makes use of this in LVI (CVP) to be posted later.
Reviewers: nikic, shchenz, efriedma
Reviewed By: nikic
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision:
The file was modifiedllvm/unittests/IR/ConstantRangeTest.cpp
The file was modifiedllvm/lib/IR/ConstantRange.cpp
The file was modifiedllvm/include/llvm/IR/ConstantRange.h
Commit baaa097360a0e92164119574febcc5613221fa0d by Lang Hames
[docs] Fix references to a renamed flag.
The -use-mcjit option was replaced with -jit-kind=mcjit a while back.
This patch updates the docs to reflect that.
Patch by Yu Jian. Thanks Jian!
The file was modifiedllvm/docs/DebuggingJITedCode.rst
Commit cfca0056f054602dd46d1224c63d2275a4ecd90f by Jonas Devlieghere
[lldb] Remove dead code from STLUtils.h
The file was modifiedlldb/source/Commands/CommandObjectSource.cpp
The file was modifiedlldb/source/Commands/CommandObjectCommands.h
The file was modifiedlldb/source/Commands/CommandObjectSource.h
The file was modifiedlldb/include/lldb/Core/STLUtils.h
The file was modifiedlldb/source/Commands/CommandObjectBreakpoint.h
The file was modifiedlldb/source/API/SBTarget.cpp
Commit a6b5daa701d3a276ace90c688f913b96d396bed1 by apl
[test] Fix apple_simulator_test decorator when simulators are
In the case where xcodebuild fails as you set up simulator tests, you
would fail because `feature` is never defined.
The file was modifiedlldb/packages/Python/lldbsuite/test/
Commit 703c97be2492dfb0e4f3138e47fc1fe71c91adfa by Jonas Devlieghere
[lldb] Mark ASan & TSan as test dependencies
Without asan and tsan as test dependencies, you might end up with a
clang that points to sanitizer runtime library that hasn't been build
The file was modifiedlldb/test/CMakeLists.txt
Commit 8d694a45ab6626a5768240ca370774c72722ca7c by echristo
When lowering calls and tail calls in AArch64, the register mask and
return value location depends on the calling convention of the callee.
`F.getCallingConv()`, however, is the caller CC. Correct it to the
callee CC from `CallLoweringInfo`.
Fixes PR43449
Patch by Shu-Chun Weng!
The file was modifiedllvm/lib/Target/AArch64/AArch64CallLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
The file was addedllvm/test/CodeGen/AArch64/arm64-preserve-most.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/call-translator-tail-call.ll
Commit c52efdc52cef2597a1d21595a9685e2f798025b8 by thakis
gn build: (manually) merge b5913e6d2f
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-objcopy/
Commit 20cbb6cdf8b33dd3732b9ef8702e7946b6d8c739 by listmail
[LoopPred] Selectively disable to preserve test cases
I'm about to enable the new loop predication transform by default.  It
has the effect of completely destroying many read only loops - which
happen to be a super common idiom in our test cases.  So as to preserve
test coverage of other transforms, disable the new transform where it
would cause sharp test coverage regressions.
(This is semantically part of the enabling commit.  It's committed
separate to ease revert if the actual flag flip gets reverted.)
The file was modifiedllvm/test/Transforms/IndVarSimplify/lftr.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/pr39673.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/eliminate-trunc.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/lftr-reuse.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/sink-from-preheader.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/lftr-dead-ivs.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/no-iv-rewrite.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/pr24356.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/lftr-pr20680.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/pr38674.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/loop-invariant-conditions.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/replace-loop-exit-folds.ll
Commit 8748be7750920b7bd669a47be72a81ee7f1d305c by listmail
[LoopPred] Enable new transformation by default
The basic idea of the transform is to convert variant loop exit
conditions into invariant exit conditions by changing the iteration on
which the exit is taken when we know that the trip count is
unobservable.  See the original patch which introduced the code for a
more complete explanation.
The individual parts of this have been reviewed, the result has been
fuzzed, and then further analyzed by hand, but despite all of that, I
will not be suprised to see breakage here.  If you see problems, please
don't hesitate to revert - though please do provide a test case.  The
most likely class of issues are latent SCEV bugs and without a reduced
test case, I'll be essentially stuck on reducing them.
(Note: A bunch of tests were opted out of the new transform to preserve
coverage.  That landed in a previous commit to simplify revert cycles if
they turn out to be needed.)
The file was modifiedllvm/test/Transforms/LoopUnroll/scevunroll.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/exit_value_tests.ll
The file was modifiedllvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Commit aa582e3648cc4036aec3b9302ab93bfe9929d19c by Saleem Abdulrasool
unwind: reflow some of the build rules (NFC)
Reflow the CMake properties to take less vertical space.  This just
makes it easier to read.  NFC.
The file was modifiedlibunwind/src/CMakeLists.txt
Commit e74e61ff297e81c0a9bda54037033fc40fc76e1d by Saleem Abdulrasool
unwind: restore the LINKER_LANGUAGE
Have CMake treat the unwind libraries as C libraries rather than C++.
There is no C++ runtime dependency at runtime.  This ensures that we do
not accidentally end up with a link against the C++ runtime.
We need to explicitly reset the implicitly linked libraries for C++ to
ensure that we do not have CMake force the link against the C++ runtime.
This adjustment should enable the NetBSD bots to be happy with this
The file was modifiedlibunwind/src/CMakeLists.txt
Commit d17bcf2bb9195c7d6ac8d8cf9faaa103bfd40ef2 by Stanislav.Mekhanoshin
[AMDGPU] Add handling of 160 bit registers in analyzeResourceUsage
This was omitted. Also SReg_96Reg missed IsSGPR assignment.
Differential Revision:
The file was modifiedllvm/test/CodeGen/AMDGPU/call-graph-register-usage.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
Commit e18f4db208baa84800cf304d7e15f2ee7343cd05 by shafik
[LLDB] Adding caching to libc++ std::function formatter for lookups that
require scanning symbols
Performance issues lead to the libc++ std::function formatter to be
disabled. This change is the first of two changes that should address
the performance issues and allow us to enable the formatter again. In
some cases we end up scanning the symbol table for the callable wrapped
by std::function for those cases we will now cache the results and used
the cache in subsequent look-ups. This still leaves a large cost for the
initial lookup which will be addressed in the next change.
Differential Revision:
The file was modifiedlldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/
The file was modifiedlldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
Commit e511c4b0dff1692c267addf17dce3cebe8f97faa by echristo
Temporarily Revert:
"[SLP] Generalization of stores vectorization."
"[SLP] Fix -Wunused-variable. NFC"
"[SLP] Vectorize jumbled stores."
As they're causing significant (10-30x) compile time regressions on
vectorizable code.
The primary cause of the compile-time regression is
This reverts commits:
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-add-ssat.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-sub-ssat.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/shift-lshr.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/pr35497.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/bitreverse.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/cttz.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/different-vec-widths.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/store-jumbled.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/shift-ashr.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/ctlz.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-add-usat.ll
The file was removedllvm/test/Transforms/SLPVectorizer/X86/jumbled_store_crash.ll
The file was modifiedllvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-fix.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-mul.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-add.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/ctpop.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-sub.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-sub-usat.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/shift-shl.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/stores_vectorize.ll
Commit 9f9f42dbc5f54bbee6785a62acc8cd7e5ed12ea5 by Matthew.Arsenault
TableGen: Remove assert that pattern results match input number
AMDGPU has some atomic instructions that do not return the previous
result, and can only be selected if there are no uses. The source
pattern will only match if the use is empty, so it should be safe to
discard the result.
The file was modifiedllvm/utils/TableGen/DAGISelMatcherGen.cpp
Commit e16a71382d689c39561e94b13af2feb4bf1b15cc by Matthew.Arsenault
AMDGPU: Select global atomicrmw fadd
This only works if there is no use of the return value.
The file was modifiedllvm/lib/Target/AMDGPU/
The file was modifiedllvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-rmw-fadd.ll
The file was addedllvm/test/CodeGen/AMDGPU/global-atomics-fp.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/
Commit 7d83c2989092fbfc4afb41bed43848dbc69e35d6 by alexshap
Revert "Introduce llvm-install-name-tool"
This reverts commit b5913e6d2f6d13fb753df701619731ca11936316.
The file was modifiedllvm/tools/llvm-objcopy/llvm-objcopy.cpp
The file was modifiedllvm/tools/llvm-objcopy/CopyConfig.cpp
The file was removedllvm/test/tools/llvm-objcopy/MachO/Inputs/x86_64.yaml
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
The file was removedllvm/tools/llvm-objcopy/
The file was removedllvm/test/tools/llvm-objcopy/MachO/install-name-tool-help-message.test
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.cpp
The file was removedllvm/test/tools/llvm-objcopy/MachO/Inputs/i386.yaml
The file was modifiedllvm/tools/llvm-objcopy/CMakeLists.txt
The file was removedllvm/test/tools/llvm-objcopy/MachO/install-name-tool-add-rpath.test
The file was modifiedllvm/tools/llvm-objcopy/CopyConfig.h
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.h
The file was removedllvm/test/tools/llvm-objcopy/MachO/install-name-tool-version.test
Commit fe6fee9445d8d7037aee0de5e04aa0ba97f7d802 by thakis
Revert "gn build: (manually) merge b5913e6d2f"
This reverts commit c52efdc52cef2597a1d21595a9685e2f798025b8, because
b5913e6d2f got reverted.
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-objcopy/