SuccessChanges

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

Summary

  1. [analyzer] Remove forbidden characters from a filename for a graph dump on Windows (details)
  2. Pre-commit SLP test. NFC. (details)
  3. [ARC] Add missing return statement (details)
  4. [DebugInfo] Update MachineInstr to help support variadic DBG_VALUE instructions (details)
  5. [AMDGPU] Generate test checks (details)
  6. Pre-commited test update. NFC. (details)
  7. [MLIR] Remove TableGen redundant calls to native calls when creating new operations in DRR TableGen files (details)
  8. [flang] Finish adding AbstractConverter.h (details)
  9. [DSE,MSSA] Add additional tests with non-removable stores (NFC). (details)
  10. [NPM] Bail out when -foo and --passes=foo are both specified (details)
  11. [MCParser] Support quoted section name for COFF (details)
  12. [DSE,MSSA] Reorder DSE blocking checks. (details)
  13. [VectorCombine] make helper function for shift-shuffle; NFC (details)
  14. [lldb/Lua] Recognize "quit" as a way to exit the script interpreter. (details)
  15. [flang] Shape analysis for result of MATMUL (details)
  16. [sve][acle] Add SVE BFloat16 extensions. (details)
  17. [PGO][PGSO] Enable non-cold size opts under partial profile sample PGO. (details)
  18. Add support of __builtin_expect_with_probability (details)
  19. [clang-tidy] llvm-twine-local ignores parameters (details)
  20. [clang-tidy] RenamerClangTidy wont emit fixes in scratch space (details)
  21. [ARM][BFloat] Implement bf16 get/set_lane without casts to i16 vectors (details)
  22. [llvm] Fix typo in test case comment (NFC) (details)
  23. [mlir] Fix a doc link in LinalgBase.td (details)
  24. [flang] Fix bug checking SAVE attribute (details)
  25. [X86] Calculate the needed size of the feature arrays in _cpu_indicator_init and getHostCPUName using the size of the feature enum. (details)
  26. [X86] Remove encoding value from the X86_FEATURE and X86_FEATURE_COMPAT macro. NFCI (details)
  27. Revert "[X86] Calculate the needed size of the feature arrays in _cpu_indicator_init and getHostCPUName using the size of the feature enum." (details)
  28. [SVE] Remove calls to VectorType::getNumElements from WebASM (details)
  29. Revert "[X86][SSE] MatchVectorAllZeroTest - handle OR vector reductions" (details)
  30. Use std::make_tuple instead initializer list (details)
  31. [HIP] Move HIP Linking Logic into HIP ToolChain (details)
  32. Add Statically Linked Libraries (details)
  33. llvm-nm: Implement --special-syms. (details)
  34. Fix the verification of DIEs with DW_AT_ranges. (details)
  35. Recommit "[X86] Calculate the needed size of the feature arrays in _cpu_indicator_init and getHostCPUName using the size of the feature enum." (details)
  36. [mlir][ods] Allow filtering of ops (details)
  37. [Coroutines] Ensure co_await promise.final_suspend() does not throw (details)
  38. Fix dynamic alloca detection in CloneBasicBlock (details)
  39. - Add hasNItemsOrLess and container variants of hasNItems, hasNItemsOrMore, and hasNItemsOrLess (details)
  40. [SVE] Remove calls to VectorType::getNumElements from ARM (details)
  41. add copy of MLIR .clang-tidy to squelch noise in phabricator reviews (details)
  42. [WebAssembly] Add support for externalref to MC and wasm-ld (details)
  43. [MLIR][NFC] Adopt hasNItems() for SizedRegion predicate (details)
  44. Add -ast-dump-decl-types flag to include types of value and type (details)
  45. Fix multilevel deduction where an outer pack is used in the type of an (details)
  46. [llvm-install-name-tool] Implement delete_rpath option (details)
Commit be9c5818351bf99a193edbc82e4dc25ab5206a44 by dpetrov
[analyzer] Remove forbidden characters from a filename for a graph dump on Windows

Summary:
Windows forbidden file path characters are used in a field `file`, while creating a dump `dot` file using an argument -analyzer-dump-egraph. It specifically relates to angle brackets when using `<scratch space>`, `<built-in>`, `<command line>` values in filenames. It causes that script exploded-graph-rewriter.py incorrectly parses the dump.

Fix:
Remove forbidden characters from filename for Windows platform, when creating graph dump file.

Differential Revision: https://reviews.llvm.org/D82103
The file was modifiedclang/include/clang/Basic/JsonSupport.h
The file was addedclang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp
Commit 736b0d0cf092d3bd6082fac4f3731e9eb70ecf33 by Stanislav.Mekhanoshin
Pre-commit SLP test. NFC.
The file was addedllvm/test/Transforms/SLPVectorizer/slp-max-phi-size.ll
Commit 597a9070b52d235fac40ef55b9d16bf77d8f4dd7 by gchatelet
[ARC] Add missing return statement
The file was modifiedllvm/lib/Target/ARC/ARCAsmPrinter.cpp
Commit 539381da26096df54ccf862088c8242498a7dcae by stozer
[DebugInfo] Update MachineInstr to help support variadic DBG_VALUE instructions

Following on from this RFC[0] from a while back, this is the first patch towards
implementing variadic debug values.

This patch specifically adds a set of functions to MachineInstr for performing
operations specific to debug values, and replacing uses of the more general
functions where appropriate. The most prevalent of these is replacing
getOperand(0) with getDebugOperand(0) for debug-value-specific code, as the
operands corresponding to values will no longer be at index 0, but index 2 and
upwards: getDebugOperand(x) == getOperand(x+2). Similar replacements have been
added for the other operands, along with some helper functions to replace
oft-repeated code and operate on a variable number of value operands.

[0] http://lists.llvm.org/pipermail/llvm-dev/2020-February/139376.html<Paste>

Differential Revision: https://reviews.llvm.org/D81852
The file was modifiedllvm/lib/CodeGen/MachineInstr.cpp
The file was modifiedllvm/lib/CodeGen/LiveDebugVariables.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
The file was modifiedllvm/lib/CodeGen/LiveRangeShrink.cpp
The file was modifiedllvm/include/llvm/CodeGen/AntiDepBreaker.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineInstr.h
The file was modifiedllvm/lib/Target/X86/X86OptimizeLEAs.cpp
The file was modifiedllvm/lib/CodeGen/RegisterCoalescer.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
The file was modifiedllvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
The file was modifiedllvm/lib/CodeGen/MachineRegisterInfo.cpp
The file was modifiedllvm/lib/CodeGen/PrologEpilogInserter.cpp
The file was modifiedllvm/lib/CodeGen/RegAllocFast.cpp
The file was modifiedllvm/lib/CodeGen/LiveDebugValues.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
The file was modifiedllvm/lib/CodeGen/MachineSink.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit ce7a1dc4e90f17642d0d725a2026b233fff0b6b6 by jay.foad
[AMDGPU] Generate test checks
The file was modifiedllvm/test/CodeGen/AMDGPU/udivrem.ll
Commit f633b07669030ffaf353c7f3d8a7f4383d348e2f by Stanislav.Mekhanoshin
Pre-commited test update. NFC.
The file was modifiedllvm/test/Transforms/SLPVectorizer/slp-max-phi-size.ll
Commit 01641197ee0bd3895c756c925723c8c8e03bcb09 by jpienaar
[MLIR] Remove TableGen redundant calls to native calls when creating new operations in DRR TableGen files

Summary:
Currently, the TableGen rewrite generates redundant native calls in MLIR DRR files. This is a problem as some native calls may involve significant computations (e.g. when performing constant propagation where every values in a large tensor is touched).

The pattern was as follow:

```c++
if (native-call(args)) tblgen_attrs.emplace_back(rewriter, attribute, native-call(args))
```

The replacement pattern compute `native-call(args)` once and then use it both in the `if` condition and the `emplace_back` call.

Differential Revision: https://reviews.llvm.org/D82101
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
Commit 3a84d84adcd59e62f37792b1f2c6859fb84971cd by eschweitz
[flang] Finish adding AbstractConverter.h

This adds the abstract converter interface. The abstract converter is an
interface that supports the conversion of front-end data structures to
MLIR. This interface will be instantiated by the bridge in a future
commit.

Differential revision: https://reviews.llvm.org/D82268
The file was modifiedflang/include/flang/Lower/AbstractConverter.h
Commit b458d8ce95115dcb98a43bfa6ba4f2f4dbc3c083 by flo
[DSE,MSSA] Add additional tests with non-removable stores (NFC).

Add a few additional tests with volatile stores, which cannot be
removedt stas.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll
Commit 9c56e94a9f0d9a0930179e764aff7c80c793e117 by aeubanks
[NPM] Bail out when -foo and --passes=foo are both specified

Summary:
Currently when --passes is used, any passes specified via -foo are
ignored. Explicitly bail out when that happens.

This requires changing some tests. Most were straightforward, but
codegenprepare-produced-address-math.ll is tricky. One of its RUNs runs
CodeGenPrepare. I tried porting CodeGenPrepare to the NPM, but ended up
getting stuck when I needed a TargetMachine. NPM doesn't have support
for MachineFunctions yet. So I just deleted that RUN line, since it was
mass-added in https://reviews.llvm.org/D54848 and is likely not that
useful.

Reviewers: echristo, hans

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82271
The file was addedllvm/test/Other/opt-old-new-pm-passes.ll
The file was modifiedllvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll
The file was modifiedllvm/tools/opt/opt.cpp
The file was modifiedllvm/test/Transforms/IRCE/bug-loop-varying-upper-limit.ll
The file was modifiedllvm/test/Transforms/IRCE/non-loop-invariant-rhs-instr.ll
The file was modifiedllvm/test/Transforms/RewriteStatepointsForGC/relocate-invoke-result.ll
The file was modifiedllvm/test/Transforms/RewriteStatepointsForGC/rewrite-invoke.ll
Commit c52bee61e91b421da4f603f3aa8111bee2fd1b30 by i
[MCParser] Support quoted section name for COFF

This features matches ELFAsmParser and makes it possible to use `.section ".llvm.call-graph-profile","n"`

Reviewed By: zequanwu

Differential Revision: https://reviews.llvm.org/D82240
The file was modifiedllvm/test/MC/COFF/section.s
The file was modifiedllvm/lib/MC/MCParser/COFFAsmParser.cpp
Commit 328c8642e2a089b2826e83b50dd971f91dd5fe73 by flo
[DSE,MSSA] Reorder DSE blocking checks.

Currently we stop exploring candidates too early in some cases.

In particular, we can continue checking the defining accesses of
non-removable MemoryDefs and defs without analyzable write location
(read clobbers are already ruled out using MemorySSA at this point).
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll
Commit 9934cc544cae4e4fa969657387f5251e42206e1a by spatel
[VectorCombine] make helper function for shift-shuffle; NFC

This will probably be useful for other extract patterns.
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
Commit 1728dec255a5336303b301e26ec22eca2000b593 by Jonas Devlieghere
[lldb/Lua] Recognize "quit" as a way to exit the script interpreter.

Add a way to quit the interactive script interpreter from a shell tests.
Currently, the only way (that I know) to exit the interactive Lua
interpreter is to send a EOF with CTRL-D. I noticed that the embedded
Python script interpreter accepts quit (while the regular python
interpreter doesn't). I've added a special case to the Lua interpreter
to do the same.

Differential revision: https://reviews.llvm.org/D82272
The file was addedlldb/test/Shell/ScriptInterpreter/Lua/quit.test
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
Commit 16d24e45430c930e8f5f0aedc99b262fcdf35d26 by pklausler
[flang] Shape analysis for result of MATMUL

Implement shape analysis for the result of the MATMUL
generic transformational intrinsic function, based on
the shapes of its arguments.  Correct the names of the
arguments to match the standard, too.

Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D82250
The file was modifiedflang/lib/Evaluate/intrinsics.cpp
The file was modifiedflang/lib/Evaluate/shape.cpp
The file was modifiedflang/lib/Semantics/check-call.cpp
Commit ef597eda8efc2e6ee35eceda10bb5ba7c6109696 by francesco.petrogalli
[sve][acle] Add SVE BFloat16 extensions.

Summary:
List of intrinsics:

svfloat32_t svbfdot[_f32](svfloat32_t op1, svbfloat16_t op2, svbfloat16_t op3)
svfloat32_t svbfdot[_n_f32](svfloat32_t op1, svbfloat16_t op2, bfloat16_t op3)
svfloat32_t svbfdot_lane[_f32](svfloat32_t op1, svbfloat16_t op2, svbfloat16_t op3, uint64_t imm_index)

svfloat32_t svbfmmla[_f32](svfloat32_t op1, svbfloat16_t op2, svbfloat16_t op3)

svfloat32_t svbfmlalb[_f32](svfloat32_t op1, svbfloat16_t op2, svbfloat16_t op3)
svfloat32_t svbfmlalb[_n_f32](svfloat32_t op1, svbfloat16_t op2, bfloat16_t op3)
svfloat32_t svbfmlalb_lane[_f32](svfloat32_t op1, svbfloat16_t op2, svbfloat16_t op3, uint64_t imm_index)

svfloat32_t svbfmlalt[_f32](svfloat32_t op1, svbfloat16_t op2, svbfloat16_t op3)
svfloat32_t svbfmlalt[_n_f32](svfloat32_t op1, svbfloat16_t op2, bfloat16_t op3)
svfloat32_t svbfmlalt_lane[_f32](svfloat32_t op1, svbfloat16_t op2, svbfloat16_t op3, uint64_t imm_index)

svbfloat16_t svcvt_bf16[_f32]_m(svbfloat16_t inactive, svbool_t pg, svfloat32_t op)
svbfloat16_t svcvt_bf16[_f32]_x(svbool_t pg, svfloat32_t op)
svbfloat16_t svcvt_bf16[_f32]_z(svbool_t pg, svfloat32_t op)

svbfloat16_t svcvtnt_bf16[_f32]_m(svbfloat16_t even, svbool_t pg, svfloat32_t op)
svbfloat16_t svcvtnt_bf16[_f32]_x(svbfloat16_t even, svbool_t pg, svfloat32_t op)

For reference, see section 7.2 of "Arm C Language Extensions for SVE - Version 00bet4"

Reviewers: sdesmalen, ctetreau, efriedma, david-arm, rengolin

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D82141
The file was addedllvm/test/CodeGen/AArch64/sve-intrinsics-bfloat.ll
The file was addedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalb.c
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
The file was addedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmlalt.c
The file was modifiedllvm/include/llvm/IR/IntrinsicsAArch64.td
The file was addedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfdot.c
The file was addedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvt-bfloat.c
The file was modifiedclang/utils/TableGen/SveEmitter.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was addedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_bfmmla.c
The file was modifiedclang/include/clang/Basic/arm_sve.td
The file was addedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cvtnt.c
Commit 9e1decf7434641411b78a5c140ee1f2eff7f0d50 by yamauchi
[PGO][PGSO] Enable non-cold size opts under partial profile sample PGO.

Summary: Similar to D81020. Follow up D78949.

Reviewers: davidxl

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82053
The file was modifiedllvm/lib/Transforms/Utils/SizeOpts.cpp
Commit 37fb860301272d8138d289da5b606115b3fe5a13 by erich.keane
Add support of __builtin_expect_with_probability

Add a new builtin-function __builtin_expect_with_probability and
intrinsic llvm.expect.with.probability.
The interface is __builtin_expect_with_probability(long expr, long
expected, double probability).
It is mainly the same as __builtin_expect besides one more argument
indicating the probability of expression equal to expected value. The
probability should be a constant floating-point expression and be in
range [0.0, 1.0] inclusive.
It is similar to builtin-expect-with-probability function in GCC
built-in functions.

Differential Revision: https://reviews.llvm.org/D79830
The file was addedclang/test/Sema/builtin-expect-with-probability.cpp
The file was addedclang/test/CodeGen/builtin-expect-with-probability.cpp
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was addedclang/test/Sema/builtin-expect-with-probability-avr.cpp
The file was addedllvm/test/Transforms/LowerExpectIntrinsic/expect-with-probability.ll
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/include/clang/Basic/Builtins.def
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
The file was modifiedllvm/docs/BranchWeightMetadata.rst
Commit 9a8b0411448062e7231a0ee26bd14a3d1c097e9e by n.james93
[clang-tidy] llvm-twine-local ignores parameters

Ignore paramater declarations of type `::llvm::Twine`, These don't suffer the same use after free risks as local twines.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D82281
The file was modifiedclang-tools-extra/clang-tidy/llvm/TwineLocalCheck.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/llvm-twine-local.cpp
Commit 6ae0f5f3e1d465e6a663a50f2cc077671bc6d097 by n.james93
[clang-tidy] RenamerClangTidy wont emit fixes in scratch space

Prevent fixes being displayed if usages are found in the scratch buffer.
See [[ https://bugs.llvm.org/show_bug.cgi?id=46219 | Fix-It hints are being generated in the ScratchBuffer ]].
It may be wise down the line to put in a general fix in clang-tidy to prevent ScratchBuffer replacements being applied, but for now this will help.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D82162
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp
The file was modifiedclang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
Commit 3a4feb1d53df68bed7748a0625b593ba4b5dae32 by mikhail.maltsev
[ARM][BFloat] Implement bf16 get/set_lane without casts to i16 vectors

Currently, in order to extract an element from a bf16 vector, we cast
the vector to an i16 vector, perform the extraction, and cast the result to
bfloat. This behavior was copied from the old fp16 implementation.

The goal of this patch is to achieve optimal code generation for lane
copying intrinsics in a subsequent patch (LLVM fails to fold certain
combinations of bitcast, insertelement, extractelement and
shufflevector instructions leading to the generation of suboptimal code).

Differential Revision: https://reviews.llvm.org/D82206
The file was modifiedclang/test/CodeGen/arm-bf16-getset-intrinsics.c
The file was modifiedclang/include/clang/Basic/arm_neon.td
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit 30140cd24920a2c5469f503df7b39532c7af292d by tobias.gysi
[llvm] Fix typo in test case comment (NFC)
The file was modifiedllvm/test/Transforms/Inline/always-inline.ll
Commit 809bcf4c87d01f74586a432594ac0e9c813182b7 by hanchung
[mlir] Fix a doc link in LinalgBase.td

Differential Revision: https://reviews.llvm.org/D82303
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
Commit 663860f63e73518fc09e55a4a68b03f8027eafc8 by tkeith
[flang] Fix bug checking SAVE attribute

Treat function result like dummy argument: a SAVE statement without an
entity-list does not make it saved.

Differential Revision: https://reviews.llvm.org/D82309
The file was modifiedflang/lib/Evaluate/tools.cpp
The file was modifiedflang/test/Semantics/resolve45.f90
Commit 5ac144fe64c6911b5b6011cac1d61e0f82562e7f by craig.topper
[X86] Calculate the needed size of the feature arrays in _cpu_indicator_init and getHostCPUName using the size of the feature enum.

Move 0 initialization up to the caller so we don't need to know
the size.
The file was modifiedcompiler-rt/lib/builtins/cpu_model.c
The file was modifiedllvm/lib/Support/Host.cpp
The file was modifiedllvm/include/llvm/Support/X86TargetParser.h
Commit 0dfc8e1837e3e3ac06ab8c08fdc08b15e0ae1c2d by craig.topper
[X86] Remove encoding value from the X86_FEATURE and X86_FEATURE_COMPAT macro. NFCI

This was orignally done so we could separate the compatibility
values and the llvm internal only features into a separate entries
in the feature array. This was needed when we explicitly had to
convert the feature into the proper 32-bit chunk at every reference
and we didn't want things moving around.

Now everything is in an array and we have helper funtions or macros
to convert encoding to index. So we renumbering is no longer an
issue.
The file was modifiedllvm/include/llvm/Support/X86TargetParser.h
The file was modifiedclang/lib/Basic/Targets/X86.cpp
The file was modifiedllvm/include/llvm/Support/X86TargetParser.def
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit bebea4221d3d1db9adaf7c921c109b6c2af26b74 by craig.topper
Revert "[X86] Calculate the needed size of the feature arrays in _cpu_indicator_init and getHostCPUName using the size of the feature enum."

Seems to breaking build.

This reverts commit 5ac144fe64c6911b5b6011cac1d61e0f82562e7f.
The file was modifiedcompiler-rt/lib/builtins/cpu_model.c
The file was modifiedllvm/include/llvm/Support/X86TargetParser.h
The file was modifiedllvm/lib/Support/Host.cpp
Commit 5e2c736395cc44a00c8c2cc9fc916450bf780fbe by ctetreau
[SVE] Remove calls to VectorType::getNumElements from WebASM

Summary:
The getNumElements in base VectorType is being deprecated.

See: http://lists.llvm.org/pipermail/llvm-dev/2020-March/139811.html

Reviewers: efriedma, tlively, fpetrogalli, c-rhodes, dschuff

Reviewed By: tlively, dschuff

Subscribers: dschuff, sbc100, tschuett, jgravelle-google, hiraditya, aheejin, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82217
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
Commit 1357c065783e8d66c9db4be59aca389d1dc6c05f by hans
Revert "[X86][SSE] MatchVectorAllZeroTest - handle OR vector reductions"

This caused a Chromium test to miscompile. See discussion on the Phabricator
review.

> This patch extends MatchVectorAllZeroTest to handle OR vector reduction patterns where the result is compared against zero.
>
> Fixes PR45378
>
> Differential Revision: https://reviews.llvm.org/D81547

This reverts 057c9c7ee00b7f7696065a3fc26a3df5ce3ebe96
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/pr45378.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-or-cmp.ll
Commit 315bd964377fe8a465e2f6c8c7c06ae9c900bb0f by antiagainst
Use std::make_tuple instead initializer list

Hopefully this pleases GCC-5 and fixes the build error:

LowerExpectIntrinsic.cpp:62:53: error: converting to
'std::tuple<unsigned int, unsigned int>' from initializer list would use
explicit constructor 'constexpr std::tuple<_T1, _T2>::tuple(_U1&&,
_U2&&) [with _U1 = llvm::cl::opt<unsigned int>&; _U2 =
llvm::cl::opt<unsigned int>&; <template-parameter-2-3> = void; _T1 =
unsigned int; _T2 = unsigned int]'
     return {LikelyBranchWeight, UnlikelyBranchWeight};

Differential Revision: https://reviews.llvm.org/D82325
The file was modifiedllvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
Commit 77df5a8283edbfc33ad3b12df3bd42d54d7ba4f4 by enye.shi
[HIP] Move HIP Linking Logic into HIP ToolChain

This patch is a follow up on https://reviews.llvm.org/D78759.

Extract the HIP Linker script from generic GNU linker,
and move it into HIP ToolChain. Update OffloadActionBuilder
Link actions feature to apply device linking and host linking
actions separately. Using MC Directives, embed the device images
and define symbols.

Reviewers: JonChesterfield, yaxunl

Subscribers: tra, echristo, jdoerfert, msearles, scchan

Differential Revision: https://reviews.llvm.org/D81963
The file was modifiedclang/test/Driver/hip-binding.hip
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.h
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/lib/Driver/ToolChains/HIP.h
The file was modifiedclang/test/Driver/hip-toolchain-rdc.hip
The file was modifiedclang/test/Driver/hip-save-temps.hip
The file was modifiedclang/test/Driver/hip-toolchain-rdc-separate.hip
The file was modifiedclang/test/Driver/hip-link-shared-library.hip
The file was modifiedclang/test/Driver/hip-phases.hip
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/test/Driver/hip-link-save-temps.hip
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
Commit 4bafb0adcf38cf268208ea58eb7e11402d5632e2 by enye.shi
Add Statically Linked Libraries

Add GNU Static Lib Tool, which supports the --emit-static-lib
flag. For HIP, a static library archive will be created and
consist of HIP Fat Binary host object with the device images embedded.
Using llvm-ar to create the static archive. Also, delete existing
output file to ensure a new archive is created each time.

Reviewers: yaxunl, tra, rjmccall, echristo

Subscribers: echristo, JonChesterfield, scchan, msearles

Differential Revision: https://reviews.llvm.org/D78759
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/lib/Driver/ToolChains/Linux.cpp
The file was modifiedclang/lib/Driver/Action.cpp
The file was addedclang/test/Driver/hip-link-static-library.hip
The file was modifiedclang/lib/Driver/ToolChains/Linux.h
The file was modifiedclang/include/clang/Driver/Action.h
The file was modifiedclang/include/clang/Driver/Driver.h
The file was addedclang/test/Driver/hip-toolchain-rdc-static-lib.hip
The file was modifiedclang/include/clang/Driver/ToolChain.h
The file was modifiedclang/lib/Driver/ToolChains/Gnu.h
The file was modifiedclang/test/Driver/bindings.c
The file was modifiedclang/lib/Driver/ToolChain.cpp
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/test/Driver/hip-link-save-temps.hip
Commit bd7defeb94090bb2af7104b70bc33bc64d754d1f by peter
llvm-nm: Implement --special-syms.

Differential Revision: https://reviews.llvm.org/D82251
The file was modifiedlld/test/ELF/aarch64-thunk-script.s
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedllvm/test/MC/AArch64/mapping-within-section.s
The file was modifiedllvm/test/tools/llvm-nm/debug-syms.test
The file was modifiedllvm/tools/llvm-nm/llvm-nm.cpp
The file was modifiedllvm/docs/CommandGuide/llvm-nm.rst
The file was modifiedllvm/test/tools/llvm-nm/AArch64/special-syms.test
Commit ccf5a44917fcb3e57d18d7f73bef06607ec7a20d by gclayton
Fix the verification of DIEs with DW_AT_ranges.

Summary: Previous code would try to verify DW_AT_ranges and if any ranges would overlap, it would stop attributing any ranges after this to the DIE which caused incorrect errors to be reported that a DIE's address ranges were not contained in the parent DIE's ranges. Added a fix and a test.

Reviewers: aprantl, labath, probinson, JDevlieghere, jhenderson

Subscribers: hiraditya, MaskRay, cmtice, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79962
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
The file was addedllvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFAddressRange.h
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
Commit 23654d9e7a29e6c051ba3122cc624d0199e81e73 by craig.topper
Recommit "[X86] Calculate the needed size of the feature arrays in _cpu_indicator_init and getHostCPUName using the size of the feature enum."

Hopefully this version will fix the previously buildbot failure
The file was modifiedcompiler-rt/lib/builtins/cpu_model.c
The file was modifiedllvm/lib/Support/Host.cpp
The file was modifiedllvm/include/llvm/Support/X86TargetParser.h
Commit ada0d41dbc26f013e2741d1f9e0f164943342435 by jpienaar
[mlir][ods] Allow filtering of ops

Add option to filter which op the OpDefinitionsGen run on. This enables having multiple ops together in the same TD file but generating different CC files for them (useful if one wants to use multiclasses or split out 1 dialect into multiple different libraries). There is probably more general query here (e.g., split out all ops that don't have a verify method, or that are commutative) but filtering based on op name (e.g., test.a_op) seemed a reasonable start and didn't require inventing a query specification mechanism here.

Differential Revision: https://reviews.llvm.org/D82319
The file was modifiedmlir/test/mlir-tblgen/op-decl.td
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Commit 516803dc8685ebcc5bce38b05391958ffee22643 by xun
[Coroutines] Ensure co_await promise.final_suspend() does not throw

Summary:
This patch addresses https://bugs.llvm.org/show_bug.cgi?id=46256
The spec of coroutine requires that the expression co_­await promise.final_­suspend() shall not be potentially-throwing.
To check this, we recursively look at every call (including Call, MemberCall, OperatorCall and Constructor) in all code
generated by the final suspend, and ensure that the callees are declared with noexcept. We also look at any returned data
type that requires explicit destruction, and check their destructors for noexcept.

This patch does not check declarations with dependent types yet, which will be done in future patches.

Updated all tests to add noexcept to the required functions, and added a dedicated test for this patch.

This patch might start to cause existing codebase fail to compile because most people may not have been strict in tagging
all the related functions noexcept.

Reviewers: lewissbaker, modocache, junparser

Reviewed By: modocache

Subscribers: arphaman, junparser, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82029
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp
The file was modifiedclang/test/SemaCXX/coroutines.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-await-resume-eh.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-ret-void.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-newpm-pipeline.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-unhandled-exception.cpp
The file was modifiedclang/test/AST/Inputs/std-coroutine.h
The file was modifiedclang/test/SemaCXX/coreturn-eh.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-dest-slot.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-await.cpp
The file was modifiedclang/test/SemaCXX/coreturn.cpp
The file was modifiedclang/lib/Sema/SemaExceptionSpec.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/CodeGenCoroutines/coro-return.cpp
The file was modifiedclang/test/Index/coroutines.cpp
The file was addedclang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp
The file was modifiedclang/test/SemaCXX/coroutine-unhandled_exception-warning.cpp
The file was modifiedclang/test/SemaCXX/coroutine-rvo.cpp
The file was modifiedclang/test/SemaCXX/Inputs/std-coroutine.h
The file was modifiedclang/test/CodeGenCoroutines/coro-always-inline.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-await-domination.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/CodeGenCoroutines/coro-params.cpp
The file was modifiedclang/test/CodeGenCoroutines/Inputs/coroutine.h
The file was modifiedclang/test/CodeGenCoroutines/coro-promise-dtor.cpp
The file was modifiedclang/test/SemaCXX/coroutine-uninitialized-warning-crash.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-alloc.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-gro-nrvo.cpp
The file was modifiedclang/test/Analysis/more-dtors-cfg-output.cpp
The file was modifiedclang/test/CodeGenCXX/ubsan-coroutines.cpp
The file was modifiedclang/test/AST/coroutine-source-location-crash.cpp
The file was modifiedclang/test/SemaCXX/co_await-range-for.cpp
The file was modifiedclang/test/CodeGenCoroutines/coro-return-voidtype-initlist.cpp
Commit d335c1317b6170918311fcbccc39fe31b3a84bda by aeubanks
Fix dynamic alloca detection in CloneBasicBlock

Summary:
Simply check AI->isStaticAlloca instead of reimplementing checks for
static/dynamic allocas.

Reviewers: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82328
The file was modifiedllvm/lib/Transforms/Utils/CloneFunction.cpp
The file was modifiedllvm/unittests/Transforms/Utils/CloningTest.cpp
Commit 0d9726bc3dba2ce7e554bf3140e33b5781639a1f by jurahul
- Add hasNItemsOrLess and container variants of hasNItems, hasNItemsOrMore, and hasNItemsOrLess
- Fixed a bug in hasNItems()
- Extend the STLExtras unit test to test hasSingleElement() and hasNItems() and friends.

Differential Revision: https://reviews.llvm.org/D82232
The file was modifiedllvm/unittests/ADT/STLExtrasTest.cpp
The file was modifiedllvm/include/llvm/ADT/STLExtras.h
Commit cd6848f6e1dfe61206e00fb1c1fb8fbe1c5eeed8 by ctetreau
[SVE] Remove calls to VectorType::getNumElements from ARM

Reviewers: efriedma, greened, c-rhodes, david-arm, dmgreen

Reviewed By: dmgreen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, dmgreen, danielkiss, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82216
The file was modifiedllvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
Commit a9c478acd090bfdb162573af09e777571f8ae1d7 by eschweitz
add copy of MLIR .clang-tidy to squelch noise in phabricator reviews
The file was addedflang/lib/Optimizer/.clang-tidy
The file was addedflang/include/flang/Lower/.clang-tidy
The file was addedflang/include/flang/Optimizer/.clang-tidy
The file was addedflang/lib/Lower/.clang-tidy
Commit 79aad89d8d29029b4e937137e6b8619ee8a4b691 by sbc
[WebAssembly] Add support for externalref to MC and wasm-ld

This allows code for handling externref values to be processed by the
assembler and linker.

Differential Revision: https://reviews.llvm.org/D81977
The file was modifiedllvm/lib/ObjectYAML/WasmYAML.cpp
The file was addedllvm/test/MC/WebAssembly/externref.s
The file was modifiedllvm/lib/Object/WasmObjectFile.cpp
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedlld/wasm/WriterUtils.cpp
The file was addedlld/test/wasm/externref.s
The file was modifiedllvm/include/llvm/BinaryFormat/Wasm.h
The file was modifiedllvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
Commit c20875a48c3b6633b9187f81476519c6be217fa1 by jurahul
[MLIR][NFC] Adopt hasNItems() for SizedRegion predicate

Differential Revision: https://reviews.llvm.org/D82334
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit e135cf8a03b974d2a43eb9fb93ad2d9adefcdf34 by richard
Add -ast-dump-decl-types flag to include types of value and type
declarations in AST dumps.

Includes a testcase for deduction guide transformation that makes use of
this new dumping feature.
The file was addedclang/test/SemaTemplate/deduction-guide.cpp
The file was modifiedclang/include/clang/Driver/CC1Options.td
The file was modifiedclang/include/clang/Frontend/FrontendOptions.h
The file was modifiedclang/tools/clang-import-test/clang-import-test.cpp
The file was modifiedclang/include/clang/Frontend/ASTConsumers.h
The file was modifiedclang/tools/clang-check/ClangCheck.cpp
The file was modifiedclang/lib/Frontend/ASTConsumers.cpp
The file was modifiedclang/lib/Frontend/FrontendActions.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit 009c9b83acfc8bb863894e349bccc2473c685dbc by richard
Fix multilevel deduction where an outer pack is used in the type of an
inner non-type pack at a different index.

We previously considered the index of the outer pack (which would refer
to an unrelated template parameter) to be deduced by deducing the inner
pack, because we inspected the (largely meaningless) type of an expanded
non-type template parameter pack.
The file was modifiedclang/test/SemaTemplate/deduction-guide.cpp
The file was modifiedclang/lib/Sema/SemaTemplateDeduction.cpp
Commit d332ec9209ac0a54fc4f1e5e4edc7948fcc4d6af by alexshap
[llvm-install-name-tool] Implement delete_rpath option

This diff adds support for deleting an rpath from a Mach-O binary.

Patch by Sameer Arora!

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D81527
The file was modifiedllvm/tools/llvm-objcopy/CopyConfig.h
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.cpp
The file was modifiedllvm/tools/llvm-objcopy/InstallNameToolOpts.td
The file was addedllvm/test/tools/llvm-objcopy/MachO/install-name-tool-delete-rpath.test
The file was addedllvm/test/tools/llvm-objcopy/MachO/remove-lc-index-update.test
The file was modifiedllvm/tools/llvm-objcopy/CopyConfig.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
The file was modifiedllvm/tools/llvm-objcopy/MachO/Object.h