SuccessChanges

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

Summary

  1. [libc++] Attempt to fix spurious modules-related failures in the CI (details)
  2. [libc++] Remove sysctl-based implementation of thread::hardware_concurrency() (details)
  3. [ASTImporter] Import the default argument of TemplateTypeParmDecl (details)
  4. [AIX] Add support for non var_arg extended vector ABI calling convention on AIX (details)
  5. [MC] Set the unique id of .stack_sizes to the associated .text section's (details)
  6. [AA] Split up LocationSize::unknown() (details)
  7. [BPF][NewPM] Port bpf-adjust-opt to NPM and add it to pipeline (details)
  8. [X86] Regenerate i64-to-float.ll tests with avx512 coverage (details)
  9. [clangd] AddUsing: do not crash on non-namespace using decls. (details)
  10. [libc++] Fix the Homebrew tap to install Buildkite on macOS hosts (details)
  11. [libc++] Remove ABI lists for previous releases (details)
  12. [NFC][SimplifyCFG] Add statistic to `FoldBranchToCommonDest()` fold (details)
  13. [NFC][SimplifyCFG] Add test coverage for FoldBranchToCommonDest xform with live-out bonus instuctions (details)
  14. [SimplifyCFG] FoldBranchToCommonDest: lift use-restriction on bonus instructions (details)
  15. [llvmbuildectomy] Also include component groups in llvm-config --components list (details)
  16. Revert "[SimplifyCFG] FoldBranchToCommonDest: lift use-restriction on bonus instructions" (details)
  17. [libc++] Install missing package in the Dockerfile (details)
  18. [test] Fix runtime-pointer-checking-insert-typesize.ll under NPM (details)
  19. [BasicAA] Fix BatchAA results for phi-phi assumptions (details)
  20. [clangd] Fix use of system-installed GRPC after f726101b6240a6740b3c0926af759da5e7336f8a (details)
  21. [RISCV] Add isel patterns to use SBSET for (1 << X) by using X0 as the input. (details)
  22. [LangRef] Add poison constant (details)
  23. [InlineCost] Fix indentation (NFC) (details)
  24. [DAGCombine] Adding a hook to improve the precision of fsqrt if the input is denormal (details)
  25. [clangd] Add support for within-file rename of complicated fields (details)
  26. [IndVars] LCSSA Phi users should not prevent widening (details)
Commit d7ca140c0122a55a4042fb263ea3baaa501c361d by Louis Dionne
[libc++] Attempt to fix spurious modules-related failures in the CI

I'm not 100% sure what the issue actually is since I can't reproduce it
locally, however what I explain in the comment is my best attempt to
explain what's going on.

Differential Revision: https://reviews.llvm.org/D92131
The file was modifiedlibcxx/utils/libcxx/test/features.py
Commit 3d7f19ff182b249521061cff7a908efbc68d9f54 by Louis Dionne
[libc++] Remove sysctl-based implementation of thread::hardware_concurrency()

Using sysctl requires including headers that are considered internal on
Linux, like <sys/sysctl.h> & friends. Instead, sysconf is defined by POSIX
(and we have a fallback for Windows), so all the systems we support should
be happy with just sysconf.

Differential Revision: https://reviews.llvm.org/D92135
The file was modifiedlibcxx/src/thread.cpp
Commit 3f6c856bb5ae4426a586426bca9f1ef2848a2b12 by Raphael Isemann
[ASTImporter] Import the default argument of TemplateTypeParmDecl

The test case isn't using the AST matchers for all checks as there doesn't seem to be support for
matching TemplateTypeParmDecl default arguments. Otherwise this is simply importing the
default arguments.

Also updates several LLDB tests that now as intended omit the default template
arguments of several std templates.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D92103
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
The file was modifiedlldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector-bool/TestVectorBoolFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/stack/TestStackFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was modifiedlldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
Commit 6d648e69c0949e8942cab88e7ec13f5037364338 by zarko
[AIX] Add support for non var_arg extended vector ABI calling convention on AIX

This patch enables passing non variadic vector type parameters on the caller and callee side and vector return on AIX that are passed in vector registers only.

So far, support is enabled for only the AIX extended Altivec ABI Calling convention.

Reviewed By: sfertile, DiggerLin

Differential Revision: https://reviews.llvm.org/D86476
The file was addedllvm/test/CodeGen/PowerPC/aix-vector-stack-caller.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/aix-cc-altivec.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix-vec-abi.ll
The file was removedllvm/test/CodeGen/PowerPC/aix-vector-return.ll
The file was addedllvm/test/CodeGen/PowerPC/aix-vector-stack.ll
The file was addedllvm/test/CodeGen/PowerPC/aix-cc-ext-vec-abi.ll
Commit 668da8c361fef5ada092534d4d20ea450831f6f6 by i
[MC] Set the unique id of .stack_sizes to the associated .text section's

Similar to D92113. Currently `clang -fstack-size-section -fno-unique-section-names`
sets the linked-to symbol to the first `.text`, which is:

* incorrect for COMDAT sections
* inferior for non-COMDAT sections in -ffunction-sections mode (poor --gc-sections: .stack_sizes cannot be separately discarded)

Note, if the section symbol can be referenced in more places (if the
function begin symbol does not apply), we probably should consider
defining a different BeginSymbol for sections with ",unique" linkage.

Reviewed By: grimar, jhenderson

Differential Revision: https://reviews.llvm.org/D92151
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedllvm/test/CodeGen/X86/stack-size-section-function-sections.ll
Commit 4df8efce80e373dd1e05bd4910c796a0c91383e7 by nikita.ppv
[AA] Split up LocationSize::unknown()

Currently, we have some confusion in the codebase regarding the
meaning of LocationSize::unknown(): Some parts (including most of
BasicAA) assume that LocationSize::unknown() only allows accesses
after the base pointer. Some parts (various callers of AA) assume
that LocationSize::unknown() allows accesses both before and after
the base pointer (but within the underlying object).

This patch splits up LocationSize::unknown() into
LocationSize::afterPointer() and LocationSize::beforeOrAfterPointer()
to make this completely unambiguous. I tried my best to determine
which one is appropriate for all the existing uses.

The test changes in cs-cs.ll in particular illustrate a previously
clearly incorrect AA result: We were effectively assuming that
argmemonly functions were only allowed to access their arguments
after the passed pointer, but not before it. I'm pretty sure that
this was not intentional, and it's certainly not specified by
LangRef that way.

Differential Revision: https://reviews.llvm.org/D91649
The file was modifiedllvm/test/Analysis/AliasSet/memset.ll
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LICM.cpp
The file was modifiedllvm/unittests/Analysis/MemorySSATest.cpp
The file was modifiedllvm/include/llvm/LinkAllPasses.h
The file was modifiedllvm/lib/Analysis/AliasSetTracker.cpp
The file was modifiedllvm/include/llvm/Analysis/MemorySSA.h
The file was modifiedllvm/lib/Analysis/GlobalsModRef.cpp
The file was modifiedllvm/test/Analysis/BasicAA/cs-cs.ll
The file was modifiedllvm/lib/Analysis/Lint.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
The file was modifiedllvm/lib/Analysis/MemoryDependenceAnalysis.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
The file was modifiedllvm/lib/Target/ARM/ARMParallelDSP.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
The file was modifiedllvm/test/Analysis/AliasSet/memtransfer.ll
The file was modifiedllvm/lib/Analysis/AliasAnalysisEvaluator.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
The file was modifiedllvm/lib/CodeGen/MachinePipeliner.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
The file was modifiedllvm/lib/Analysis/MemorySSA.cpp
The file was modifiedllvm/lib/Analysis/MemoryLocation.cpp
The file was modifiedllvm/test/Analysis/AliasSet/argmemonly.ll
The file was modifiedllvm/include/llvm/Analysis/AliasAnalysis.h
The file was modifiedllvm/include/llvm/Analysis/MemoryLocation.h
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/lib/Analysis/DependenceAnalysis.cpp
The file was modifiedllvm/lib/Transforms/IPO/FunctionAttrs.cpp
The file was modifiedpolly/lib/Analysis/ScopDetection.cpp
The file was modifiedllvm/lib/Analysis/ObjCARCAliasAnalysis.cpp
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
The file was modifiedllvm/lib/CodeGen/ImplicitNullChecks.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/global_smrd_cfg.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
The file was modifiedllvm/unittests/Analysis/AliasAnalysisTest.cpp
Commit 92a67e131f3d0440ef87c6038cf239e641a3167c by aeubanks
[BPF][NewPM] Port bpf-adjust-opt to NPM and add it to pipeline

Reviewed By: yonghong-song

Differential Revision: https://reviews.llvm.org/D91990
The file was modifiedllvm/lib/Target/BPF/BPFTargetMachine.cpp
The file was modifiedllvm/test/CodeGen/BPF/adjust-opt-icmp1.ll
The file was modifiedllvm/lib/Target/BPF/BPF.h
The file was modifiedllvm/lib/Target/BPF/BPFAdjustOpt.cpp
Commit 17df5373e6174f56ccdb78ffa072a954731639cc by llvm-dev
[X86] Regenerate i64-to-float.ll tests with avx512 coverage

Rename prefix from X32 to X86 as we typically use X32 for gnux32 triples
The file was modifiedllvm/test/CodeGen/X86/i64-to-float.ll
Commit 9d87739f664b5b454ff78a3016ab05a1987f0d7c by adamcz
[clangd] AddUsing: do not crash on non-namespace using decls.

Differential Revision: https://reviews.llvm.org/D92186
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TweakTests.cpp
Commit e9f7dc4f1c29eaf354d3108a0c243b3128c140bb by Louis Dionne
[libc++] Fix the Homebrew tap to install Buildkite on macOS hosts
The file was modifiedlibcxx/utils/ci/macos-ci-setup
Commit 433d0a30c6e64514f9020f34cdebe630c46dbcfb by Louis Dionne
[libc++] Remove ABI lists for previous releases

We don't actually update the ABI lists at every release -- it's too much
work, since we'd technically have to do it even for minor releases.
Furthermore, I don't think anybody uses those (I certainly don't rely
on them for anything).

Instead, it is better to rely on the ABI list changelog and the canonical
ABI list that we always keep up to date. If one wants to know what symbols
were shipped in a specific release, that can be discovered easily using
Git, which is a superior tool than keeping textual copies of old versions.
The file was removedlibcxx/lib/abi/6.0/x86_64-unknown-linux-gnu.abilist
The file was removedlibcxx/lib/abi/4.0/x86_64-unknown-linux-gnu.abilist
The file was removedlibcxx/lib/abi/4.0/x86_64-apple-darwin16.abilist
The file was removedlibcxx/lib/abi/6.0/x86_64-apple-darwin16.abilist
The file was removedlibcxx/lib/abi/3.9/x86_64-apple-darwin16.abilist
The file was removedlibcxx/lib/abi/8.0/x86_64-apple-darwin.v2.abilist
The file was removedlibcxx/lib/abi/9.0/x86_64-unknown-linux-gnu.v1.abilist
The file was removedlibcxx/lib/abi/5.0/x86_64-unknown-linux-gnu.abilist
The file was modifiedlibcxx/lib/abi/CHANGELOG.TXT
The file was removedlibcxx/lib/abi/9.0/x86_64-apple-darwin.v2.abilist
The file was removedlibcxx/lib/abi/9.0/x86_64-apple-darwin.v1.abilist
The file was modifiedlibcxx/NOTES.TXT
The file was removedlibcxx/lib/abi/8.0/x86_64-unknown-linux-gnu.v1.abilist
The file was removedlibcxx/lib/abi/3.9/x86_64-linux-gnu.abilist
The file was removedlibcxx/lib/abi/5.0/x86_64-apple-darwin16.abilist
The file was removedlibcxx/lib/abi/8.0/x86_64-apple-darwin.v1.abilist
Commit 65db7d38e0502db7b5753e974e630fd1663cb65b by lebedev.ri
[NFC][SimplifyCFG] Add statistic to `FoldBranchToCommonDest()` fold
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 394b4fdb41542f695ed478c33275c54afb081efe by lebedev.ri
[NFC][SimplifyCFG] Add test coverage for FoldBranchToCommonDest xform with live-out bonus instuctions

The uses of the bonus instructions should not be preventing the transformation.
The file was addedllvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
Commit 2245fb8aaa1c1f85f53f7b19a1ee3ac69b1a1dfe by lebedev.ri
[SimplifyCFG] FoldBranchToCommonDest: lift use-restriction on bonus instructions

1. It doesn't make sense to enforce that the bonus instruction
   is only used once in it's basic block. What matters is
   whether those user instructions fit within our budget, sure,
   but that is another question.
2. It doesn't make sense to enforce that said bonus instructions
   are only used within their basic block. Perhaps the branch
   condition isn't using the value computed by said bonus instruction,
   and said bonus instruction is simply being calculated
   to be used in successors?

So iff we can clone bonus instructions, to lift these restrictions,
we just need to carefully update their external uses
to use the new cloned instructions.

Notably, this transform (even without this change) appears to be
poison-unsafe as per alive2, but is otherwise (including the patch) legal.

We don't introduce any new PHI nodes, but only "move" the instructions
around, i'm not really seeing much potential for extra cost modelling
for the transform, especially since now we allow at most one such
bonus instruction by default.

This causes the fold to fire +11.4% more (13216 -> 14725)
as of vanilla llvm test-suite + RawSpeed.

The motivational pattern is IEEE-754-2008 Binary16->Binary32
extension code:
https://github.com/darktable-org/rawspeed/blob/ca57d77fb2ba81f21fc712cfac26e54f46406473/src/librawspeed/common/FloatingPoint.h#L115-L120
^ that should be a switch, but it is not now: https://godbolt.org/z/bvja5v
That being said, even thought this seemed like this would fix it: https://godbolt.org/z/xGq3TM
apparently that fold is happening somewhere else afterall,
so something else also has a similar 'artificial' restriction.
The file was modifiedllvm/test/Transforms/LoopUnroll/peel-loop-inner.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
Commit 1de56d6d13c083c996dfd44a32041dacae037d66 by sguelton
[llvmbuildectomy] Also include component groups in llvm-config --components list

Without this change mesa fails while looking for llvm components like amdgpu, engine or native:

    Run-time dependency LLVM (modules: amdgpu(missing), bitreader, bitwriter, core, engine(missing), executionengine, instcombine, ipo, mcdisassembler, mcjit, native(missing), scalaropts, transformutils, coroutines)
    Looking for a fallback subproject for the dependency llvm (modules: bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts, transformutils, instcombine, amdgpu, native, bitreader, ipo)

This change adds component groups (like all-targets, engine, native, amdgpu) to the "all" component.

Differential Revision: https://reviews.llvm.org/D92158
The file was modifiedllvm/cmake/modules/LLVM-Build.cmake
Commit f3abd54958ab90ba7c100d3fa936a3ce0dd2ad04 by lebedev.ri
Revert "[SimplifyCFG] FoldBranchToCommonDest: lift use-restriction on bonus instructions"

Many bots are unhappy, at the very least missed a few codegen tests,
and possibly this has a logic hole inducing a miscompile
(will be really awesome to have ready reproducer..)

Need to investigate.

This reverts commit 2245fb8aaa1c1f85f53f7b19a1ee3ac69b1a1dfe.
The file was modifiedllvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/LoopUnroll/peel-loop-inner.ll
Commit 76667c768e6403e71718340a946e6f2f356bf745 by Louis Dionne
[libc++] Install missing package in the Dockerfile

python3-distutils is required to use `import distutils.spawn`, which is
required by the ABI list targets.
The file was modifiedlibcxx/utils/ci/Dockerfile
Commit f342ed1cd16a56f2a349caba4319d1c3df4cc99a by aeubanks
[test] Fix runtime-pointer-checking-insert-typesize.ll under NPM

Also clean it up a bit.
The file was modifiedllvm/test/Analysis/LoopAccessAnalysis/runtime-pointer-checking-insert-typesize.ll
Commit 8166ed1a7a26ee8ea8db9005cc8ee5d156adad9b by nikita.ppv
[BasicAA] Fix BatchAA results for phi-phi assumptions

Add a flag that disables caching when computing aliasing results
potentially based on a phi-phi NoAlias assumption. We'll still
insert cache entries temporarily to catch infinite recursion,
but will drop them afterwards, so they won't persist in BatchAA.

Differential Revision: https://reviews.llvm.org/D91936
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h
The file was modifiedllvm/unittests/Analysis/AliasAnalysisTest.cpp
Commit f095ac11a9550530a4a54298debb8b04b36422be by sam.mccall
[clangd] Fix use of system-installed GRPC after f726101b6240a6740b3c0926af759da5e7336f8a

We need a real target now, and it was only being created if grpc was
built from source or imported from homebrew.

Differential Revision: https://reviews.llvm.org/D92107
The file was modifiedllvm/cmake/modules/FindGRPC.cmake
Commit 5836e52063763e5d1e5f6e08b84a5bf832d0da5d by craig.topper
[RISCV] Add isel patterns to use SBSET for (1 << X) by using X0 as the input.
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbs.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbs.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoB.td
Commit 2e32c49d974fdacf8fb598c99782cd7256478a28 by aqjune
[LangRef] Add poison constant

This patch adds a description about the newly added poison constant to LangRef.

Differential Revision: https://reviews.llvm.org/D92162
The file was modifiedllvm/docs/LangRef.rst
Commit 60e749aa2348e43e6f66a7f4c44a58006a534837 by kazu
[InlineCost] Fix indentation (NFC)
The file was modifiedllvm/lib/Analysis/InlineCost.cpp
Commit 4d83aba4228ecb7dfefaf10a36a35f7299467819 by qshanz
[DAGCombine] Adding a hook to improve the precision of fsqrt if the input is denormal

For now, we will hardcode the result as 0.0 if the input is denormal or 0. That will
have the impact the precision. As the fsqrt added belong to the cold path of the
cmp+branch, it won't impact the performance for normal inputs for PowerPC, but improve
the precision if the input is denormal.

Reviewed By: Spatel

Differential Revision: https://reviews.llvm.org/D80974
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrVSX.td
The file was modifiedllvm/test/CodeGen/PowerPC/fma-mutate.ll
The file was modifiedllvm/test/CodeGen/PowerPC/recipest.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
Commit abfcb606c2f86da6dbf25bc260e4d716bc87eaf0 by kbobyrev
[clangd] Add support for within-file rename of complicated fields

This was originally a part of D71880 but is separated for simplicity and ease
of reviewing.

Fixes: https://github.com/clangd/clangd/issues/582

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D91952
The file was modifiedclang-tools-extra/clangd/unittests/RenameTests.cpp
The file was modifiedclang-tools-extra/clangd/refactor/Rename.cpp
Commit faf183874cb6f434815e2b1c0b59cd452219f89e by mkazantsev
[IndVars] LCSSA Phi users should not prevent widening

When widening an IndVar that has LCSSA Phi users outside
the loop, we can safely widen it as usual and then truncate
the result outside the loop without hurting the performance.

Differential Revision: https://reviews.llvm.org/D91593
Reviewed By: skatkov
The file was modifiedllvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyIndVar.cpp