LLVM/project 3ff3c4eclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp CIRGenExprScalar.cpp

[CIR] Upstream X86 builtin clflush, fence and pause (#167401)

This PR upstreams the intrinsics `_mm_prefetch`, `_mm_(l|m)fenche`,
`_mm_pause` and `_mm_clflush` from the incubator repository.

DeltaFile
+58-0clang/test/CIR/CodeGen/X86/sse2-builtins.c
+45-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+36-1clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+28-0clang/test/CIR/CodeGen/X86/sse-builtins.c
+24-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+22-0clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+213-12 files not shown
+217-18 files

LLVM/project 36848a3lldb/bindings/python python-typemaps.h python-typemaps.swig

[lldb] Remove bindings/python/python-typemaps.h (#167966)

The minimum supported SWIG version is 4.0 so there's no need for using a
separate file anymore.
DeltaFile
+0-19lldb/bindings/python/python-typemaps.h
+12-6lldb/bindings/python/python-typemaps.swig
+12-252 files

LLVM/project e781a5allvm/lib/Transforms/Utils ProfileVerify.cpp, llvm/test/Transforms/PGOProfile profcheck-select.ll

[profcheck] Disable verification of selects on vector conditions.
DeltaFile
+0-30llvm/utils/profcheck-xfail.txt
+20-2llvm/test/Transforms/PGOProfile/profcheck-select.ll
+10-6llvm/lib/Transforms/Utils/ProfileVerify.cpp
+30-383 files

LLVM/project 513232fclang/lib/Tooling/DependencyScanning ModuleDepCollector.cpp, clang/test/ClangScanDeps modules-header-sharing.m

[clang][deps] Track VFS overlay files in file dependencies. (#167824)

rdar://164612831
DeltaFile
+3-0clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
+2-1clang/test/ClangScanDeps/modules-header-sharing.m
+5-12 files

LLVM/project 1eebb8dflang/lib/Lower/OpenMP Utils.cpp ClauseProcessor.cpp, offload/test/offloading/fortran implicit-derived-enter-exit.f90

Address reviewer comments.
DeltaFile
+65-0offload/test/offloading/fortran/implicit-derived-enter-exit.f90
+4-6flang/lib/Lower/OpenMP/Utils.cpp
+2-5flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+3-0flang/lib/Lower/OpenMP/OpenMP.cpp
+74-114 files

LLVM/project a6edeedllvm/test/Transforms/LoopVectorize first-order-recurrence-tail-folding.ll use-scalar-epilogue-if-tp-fails.ll, llvm/test/Transforms/LoopVectorize/RISCV uniform-load-store.ll divrem.ll

Revert "[LV] Use ExtractLane(LastActiveLane, V) live outs when tail-folding. (#149042)"

This reverts commit 62d1a080e69e3c5e98840e000135afa7c688a77b.

This appears to be causing some runtime failures on RISCV
https://lab.llvm.org/buildbot/#/builders/210/builds/5221
DeltaFile
+111-757llvm/test/Transforms/LoopVectorize/first-order-recurrence-tail-folding.ll
+44-179llvm/test/Transforms/LoopVectorize/use-scalar-epilogue-if-tp-fails.ll
+66-141llvm/test/Transforms/LoopVectorize/optsize.ll
+69-57llvm/test/Transforms/LoopVectorize/RISCV/uniform-load-store.ll
+62-39llvm/test/Transforms/LoopVectorize/RISCV/divrem.ll
+40-46llvm/test/Transforms/LoopVectorize/pr43166-fold-tail-by-masking.ll
+392-1,21915 files not shown
+584-1,62621 files

LLVM/project b85a685llvm/lib/Transforms/Scalar MemCpyOptimizer.cpp, llvm/test/Transforms/MemCpyOpt memset-memcpy-dbgloc.ll

[MemCpyOpt][profcheck] Set `unknown` branch weights for certain selects
DeltaFile
+5-3llvm/test/Transforms/MemCpyOpt/memset-memcpy-dbgloc.ll
+5-0llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+10-32 files

LLVM/project 79cd1b7llvm/test/Transforms/LoopVectorize/AArch64 partial-reduce-incomplete-chains.ll

[LV] Drop verbose check-prefix from partial-reduce-incomplete-chains.ll.

There's only a single RUN line in the test, use the more compact default CHECK.
DeltaFile
+81-50llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-incomplete-chains.ll
+81-501 files

LLVM/project f6d9631mlir/tools/mlir-tblgen OpPythonBindingGen.cpp

[mlir][python] Fix ir.Value type to not break other types (#167930)

Change in https://github.com/llvm/llvm-project/pull/166148 caused breaks
for some other types.
Specifically this error was seen in a downstream project
```
 _ods_ir.OpOperandList[_ods_ir.IntegerType]:

TypeError: type 'iree.compiler._mlir_libs._mlir.ir.OpOperandList' is not subscriptable

```
This PR tries to make those changes not affect the other types

---------

Signed-off-by: Nirvedh Meshram <nirvedh at gmail.com>
DeltaFile
+4-2mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
+4-21 files

LLVM/project 7e5054ellvm/include/llvm/IR ProfDataUtils.h, llvm/lib/IR ProfDataUtils.cpp

[MergeICmp][profcheck] Propagate profile info
DeltaFile
+25-12llvm/test/Transforms/MergeICmps/X86/alias-merge-blocks.ll
+32-2llvm/lib/Transforms/Scalar/MergeICmps.cpp
+21-7llvm/test/Transforms/MergeICmps/X86/entry-block-shuffled.ll
+3-0llvm/include/llvm/IR/ProfDataUtils.h
+1-1llvm/lib/IR/ProfDataUtils.cpp
+82-225 files

LLVM/project ebc35f8flang/test/Lower/CUDA cuda-device-proc.cuf, mlir/include/mlir/Dialect/LLVMIR NVVMOps.td

[mlir][NVVM] Make sure barrier reduction attr can roundtrip (#167958)

The IR was not able to be roundtrip through mlir-opt. Update the
assembly format and add round trip tests.

```
mlir-opt mlir/test/Target/LLVMIR/nvvm/barrier.mlir | mlir-opt
<stdin>:6:5: error: cannot name an operation with no results
    %0 = nvvm.barrier <and> %arg2 -> i32
```
DeltaFile
+16-9mlir/test/Target/LLVMIR/nvvm/barrier.mlir
+9-9flang/test/Lower/CUDA/cuda-device-proc.cuf
+1-1mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+26-193 files

LLVM/project 90e06c0clang-tools-extra/clang-doc HTMLMustacheGenerator.cpp Generators.cpp

formatting fix
DeltaFile
+28-170clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+136-0clang-tools-extra/clang-doc/Generators.cpp
+81-0clang-tools-extra/clang-doc/Generators.h
+245-1703 files

LLVM/project 6a89439compiler-rt/lib/sanitizer_common sanitizer_mac.cpp sanitizer_posix.cpp, compiler-rt/lib/tsan/rtl tsan_platform_mac.cpp

[sanitizer_common] Add darwin-specific MemoryRangeIsAvailable (#167797)

The fixes a TOCTOU bug in the code that initializes shadow memory in
ASAN:


https://github.com/llvm/llvm-project/blob/4b05581bae0e3432cfa514788418fb2fc2144904/compiler-rt/lib/asan/asan_shadow_setup.cpp#L66-L91

1. During initialization, we call `FindDynamicShadowStart` to search the
memory mapping for enough space to dynamically allocate shadow memory.
2. We call `MemoryRangeIsAvailable(shadow_start, kHighShadowEnd);`,
which goes into `MemoryMappingLayout`.
3. We actually map the shadow with `ReserveShadowMemoryRange`.

In step 2, `MemoryMappingLayout` makes various allocations using the
internal allocator. This can cause the allocator to map more memory! In
some cases, this can actually allocate memory that overlaps with the
shadow region returned by` FindDynamicShadowStart` in step 1. This is
not actually fatal, but it memory corruption; MAP_FIXED is allowed to

    [18 lines not shown]
DeltaFile
+36-5compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
+3-12compiler-rt/lib/sanitizer_common/sanitizer_posix.cpp
+7-0compiler-rt/lib/sanitizer_common/sanitizer_common.h
+0-2compiler-rt/lib/sanitizer_common/sanitizer_mac.h
+1-1compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
+47-205 files

LLVM/project c44bd37llvm/lib/Target/X86 X86FloatingPoint.cpp X86.h, llvm/test/CodeGen/X86 x87-stack-pop.mir

[X86][NewPM] Port X86 FP Stackifier Pass to NewPM



Reviewers: arsenm, RKSimon, paperchalice, phoebewang

Reviewed By: arsenm, RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/167911
DeltaFile
+77-38llvm/lib/Target/X86/X86FloatingPoint.cpp
+8-2llvm/lib/Target/X86/X86.h
+2-2llvm/lib/Target/X86/X86TargetMachine.cpp
+2-1llvm/test/CodeGen/X86/x87-stack-pop.mir
+2-1llvm/test/DebugInfo/MIR/InstrRef/x86-fp-stackifier-drop-locations.mir
+1-1llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+92-451 files not shown
+93-467 files

LLVM/project c40779alldb/test/API/commands/frame/var-dil/basics/GlobalVariableLookup TestFrameVarDILGlobalVariableLookup.py

[LLDB] Use skipIf instead of expectedFail
DeltaFile
+1-1lldb/test/API/commands/frame/var-dil/basics/GlobalVariableLookup/TestFrameVarDILGlobalVariableLookup.py
+1-11 files

LLVM/project 3e28992compiler-rt/lib/scudo/standalone mem_map_linux.cpp, compiler-rt/lib/scudo/standalone/tests map_test.cpp

[scudo] Always zero on linux even if the memory cannot be released. (#167788)

If a caller has locked memory, then the madvise call will fail. In that
case, zero the memory so that we don't return non-zeroed memory for
calloc calls since we thought the memory had been released.
DeltaFile
+46-0compiler-rt/lib/scudo/standalone/tests/map_test.cpp
+6-1compiler-rt/lib/scudo/standalone/mem_map_linux.cpp
+52-12 files

LLVM/project e51163clldb/test/Shell/SymbolFile/DWARF/x86 dwarf5-macho.c

[LLDB] Use %clang_host instead of %clang in test (NFC)
DeltaFile
+2-2lldb/test/Shell/SymbolFile/DWARF/x86/dwarf5-macho.c
+2-21 files

LLVM/project 152d9fcllvm/test/CodeGen/AMDGPU eliminate-frame-index-v-add-u32.mir eliminate-frame-index-v-add-co-u32.mir, llvm/test/CodeGen/AMDGPU/GlobalISel memory-legalizer-atomic-fence.ll

Don't add IR sections to MIR tests just to add nounwind
DeltaFile
+0-480llvm/test/CodeGen/AMDGPU/GlobalISel/memory-legalizer-atomic-fence.ll
+204-55llvm/test/CodeGen/AMDGPU/eliminate-frame-index-v-add-u32.mir
+134-63llvm/test/CodeGen/AMDGPU/eliminate-frame-index-v-add-co-u32.mir
+114-52llvm/test/CodeGen/AMDGPU/eliminate-frame-index-s-add-i32.mir
+26-22llvm/test/CodeGen/AMDGPU/eliminate-frame-index-v-add-co-u32-wave32.mir
+20-11llvm/test/CodeGen/AMDGPU/eliminate-frame-index-s-add-u32.mir
+498-6834 files not shown
+518-71310 files

LLVM/project 6429549llvm/test/Transforms/LoopVectorize single-early-exit-deref-assumptions.ll

[LV] Add early-exit tests, where deref assumes are not in preheader.

Test case for vectorizing std::find_if with
builtin_assume_dereferenceable. Currently not vectorized.

https://godbolt.org/z/6jbsd4EjT
DeltaFile
+150-0llvm/test/Transforms/LoopVectorize/single-early-exit-deref-assumptions.ll
+150-01 files

LLVM/project 1184128llvm/lib/Transforms/Utils LoopPeel.cpp, llvm/test lit.cfg.py

[LP] Assign weights when peeling last iteration.
DeltaFile
+66-0llvm/test/Transforms/LoopUnroll/peel-last-iteration-bfi.ll
+28-15llvm/test/Transforms/LoopUnroll/peel-last-iteration-expansion-cost.ll
+17-1llvm/lib/Transforms/Utils/LoopPeel.cpp
+1-0llvm/test/lit.cfg.py
+112-164 files

LLVM/project c1e4550llvm/include/llvm/IR ProfDataUtils.h, llvm/lib/IR ProfDataUtils.cpp

[MergeICmp][profcheck] Propagate profile info
DeltaFile
+25-12llvm/test/Transforms/MergeICmps/X86/alias-merge-blocks.ll
+32-2llvm/lib/Transforms/Scalar/MergeICmps.cpp
+21-7llvm/test/Transforms/MergeICmps/X86/entry-block-shuffled.ll
+3-0llvm/include/llvm/IR/ProfDataUtils.h
+1-1llvm/lib/IR/ProfDataUtils.cpp
+82-225 files

LLVM/project e7a9788llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Transforms/LowerTypeTests function-weak.ll

[LTT] Mark as unkown weak function tests.
DeltaFile
+3-2llvm/test/Transforms/LowerTypeTests/function-weak.ll
+3-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+6-22 files

LLVM/project 99a9fcellvm/lib/Transforms/Scalar MemCpyOptimizer.cpp, llvm/test/Transforms/MemCpyOpt memset-memcpy-dbgloc.ll

[MemCpyOpt][profcheck] Set `unknown` branch weights for certain selects
DeltaFile
+5-3llvm/test/Transforms/MemCpyOpt/memset-memcpy-dbgloc.ll
+3-0llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+8-32 files

LLVM/project 9a54c8dllvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Other new-pm-O0-defaults.ll

[LTT][profcheck] Set branch weights for complex llvm.type.test lowering
DeltaFile
+38-11llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+21-2llvm/test/Transforms/LowerTypeTests/section.ll
+1-0llvm/test/Other/new-pm-O0-defaults.ll
+60-133 files

LLVM/project 3d41cbbllvm/lib/Transforms/Scalar PartiallyInlineLibCalls.cpp, llvm/test/Transforms/PartiallyInlineLibCalls/X86 good-prototype.ll

[PILC][profcheck] Bias branch weights when optimizing sqrt (#167742)

Biasing towards the native `sqrt`​ not returning NaN.  


Issue #147390
DeltaFile
+13-1llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
+9-4llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll
+22-52 files

LLVM/project 471d804llvm/cmake/modules AddLLVM.cmake

[CMake][unittests] Teach export_executable_symbols about ALIAS targets (#167932)

DynamicLibraryTests has a workaround for AIX that calls
export_executable_symbols after add_llvm_unittest, instead of just
passing the `EXPORT_SYMBOLS` switch. At this point, the
default_gtest(_main) libraries is added to the linked library set.
However, default_gtest(_main) are ALIAS libraries. This PR replaces the
ALIAS libraries with the ALIASED_TARGET before passing it to
extract_symbols.py.

Fixes failure of the clang-ppc64-aix buildbot after #164794.
DeltaFile
+8-0llvm/cmake/modules/AddLLVM.cmake
+8-01 files

LLVM/project 5385f41clang-tools-extra/clang-tidy/google TodoCommentCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Update google todo checker with style guide changes. (#165565)

The [Google style guide] now allows (and recommends) writing TODOs with
the following format:

```cpp
// TODO: bug reference - details about what needs to be done.
```

With this change the checker accepts the new style and suggests in in
the fix-it hint. The previous style is still accepted.

[Google style guide]:
https://google.github.io/styleguide/cppguide.html#TODO_Comments
DeltaFile
+75-11clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp
+40-0clang-tools-extra/test/clang-tidy/checkers/google/readability-todo-hyphen.cpp
+40-0clang-tools-extra/test/clang-tidy/checkers/google/readability-todo-parentheses.cpp
+0-26clang-tools-extra/test/clang-tidy/checkers/google/readability-todo.cpp
+11-0clang-tools-extra/docs/clang-tidy/checks/google/readability-todo.rst
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+170-371 files not shown
+172-377 files

LLVM/project 28594e2llvm/lib/Transforms/Scalar MemCpyOptimizer.cpp, llvm/test/Transforms/MemCpyOpt memset-memcpy-dbgloc.ll

[MemCpyOpt][profcheck] Set `unknown` branch weights for certain selects
DeltaFile
+5-3llvm/test/Transforms/MemCpyOpt/memset-memcpy-dbgloc.ll
+3-0llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+8-32 files

LLVM/project 2bc1823llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Other new-pm-O0-defaults.ll

[LTT][profcheck] Set branch weights for complex llvm.type.test lowering
DeltaFile
+38-11llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+21-2llvm/test/Transforms/LowerTypeTests/section.ll
+1-0llvm/test/Other/new-pm-O0-defaults.ll
+60-133 files

LLVM/project 473fd29llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Transforms/LowerTypeTests function-weak.ll

[LTT] Mark as unkown weak function tests.
DeltaFile
+3-2llvm/test/Transforms/LowerTypeTests/function-weak.ll
+3-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+6-22 files