UnstableChanges

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

Summary

  1. Add buildbot for OpenMP on AMDGPU (details)
Commit bc9f85040092ec7a969821f38e73f1ba2d946b08 by gkistanova
Add buildbot for OpenMP on AMDGPU

Build OpenMP for AMDGPU target

Differential revision: https://reviews.llvm.org/D106928
The file was modifiedbuildbot/osuosl/master/config/builders.py
The file was modifiedbuildbot/osuosl/master/config/status.py
The file was modifiedbuildbot/osuosl/master/config/workers.py

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

Summary

  1. Work around non-existence of ElfW(type) macro on FreeBSD (details)
  2. [hwasan] Add __hwasan_init constructor to runtime lib. (details)
  3. Revert "[SLP]Do not emit extra shuffle for insertelements vectorization." (details)
  4. [nfc] [lldb] Prevent needless copies of DataExtractor (details)
  5. [RISCV] Add test cases for conditional add/sub. NFC (details)
  6. [DAGCombiner][AMDGPU] Canonicalize constants to the RHS of MULHU/MULHS. (details)
  7. [OpenMPOpt] Expand SPMDization with guarding for target parallel regions (details)
  8. [SLP][NFC]Add tests for constants/undefs used in insertelements, NFC. (details)
  9. [gn build] Add cfi ignorelist to compiler-rt/lib (details)
  10. [MLIR][NFC] Get DiagnosticEngine as a reference in doc (details)
  11. [MemCpyOpt] Relax libcall checks (details)
  12. [flang] Support DFLOAT legacy extension intrinsic function (details)
  13. [flang] runtime: For Fw.d formatting, don't oscillate forever (details)
  14. [amdgpu] Add an enhanced conversion from i64 to f32. (details)
  15. [CodeGen] Add -align-loops (details)
  16. [lld] Remove unused LLD_REPOSITORY (details)
  17. [libc] add integration tests for scudo in libc (details)
  18. [mlir-lsp-server] Only use one MLIRContext per MLIRTextFile (details)
  19. [Bazel] Drop deprecated tblgen includes mechanism (details)
  20. [X86] Remove -x86-experimental-pref-loop-alignment in favor of -align-loops (details)
  21. [WebAssembly] Make result of 'catch' inst variadic (details)
  22. [llvm-nm][test] Avoid deprecated alias -M (--print-armap) (details)
  23. [OpenCL] allow generic address and non-generic defs for CL3.0 (details)
  24. [mlir][sparse] Remove comment w/ code in it (details)
  25. [gwpAsan] revert minor change (details)
  26. Apply -fmacro-prefix-map to __builtin_FILE() (details)
  27. [AArch64][GlobalISel] Legalize wide vector G_PHIs (details)
  28. Adding missing filter check to SourceMgrDiagnosticHandler::EmitDiagnostics (details)
  29. BPF: avoid NE/EQ loop exit condition (details)
  30. [CSSPGO] Remove used of PseudoProbeAttributes::Reserved (details)
  31. [libFuzzer] tests/examples for using libFuzzer for out-of-process targets (details)
  32. [Bazel] Add support for lld (details)
  33. [CMake][gn] lldMachO=>lldMachOOld, lldMachO2=>lldMachO (details)
  34. [mlir] Update comment in Region.h (details)
  35. [AVR] emit 'MCSA_Global' references to '__do_global_ctors' and '__do_global_dtors' (details)
  36. [Compiler-RT] On Apple Platforms switch to always emitting full debug info (details)
  37. Disable LibFuncs for stpcpy and stpncpy for Android < 21 (details)
  38. [mlir] Clean up includes in Transforms/Passes.h (details)
  39. [WebAssembly] Use `SDValue::getConstantOperandVal` (NFC) (details)
  40. [WebAssembly] Cleanup Emscripten SjLj tests (details)
  41. [NFCI] [LoopIdiom] Let processLoopStridedStore take StoreSize as SCEV instead of unsigned (details)
Commit 440d9712ebf6d5faa898daa68045ff0c10859db3 by dimitry
Work around non-existence of ElfW(type) macro on FreeBSD

Fixes PR51331. On FreeBSD, the elf headers don't (yet) provide the
ElfW(type) macro. However, there is a similar set of macros in the
<sys/elf-generic.h> header, of which `__ElfN(type)` exactly matches the
indended purpose.

Reviewed By: gulfem

Differential Revision: https://reviews.llvm.org/D107388
The file was modifiedcompiler-rt/lib/profile/InstrProfilingPlatformLinux.c
Commit 0ebb75608759cc1ee1016699e15d03e8e3f30d14 by 31459023+hctim
[hwasan] Add __hwasan_init constructor to runtime lib.

Found by an Android toolchain upgrade, inherited module constructors
(like init_have_lse_atomics from the builtins) can sneak into the hwasan
runtime. If these inherited constructors call hwasanified libc
functions, then the HWASan runtime isn't setup enough, and the code
crashes.

Mark the initialized as a high-priority initializer to fix this.

Reviewed By: pcc, yabinc

Differential Revision: https://reviews.llvm.org/D107391
The file was modifiedcompiler-rt/lib/hwasan/hwasan.cpp
Commit 214f99b27c009c815884d82fded65c4d006b532e by a.bataev
Revert "[SLP]Do not emit extra shuffle for insertelements vectorization."

This reverts commit 871ea69803b1f231254ab0c560795a33b6ed0c77 to fix the
problem if the first vector is not just undef.
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/value-bug-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-fp.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-fp-inseltpoison.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/vectorize-free-extracts-inserts.ll
Commit 14f443030c1acc4346589aee3c1c532dc00eae3a by jan.kratochvil
[nfc] [lldb] Prevent needless copies of DataExtractor

lldb_private::DataExtractor contains DataBufferSP m_data_sp which is
relatively expensive to copy (due to multi-threading locking).

llvm::DataExtractor does not have this problem as it uses StringRef
instead.

The copy constructor is explicit as otherwise it is easy to make
unintended modification of a local copy instead of a caller's instance
(D107470 but that is llvm::DataExtractor).

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D107485
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp
The file was modifiedlldb/include/lldb/Utility/DataExtractor.h
The file was modifiedlldb/unittests/DataFormatter/StringPrinterTests.cpp
The file was modifiedlldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
The file was modifiedlldb/include/lldb/DataFormatters/StringPrinter.h
The file was modifiedlldb/source/Plugins/Process/elf-core/RegisterUtilities.cpp
The file was modifiedlldb/source/Plugins/Process/elf-core/ProcessElfCore.h
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
The file was modifiedlldb/source/DataFormatters/StringPrinter.cpp
Commit 2dad7979909a02d480514f37c9e55f752c0aa0a5 by craig.topper
[RISCV] Add test cases for conditional add/sub. NFC

InstCombine canonicalizes c ? (x+y) : x to (c ? y : 0) + x. It
does the same for and/or/xor. We already reverse this transform
for those, but don't do add/sub yet.
The file was modifiedllvm/test/CodeGen/RISCV/select-binop-identity.ll
Commit c23405174a3f26c044498af411e139e5f104f998 by craig.topper
[DAGCombiner][AMDGPU] Canonicalize constants to the RHS of MULHU/MULHS.

This allows special constants like to 0 to be recognized. It's also
expected by isel patterns if a target had a mulh with immediate instructions.
The commuting done by tablegen won't commute patterns with immediates since it
expects DAGCombine to have done it.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D107486
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/srem64.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/udiv64.ll
Commit 29a3e3dd7bedb5cfd50277882cfc8d4b6b07ee2f by georgakoudis1
[OpenMPOpt] Expand SPMDization with guarding for target parallel regions

This patch expands SPMDization (converting generic execution mode to SPMD for target regions) by guarding code regions that should be executed only by the main thread. Specifically, it generates guarded regions, which only the main thread executes, and the synchronization with worker threads using simple barriers. For correctness, the patch aborts SPMDization for target regions if the same code executes in a parallel region, thus must be not be guarded. This check is implemented using the ParallelLevels AA.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D106892
The file was modifiedllvm/test/Transforms/OpenMP/remove_globalization.ll
The file was modifiedllvm/test/Transforms/OpenMP/spmdization.ll
The file was modifiedllvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
The file was modifiedllvm/test/Transforms/OpenMP/custom_state_machines.ll
The file was modifiedllvm/test/Transforms/OpenMP/get_hardware_num_threads_in_block_fold.ll
The file was modifiedllvm/test/Transforms/OpenMP/replace_globalization.ll
Commit 8f465a0cfb7b2596768f749839dd53ab6a5e8dd3 by a.bataev
[SLP][NFC]Add tests for constants/undefs used in insertelements, NFC.
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
Commit 41354942c5c3cd4b9ae59179feed701a98791160 by aeubanks
[gn build] Add cfi ignorelist to compiler-rt/lib

So that building the compiler-rt target also copies the cfi ignorelist

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D107411
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
Commit fb27e8c76e04e093dcd378b8a76341a7b6ed3b0c by rdzhabarov
[MLIR][NFC] Get DiagnosticEngine as a reference in doc

'mlir::DiagnosticEngine::DiagnosticEngine(const mlir::DiagnosticEngine&)' is implicitly deleted because the default definition would be ill-formed.

Reviewed By: rdzhabarov

Differential Revision: https://reviews.llvm.org/D107287
The file was modifiedmlir/docs/Diagnostics.md
Commit bb15861e149ac1ce01ed5bd87f760e9469b20a9d by nikita.ppv
[MemCpyOpt] Relax libcall checks

Rather than blocking the whole MemCpyOpt pass if the libcalls are
not available, only disable creation of new memset/memcpy intrinsics
where only load/stores were used previously. This only affects the
store merging and load-store conversion optimization. Other
optimizations are derived from existing intrinsics, which are
well-defined in the absence of libcalls -- not having the libcalls
just means that call simplification won't convert them to intrinsics.

This is a weaker variation of D104801, which dropped these checks
entirely. Ideally we would not couple emission of intrinsics to
libcall availability at all, but as the intrinsics may be legalized
to libcalls we need to be a bit careful right now.

Differential Revision: https://reviews.llvm.org/D106769
The file was modifiedllvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
The file was addedllvm/test/Transforms/MemCpyOpt/no-libcalls.ll
Commit 617be2756fd0e0d943d082e8f86309c4133ce64b by pklausler
[flang] Support DFLOAT legacy extension intrinsic function

Like the similar legacy extension FLOAT(), DFLOAT() represents a
conversion from default integer to DOUBLE PRECISION.  Rewrite
into a conversion operation.

Differential Revision: https://reviews.llvm.org/D107489
The file was modifiedflang/docs/Extensions.md
The file was addedflang/test/Semantics/dfloat.f90
The file was modifiedflang/lib/Evaluate/intrinsics.cpp
Commit 4876520eef34f517075fed9007dc8b3162d67d1a by pklausler
[flang] runtime: For Fw.d formatting, don't oscillate forever

The algorithm for Fw.d output will drive binary to decimal conversion for
an initial fixed number of digits, then adjust that number based on the
result's exposent.  For value close to a power of ten, this adjustment
process wouldn't terminate; e.g., formatting 9.999 as F10.2 would start
with 1e2, boost the digits to 2, get 9.99e1, decrease the digits, and loop.
Solve by refusing to boost the digits a second time.

Differential Revision: https://reviews.llvm.org/D107490
The file was modifiedflang/runtime/edit-output.cpp
The file was modifiedflang/lib/Decimal/binary-to-decimal.cpp
The file was modifiedflang/unittests/Runtime/NumericalFormatTest.cpp
Commit 5edc886e900b12286ad86268461a3013c329118d by michael.hliao
[amdgpu] Add an enhanced conversion from i64 to f32.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D107187
The file was modifiedllvm/test/CodeGen/AMDGPU/uint_to_fp.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sint_to_fp.i64.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uitofp.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/uint_to_fp.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/cvt_f32_ubyte.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sitofp.mir
Commit a1944386156dbbfae15dfc606a3728e08ac92cfe by i
[CodeGen] Add -align-loops

to `lib/CodeGen/CommandFlags.cpp`. It can replace
-x86-experimental-pref-loop-alignment=.

The loop alignment is only used by MachineBlockPlacement.
The implementation uses a new `llvm::TargetOptions` for now, as
an IR function attribute/module flags metadata may be overkill.

This is the llvm part of D106701.
The file was modifiedllvm/include/llvm/Target/TargetOptions.h
The file was modifiedllvm/test/CodeGen/X86/innermost-loop-alignment.ll
The file was modifiedllvm/include/llvm/CodeGen/CommandFlags.h
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/CodeGen/CommandFlags.cpp
The file was addedllvm/test/CodeGen/RISCV/align-loops.ll
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
Commit bd484c994036c682c928b18ff06849d117c9819d by i
[lld] Remove unused LLD_REPOSITORY

Remnant after D72803.

Distributions who want to customize the string can customize
LLD_VERSION_STRING instead.

Reviewed By: #lld-macho, mstorsjo, thakis

Differential Revision: https://reviews.llvm.org/D107416
The file was modifiedlld/Common/Version.cpp
Commit 6ed60fb8a2600e38026b9a9b12fad763cc57c7b2 by michaelrj
[libc] add integration tests for scudo in libc

This change adds tests to make sure that SCUDO is being properly
included with llvm libc. This change also adds the toggles to properly
use SCUDO, as GWP-ASan is enabled by default and must be included for
SCUDO to function.

Reviewed By: sivachandra, hctim

Differential Revision: https://reviews.llvm.org/D106919
The file was modifiedlibc/lib/CMakeLists.txt
The file was addedcompiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
The file was modifiedcompiler-rt/cmake/config-ix.cmake
The file was modifiedcompiler-rt/CMakeLists.txt
The file was modifiedlibc/test/CMakeLists.txt
The file was addedlibc/test/integration/CMakeLists.txt
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
The file was addedlibc/test/integration/scudo/CMakeLists.txt
The file was addedlibc/test/integration/scudo/gwp_asan_should_crash.cpp
The file was addedlibc/test/integration/scudo/integration_test.cpp
Commit 0bd297fce2798ce12490a5c67cefbc54061f6bdf by riddleriver
[mlir-lsp-server] Only use one MLIRContext per MLIRTextFile

A text file may be comprised of many different "chunks", when
the input file contains the `// -----` split markers. We don't
need to use a unique MLIRContext per chunk, as having
separate contexts is intended to allow for easy unloading of
unused data and all chunks have the same lifetime (tied to the
input file). This commit uses one context for the entire file,
greatly reducing memory consumption in certain situations (up
to 70%).

Differential Revision: https://reviews.llvm.org/D107488
The file was modifiedmlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
Commit 981ad13ac65690fc32418af6f09a66b52a604904 by gcmn
[Bazel] Drop deprecated tblgen includes mechanism

Includes can now be fully managed via td_library and specified locally
to the tablegen files that require them. This has been deprecated for a
while and is not used upstream. I'm not aware of any downstream users
either.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D107389
The file was modifiedutils/bazel/llvm-project-overlay/mlir/tblgen.bzl
Commit 9c19b36f1c61fb282c2625c831555fb2f55e3df4 by i
[X86] Remove -x86-experimental-pref-loop-alignment in favor of -align-loops
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 31a71a393f65d9e07b5b0756fef9dd16690950ee by aheejin
[WebAssembly] Make result of 'catch' inst variadic

`catch` instruction can have any number of result values depending on
its tag, but so far we have only needed a single i32 return value for
C++ exception so the instruction was specified that way. But using the
instruction for SjLj handling requires multiple return values.

This makes `catch` instruction's results variadic and moves selection of
`throw` and `catch` instruction from ISelLowering to ISelDAGToDAG.
Moving `catch` to ISelDAGToDAG is necessary because I am not aware of
a good way to do instruction selection for variadic output instructions
in TableGen. This also moves `throw` because 1. `throw` and `catch`
share the same utility function and 2. there is really no reason we
should do that in ISelLowering in the first place. What we do is mostly
the same in both places, and moving them to ISelDAGToDAG allows us to
remove unnecessary mid-level nodes for `throw` and `catch` in
WebAssemblyISD.def and WebAssemblyInstrInfo.td.

This also adds handling for new `catch` instruction to AsmTypeCheck.

Reviewed By: dschuff, tlively

Differential Revision: https://reviews.llvm.org/D107423
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISD.def
Commit e1574c51c2655b78606ccffea8db5f63095851bd by i
[llvm-nm][test] Avoid deprecated alias -M (--print-armap)

-M was inappropriately added since -s is taken by Darwin nm.
-M is deprecated. Tests should use --print-armap instead.
The file was modifiedllvm/test/Object/archive-symtab.test
The file was modifiedllvm/test/Object/simple-archive.test
The file was modifiedllvm/test/Object/X86/archive-symbol-table.s
The file was modifiedllvm/test/Object/X86/archive-ir-asm.ll
The file was modifiedllvm/test/Object/archive-long-index.test
The file was modifiedllvm/test/Object/nm-archive.test
Commit 14cb67862a723027c6787baa263f5bf6e03ab01d by airlied
[OpenCL] allow generic address and non-generic defs for CL3.0

This allows both sets of definitions to exist on CL 3.0

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D107318
The file was modifiedclang/lib/Headers/opencl-c.h
Commit 0bd2d4c4b163303ff5211920bdb81328c1ac1f7f by gusss
[mlir][sparse] Remove comment w/ code in it

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D107484
The file was modifiedmlir/test/Integration/data/mttkrp_b.tns
Commit f135a91c72c5744bd40614ee4c0411be68baf16f by michaelrj
[gwpAsan] revert minor change

This change reverts a small cmake change that was causing buildbot
failures.

Differential Revision: https://reviews.llvm.org/D107510
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
Commit 7df405e079c5045562c53f7a2504b85f423078be by i
Apply -fmacro-prefix-map to __builtin_FILE()

This matches the behavior of GCC.
Patch does not change remapping logic itself, so adding one simple smoke test should be enough.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107393
The file was modifiedclang/test/CodeGenCXX/builtin-source-location.cpp
The file was modifiedclang/lib/AST/Expr.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Basic/LangOptions.cpp
The file was modifiedclang/lib/Lex/PPMacroExpansion.cpp
The file was modifiedclang/include/clang/Lex/PreprocessorOptions.h
Commit ca2e0536527f0e0dfbab30a90529581e766ba2d9 by Jessica Paquette
[AArch64][GlobalISel] Legalize wide vector G_PHIs

Clamp the max number of elements when legalizing G_PHI. This allows us to
legalize some common fallbacks like 4 x s64.

Here's an example: https://godbolt.org/z/6YocsEYTd

Had to add -global-isel-abort=0 to legalize-phi.mir to account for the
G_EXTRACT_VECTOR_ELT from the 32 x s8 G_PHI.

Differential Revision: https://reviews.llvm.org/D107508
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-phi.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Commit 50264ff88ab1ed40119f13d482b0cc8326c1e95d by riddleriver
Adding missing filter check to SourceMgrDiagnosticHandler::EmitDiagnostics

There is a case in EmitDiagnostics where the filter check is bypassed (when locationStack is empty).   Filter might also be bypassed when loc instead of showableLoc is added to the locationStack.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D106522
The file was modifiedmlir/lib/IR/Diagnostics.cpp
Commit e52946b9ababcbf8e6f40b1b15900ae2e795a1c6 by yhs
BPF: avoid NE/EQ loop exit condition

Kuniyuki Iwashima reported in [1] that llvm compiler may
convert a loop exit condition with "i < bound" to "i != bound", where
"i" is the loop index variable and "bound" is the upper bound.
In case that "bound" is not a constant, verifier will always have "i != bound"
true, which will cause verifier failure since to verifier this is
an infinite loop.

The fix is to avoid transforming "i < bound" to "i != bound".
In llvm, the transformation is done by IndVarSimplify pass.
The compiler checks loop condition cost (i = i + 1) and if the
cost is lower, it may transform "i < bound" to "i != bound".
This patch implemented getArithmeticInstrCost() in BPF TargetTransformInfo
class to return a higher cost for such an operation, which
will prevent the transformation for the test case
added in this patch.

[1] https://lore.kernel.org/netdev/1994df05-8f01-371f-3c3b-d33d7836878c@fb.com/

Differential Revision: https://reviews.llvm.org/D107483
The file was modifiedllvm/lib/Target/BPF/BPFTargetTransformInfo.h
The file was addedllvm/test/CodeGen/BPF/loop-exit-cond.ll
Commit 041b5251415d9c96c9535e6e780770ad066883fe by modimo
[CSSPGO] Remove used of PseudoProbeAttributes::Reserved

D106861 added usage of PseudoProbeAttributes::Reserved as TailCall however this usage hasn't been committed/reviewed. Removing this usage.

Testing
ninja check-all

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D107514
The file was modifiedllvm/include/llvm/MC/MCPseudoProbe.h
The file was modifiedllvm/lib/MC/MCPseudoProbe.cpp
Commit 597e407cf23b92db202732e6890561b2f2830a58 by kcc
[libFuzzer] tests/examples for using libFuzzer for out-of-process targets

[libFuzzer] tests/examples for using libFuzzer for out-of-process targets

Reviewed By: kostik

Differential Revision: https://reviews.llvm.org/D107498
The file was addedcompiler-rt/test/fuzzer/out-of-process-fuzz.test
The file was addedcompiler-rt/test/fuzzer/OutOfProcessFuzzTarget.cpp
The file was addedcompiler-rt/test/fuzzer/SanCovDump.cpp
Commit 693a95a69416e23a31e46d3d2c81e854688e606e by gcmn
[Bazel] Add support for lld

This patch adds a Bazel configuration to build lld. That includes a
BUILD.bazel file to export the libunwind headers for use by lld. Since
the lld target itself requires libxml2 (through WindowsManifest) it's
currently disabled on Buildkite and marked manual, but all the libraries
build.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107414
The file was addedutils/bazel/llvm-project-overlay/lld/BUILD.bazel
The file was addedutils/bazel/llvm-project-overlay/libunwind/BUILD.bazel
Commit 7a6482216ff02f81ed02ff4936f1b22d4b5a9a6c by i
[CMake][gn] lldMachO=>lldMachOOld, lldMachO2=>lldMachO

Now that D95204 switched default to new Darwin backend, rename some CMake
targets to match.

Reviewed By: #lld-macho, smeenai, int3

Differential Revision: https://reviews.llvm.org/D107516
The file was modifiedllvm/utils/gn/secondary/lld/lib/ReaderWriter/MachO/BUILD.gn
The file was modifiedlld/lib/ReaderWriter/MachO/CMakeLists.txt
The file was modifiedlld/unittests/DriverTests/CMakeLists.txt
The file was modifiedlld/MachO/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/lld/lib/Driver/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/lld/unittests/MachOTests/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/lld/MachO/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/lld/tools/lld/BUILD.gn
The file was modifiedlld/unittests/MachOTests/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/lld/unittests/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/lld/unittests/DriverTests/BUILD.gn
The file was modifiedlld/lib/Driver/CMakeLists.txt
The file was modifiedlld/tools/lld/CMakeLists.txt
Commit ac7c7cbfdaf9d8fd7335fe2622fa825eed7535a2 by springerm
[mlir] Update comment in Region.h

The file in which `Region::viewGraph` is defined has changed. This should have been updated with D106342.

Differential Revision: https://reviews.llvm.org/D107517
The file was modifiedmlir/include/mlir/IR/Region.h
Commit 75abeb64cebd5a79e837e9ea54f19d0b2125cb28 by powerman1st
[AVR] emit 'MCSA_Global' references to '__do_global_ctors' and '__do_global_dtors'

Emit references to '__do_global_ctors' and '__do_global_dtors' to allow
constructor/destructor routines to run.

Reviewed by: MaskRay

Differential Revision: https://reviews.llvm.org/D107133
The file was modifiedllvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h
The file was modifiedllvm/lib/Target/AVR/AVRAsmPrinter.cpp
The file was addedllvm/test/CodeGen/AVR/ctors.ll
The file was modifiedllvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp
Commit fb0a929512c25bd9859498cde7d1c6c73f550d61 by Dan Liew
[Compiler-RT] On Apple Platforms switch to always emitting full debug info

Previously the build used `-gline-tables-only` when `COMPILER_RT_DEBUG`
was off (default) and `-g` when `COMPILER_RT_DEBUG` was on. The end
result of this meant that the release build of the Sanitizer runtimes
were difficult to debug (e.g. information about variables and function
arguments were missing).

Presumably the reason for preferring `-gline-tables-only` for release
builds was to save space. However, for Apple platforms this doesn't
matter because debug info lives in separate `.dSYM` files (which aren't
shipped) rather than in the shipped `.dylib` files.

Now on Apple platforms we always emit full debug info if the compiler
supports it and we emit a fatal error if `-g` isn't supported.

rdar://79223184

Differential Revision: https://reviews.llvm.org/D107501
The file was modifiedcompiler-rt/CMakeLists.txt
Commit 58481663692b55ca03f8b41ccb660dcbcebffc49 by nathan
Disable LibFuncs for stpcpy and stpncpy for Android < 21

These functions don't exist in android API levels < 21. A change in
llvm-12 (rG6dbf0cfcf789) caused Oz builds to emit this symbol assuming
it's available and thus is causing link errors. Simply disable it here.

Differential Revision: https://reviews.llvm.org/D107509
The file was modifiedllvm/test/Transforms/InstCombine/sprintf-1.ll
The file was modifiedllvm/lib/Analysis/TargetLibraryInfo.cpp
Commit 12b34e056cf19d9c2c2a7f180ba26991bba3f16c by springerm
[mlir] Clean up includes in Transforms/Passes.h

Differential Revision: https://reviews.llvm.org/D107520
The file was modifiedmlir/lib/Transforms/NormalizeMemRefs.cpp
Commit aa0b0fbbe6f80cce720c72240b870b74bf5b1e6f by aheejin
[WebAssembly] Use `SDValue::getConstantOperandVal` (NFC)

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D107499
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
Commit 9c3345ad1020bbd8ec61a07339c1d1e804ef3011 by aheejin
[WebAssembly] Cleanup Emscripten SjLj tests

- Remove a redundant test: there were `longjmp_only` and `only_longjmp`,
  which do the same thing
- Add `CHECK-LABEL` lines for function names

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D107511
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
Commit 26aa1bbe97a3a1566633abbcf754046a6bffb155 by eopxd
[NFCI] [LoopIdiom] Let processLoopStridedStore take StoreSize as SCEV instead of unsigned

Letting it take SCEV allows further modification on the function to optimize
if the StoreSize / Stride is runtime determined.

This is a preceeding of D107353.
The big picture is to let LoopIdiom deal with runtime-determined sizes.

Reviewed By: Whitney, lebedev.ri

Differential Revision: https://reviews.llvm.org/D104595
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp