LLVM/project a8783dclldb/test/Shell/ScriptInterpreter/Python bytecode.test

[lldb][bytecode] Disable bytecode.test on windows (#185096)

The test is failing on the lldb-x86_64-win buildbot.
DeltaFile
+1-0lldb/test/Shell/ScriptInterpreter/Python/bytecode.test
+1-01 files

LLVM/project df783c5llvm/docs/TableGen ProgRef.rst, llvm/lib/TableGen TGParser.cpp TGParser.h

[TableGen] Add let append/prepend syntax for field concatenation
DeltaFile
+224-0llvm/test/TableGen/let-append.td
+91-14llvm/lib/TableGen/TGParser.cpp
+63-0llvm/test/TableGen/let-append-toplevel.td
+45-2llvm/docs/TableGen/ProgRef.rst
+22-4llvm/lib/TableGen/TGParser.h
+13-0llvm/test/TableGen/let-append-error.td
+458-202 files not shown
+483-208 files

LLVM/project 0d71610clang/test/CodeGenObjC expose-direct-method-visibility-linkage.m expose-direct-method-linkedlist.m

add darwin back
DeltaFile
+0-48clang/test/CodeGenObjC/expose-direct-method-visibility-linkage.m
+1-0clang/test/CodeGenObjC/expose-direct-method-linkedlist.m
+1-482 files

LLVM/project ab10f08clang/lib/CIR/CodeGen CIRGenFunction.cpp CIRGenVTables.cpp, clang/test/CIR/CodeGen thunks.cpp

[CIR] Fix a crash when source location is unknown (#185059)

When we call `getLoc()` with an invalid `SourceLocation` and
`currSrcLoc` is also invalid, we were crashing or asserting. I tracked
down one case where this was happening (generating an argument in a
vtable thunk) and fixed that to provide a location. I also am updating
the `getLoc()` implementation so that it will use an unknown location in
release builds rather than crashing because the location isn't critical
for correct compilation.
DeltaFile
+64-0clang/test/CIR/CodeGen/thunks.cpp
+12-4clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+2-2clang/lib/CIR/CodeGen/CIRGenVTables.cpp
+78-63 files

LLVM/project d32ffdeclang/docs ClangIRABILowering.md index.rst

[CIR] Add MLIR ABI Lowering design document

Design document for MLIR dialect-agnostic calling convention
lowering that builds on the LLVM ABI Lowering Library
(llvm/lib/ABI/) as the single source of truth for ABI
classification.  Dialects use the library via an adapter layer:
ABITypeMapper maps dialect types to abi::Type*, the library
classifies arguments and returns, and a dialect-specific
ABIRewriteContext applies the decisions back to IR operations.

Targets x86_64 and AArch64, with parity against Classic Clang
CodeGen validated through differential testing.
DeltaFile
+545-0clang/docs/ClangIRABILowering.md
+1-0clang/docs/index.rst
+546-02 files

LLVM/project 2cb01dcclang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp CMakeLists.txt

[clang-doc] Fix benchmark not compiling (#185065)

CI didn't flag that the benchmark was using the outdated Ctx call
when landing the Mustache MD patch since this benchmark isn't tested.
Also added missing libraries in CMake that prevented me from building
the benchmark locally.
DeltaFile
+2-2clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+2-0clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt
+4-22 files

LLVM/project 918d0fellvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp, llvm/test/CodeGen/AMDGPU asyncmark-pregfx12.ll asyncmark-waitcnt.mir

[AMDGPU] fix asyncmark soft waitcnt bug (#184851)

Asyncmarks record the current wait state and so should not allow waitcnts that occur after them to be merged into waitcnts that occur before.
DeltaFile
+111-8llvm/test/CodeGen/AMDGPU/asyncmark-pregfx12.ll
+25-0llvm/test/CodeGen/AMDGPU/asyncmark-waitcnt.mir
+11-7llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+147-153 files

LLVM/project 097122cclang/lib/CodeGen CGExprCXX.cpp, clang/test/CodeGenCXX microsoft-abi-diamond-template-multiple-vbptrs.cpp

  [clang][CodeGen] Fix size calculation in vbptr split memory region in EmitNullBaseClassInitialization (#184558)

When splitting memory stores around multiple virtual base pointers
(vbptrs)
in the Microsoft ABI, the calculation for the size of the memory region
after
  each vbptr was incorrect.

The bug/old calculation: SplitAfterSize = LastStoreSize -
SplitAfterOffset
  This subtracts an absolute offset from a relative size, causing
  incorrect (too small) sizes after the second vbptr.
  
  The correct size should be:
  SplitAfterSize = (LastStoreOffset + LastStoreSize) - SplitAfterOffset

Since all store regions extend to the end of the non-virtual portion
(NVSize),
  this patch uses the simplified form: 

    [3 lines not shown]
DeltaFile
+122-0clang/test/CodeGenCXX/microsoft-abi-diamond-template-multiple-vbptrs.cpp
+1-2clang/lib/CodeGen/CGExprCXX.cpp
+123-22 files

LLVM/project 216a3f1utils/bazel/llvm-project-overlay/clang BUILD.bazel

[Bazel] Fixes 3da28bf (#185082)

This fixes 3da28bfbce4d7ac8eaea6b8489031d01748d4fc5.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+5-0utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+5-01 files

LLVM/project 25e201bclang/test/CodeGenObjC expose-direct-method-cross-linkage.m

Address reviewer's concerns
DeltaFile
+0-174clang/test/CodeGenObjC/expose-direct-method-cross-linkage.m
+0-1741 files

LLVM/project 2065c7fllvm/test/Instrumentation/AddressSanitizer basic-msvc64.ll

clean up triple + arg
DeltaFile
+1-2llvm/test/Instrumentation/AddressSanitizer/basic-msvc64.ll
+1-21 files

LLVM/project 9cc615allvm/lib/Transforms/Scalar LoopFuse.cpp

[LoopFusion] remove else after return (NFC) (#184993)

A bit of a small nitpick, close it if unnecessary. (clang-tidy warnings)
DeltaFile
+2-4llvm/lib/Transforms/Scalar/LoopFuse.cpp
+2-41 files

LLVM/project f01f875clang/test/CodeGenObjC expose-direct-method.m expose-direct-method-varargs.m

Address reviewer's concerns
DeltaFile
+41-2clang/test/CodeGenObjC/expose-direct-method.m
+3-3clang/test/CodeGenObjC/expose-direct-method-varargs.m
+2-2clang/test/CodeGenObjC/expose-direct-method-linkedlist.m
+46-73 files

LLVM/project 57f1ec6compiler-rt/lib/builtins CMakeLists.txt

builtins: adjust FP80 source management (#183871)

We would previously include the FP80 sources into the Windows build if
we built with the GNU driver rather than the `cl` driver.
DeltaFile
+13-7compiler-rt/lib/builtins/CMakeLists.txt
+13-71 files

LLVM/project 7af05aeclang/lib/CodeGen ItaniumCXXABI.cpp, clang/test/DebugInfo/CXX ptrauth-member-function-pointer-debuglocs.cpp

[AArch64][PAC] Emit `!dbg` locations in `*_vfpthunk_` functions (#179688)

The usage of pointers to member functions with Pointer Authentication
requires generation of `*_vfpthunk_` functions. These thunk functions
can be later inlined and optimized by replacing the indirect call
instruction with a direct one and then inlining that function call.

In absence of `!dbg` metadata attached to the original call instruction,
such inlining ultimately results in an assertion "!dbg attachment points
at wrong subprogram for function" in the assertions-enabled builds. By
manually executing `opt` with `-verify-each` option on the LLVM IR
produced by the frontend, an actual issue can be observed: "inlinable
function call in a function with debug info must have a !dbg location"
after the replacement of indirect call instruction with the direct one
takes place.

This commit fixes the issue by attaching artificial `!dbg` locations to
the original call instruction (as well as most other instructions in
`*_vfpthunk_` function) the same way it is done for other

    [3 lines not shown]
DeltaFile
+39-0clang/test/DebugInfo/CXX/ptrauth-member-function-pointer-debuglocs.cpp
+4-0clang/lib/CodeGen/ItaniumCXXABI.cpp
+43-02 files

LLVM/project 0eb9577clang/lib/AST PrintfFormatString.cpp FormatString.cpp, clang/lib/Sema SemaChecking.cpp

add format string handling

(cherry picked from commit 20a6fdfe3045eebaf1acc4fff7269c66e85e10c3)
(cherry picked from commit f416afce1fda8733c693aaef3f15c8b099154c20)
DeltaFile
+241-164clang/lib/AST/PrintfFormatString.cpp
+128-118clang/lib/AST/FormatString.cpp
+104-51clang/lib/AST/ScanfFormatString.cpp
+40-36clang/lib/Sema/SemaChecking.cpp
+23-16clang/lib/AST/FormatStringParsing.h
+19-0llvm/lib/Support/TextEncoding.cpp
+555-38512 files not shown
+618-39718 files

LLVM/project 08cd2e9clang/include/clang/Basic TargetInfo.h, clang/lib/AST ASTContext.cpp

convert to exec-charset inside getPredefinedStringLiteralFromCache, test __builtin_FILE()

(cherry picked from commit 9e4f1d155064ed3cef04ce15df068ca906aa3c55)
DeltaFile
+28-0clang/test/CodeGen/systemz-charset.cpp
+10-0clang/lib/AST/ASTContext.cpp
+5-4clang/lib/Lex/TextEncodingConfig.cpp
+3-0clang/lib/Basic/TargetInfo.cpp
+2-0clang/include/clang/Basic/TargetInfo.h
+0-1llvm/include/llvm/Support/TextEncoding.h
+48-56 files

LLVM/project 3da28bfclang/include/clang/Basic Diagnostic.td, clang/lib/Basic DiagnosticIDs.cpp

[clang][diagnostics] Stable IDs for Clang diagnostics (#168153)

Part of the implementation of [[RFC] Emitting Auditable SARIF Logs from
Clang](https://discourse.llvm.org/t/rfc-emitting-auditable-sarif-logs-from-clang/88624)

SARIF diagnostics require that each rule have a stable `id` property to
identify that rule across runs, even when the compiler or analysis tool
has changed. We were previously setting the `id` property to the numeric
value of the enum value for that diagnostic within the Clang
implementation; this value changes whenever an unrelated diagnostic is
inserted or removed earlier in the list.

This change sets the `id` property to the _text_ of that same enum
value. This value would only change if someone renames the enum value
for that diagnostic, which should happen much less frequently than
renumbering.

For now, we will just assume that renaming happens infrequently enough
that existing consumers of SARIF will not notice. In the future, we

    [32 lines not shown]
DeltaFile
+424-0clang/test/Frontend/Inputs/expected-sarif/sarif-diagnostics.cpp.sarif
+144-1clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
+72-4clang/lib/Basic/DiagnosticIDs.cpp
+76-0clang/test/Frontend/Inputs/expected-sarif/sarif-legacy-stable-ids.c.sarif
+5-45clang/test/Frontend/sarif-diagnostics.cpp
+21-0clang/include/clang/Basic/Diagnostic.td
+742-5016 files not shown
+821-8222 files

LLVM/project fe58a85clang/lib/Frontend VerifyDiagnosticConsumer.cpp, clang/lib/Interpreter IncrementalParser.cpp

[clang-repl] Create virtual files for `input_line_N` buffers (#182044)

Instead of using memory buffers without file backing, this patch
`input_line_N` buffers as virtual files.

This patch enables us to use input line numbers when verifying tests
`clang-repl`.

Co-authored-by: Vassil Vassilev <v.g.vassilev at gmail.com>
(cherry picked from commit 9cc0df99de853a3cdf778c0c33e4fb5050c46c5b)
DeltaFile
+20-4clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
+16-0clang/test/Interpreter/verify-diagnostics.cpp
+11-2clang/lib/Interpreter/IncrementalParser.cpp
+47-63 files

LLVM/project 92249a3llvm/lib/Target/Hexagon HexagonISelLoweringHVX.cpp HexagonISelLowering.h, llvm/test/CodeGen/Hexagon/autohvx isel-hvx-rescale-predicate.ll

[Hexagon] Avoid contracting predicates in createHvxPrefixPred (#183081)

The function createHvxPrefixPred should only need to expand a predicate
to match the result's bytes-per-bit. Otherwise, contracting of the
predicate may lead to an input that is shorter than 4 bytes, making it
unsuitable for VINSERTW0.

When calling createHvxPrefixPred for vector concatention, re-group the
inputs to the concat to make sure that the resulting inputs to
createHvxPrefixPred would not need contraction.

Fixes https://github.com/llvm/llvm-project/issues/181362
DeltaFile
+58-30llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
+14-0llvm/test/CodeGen/Hexagon/autohvx/isel-hvx-rescale-predicate.ll
+4-0llvm/lib/Target/Hexagon/HexagonISelLowering.h
+76-303 files

LLVM/project 3a58299clang/include/clang/Sema Sema.h, clang/lib/Parse ParseDeclCXX.cpp ParseExpr.cpp

do not translate unevaluated strings

(cherry picked from commit 585e24b1bfd5052dbc066679246d7e4562a78256)
DeltaFile
+15-0clang/test/CodeGen/systemz-charset.c
+3-7clang/lib/Parse/ParseDeclCXX.cpp
+9-0clang/test/CodeGen/systemz-charset-diag.cpp
+3-4clang/lib/Sema/SemaExpr.cpp
+1-3clang/include/clang/Sema/Sema.h
+1-2clang/lib/Parse/ParseExpr.cpp
+32-161 files not shown
+32-197 files

LLVM/project 8eb9d33clang/include/clang/Sema Sema.h, clang/lib/Parse ParseDecl.cpp ParseDeclCXX.cpp

add ParserConversionAction

(cherry picked from commit c2647a73957921d3f7a53c6f25a69f1cc2725aa3)
(cherry picked from commit 2533cb58131041dee287897c5af79d6b5147a81b)
DeltaFile
+13-0clang/lib/Parse/ParseDecl.cpp
+7-5clang/lib/Sema/SemaExpr.cpp
+7-3clang/lib/Parse/ParseDeclCXX.cpp
+5-4clang/lib/Parse/ParseExpr.cpp
+6-2clang/include/clang/Sema/Sema.h
+4-0clang/lib/Parse/Parser.cpp
+42-141 files not shown
+43-147 files

LLVM/project b332e17clang/include/clang/Basic TokenKinds.h, clang/include/clang/Lex TextEncodingConfig.h

address comments
DeltaFile
+14-9clang/include/clang/Options/Options.td
+12-9clang/lib/Lex/LiteralSupport.cpp
+0-5clang/include/clang/Basic/TokenKinds.h
+1-2clang/include/clang/Lex/TextEncodingConfig.h
+1-2clang/lib/Lex/TextEncodingConfig.cpp
+1-1clang/lib/Frontend/CompilerInstance.cpp
+29-286 files

LLVM/project 382ae50.ci/green-dragon clang-stage1-RA.groovy

[green dragon] add stage1-RA job to release/22.x
DeltaFile
+37-0.ci/green-dragon/clang-stage1-RA.groovy
+37-01 files

LLVM/project c3f0a2cllvm/test/Transforms/Reassociate reassociate-decrement-dbgvalue.ll

[DebugInfo][Reassociate] Use debug records instead of intrinsics in test (#185031)

As per
https://github.com/llvm/llvm-project/pull/182730#pullrequestreview-3904549897
DeltaFile
+2-4llvm/test/Transforms/Reassociate/reassociate-decrement-dbgvalue.ll
+2-41 files

LLVM/project e2f7f83clang/lib/CodeGen CGExprAgg.cpp, clang/test/CodeGenHIP placement-new-addrspace.hip

[Clang] Fix invalid sret addrspacecast for placement new on HIP (#183639)

When a HIP kernel uses placement new with a function returning an
aggregate via sret (e.g. `new (out) T(make_t())`), and the placement
destination is in global memory (addrspace 1), the sret pointer was
addrspacecast'd to addrspace 5 (private), producing an invalid pointer
that faults at runtime.

Instead of casting the caller's pointer directly, materialise a
temporary alloca in the callee's expected address space, pass that as
the sret argument, and copy the result back to the original destination
after the call.
DeltaFile
+63-0clang/test/CodeGenHIP/placement-new-addrspace.hip
+21-1clang/lib/CodeGen/CGExprAgg.cpp
+2-4clang/test/OpenMP/amdgcn_sret_ctor.cpp
+86-53 files

LLVM/project 8ea55d3llvm/lib/Target/AMDGPU SILoadStoreOptimizer.cpp, llvm/test/CodeGen/AMDGPU promote-constOffset-to-imm-gfx12.mir promote-constOffset-to-imm-gfx12.ll

[AMDGPU] Disable negative imm offset for async load/store instructions
DeltaFile
+20-16llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm-gfx12.mir
+6-7llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm-gfx12.ll
+3-1llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+29-243 files

LLVM/project afc4af5clang/lib/CIR/CodeGen CIRGenExprConstant.cpp, clang/lib/CIR/Dialect/IR CIRAttrs.cpp

[CIR] Fix array constant initialization with trailing zeros (#184933)

If an array is explicitly initialized with more than eight non-zero
values followed by a number of explicit zero initializers, CIR generates
a constant record initializer with a constant array that is declared as
the size of the non-zero initializers but with the explicit zero
initializers included in the array initialization attribute. This
resulted in an error when we tried to lower that attribute to LLVM IR.

This patch fixes that problem and adds a verifier to ConstantArrayAttr
to check for that condition.
DeltaFile
+23-0clang/test/CIR/CodeGen/array.cpp
+6-0clang/test/CIR/IR/invalid-const-array.cir
+4-0clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
+2-2clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
+35-24 files

LLVM/project 3d108beutils/bazel/llvm-project-overlay/mlir/test BUILD.bazel

[Bazel] Fix build for 00e247a

d442cc30a9f2bb83f75fead811050137905d9fc4 tried to fix this, but missed
some test dependencies.
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+1-01 files

LLVM/project 0311bb6llvm/test/tools/llubi loadstore_le.ll loadstore_be.ll, llvm/tools/llubi/lib Context.cpp Interpreter.cpp

[llubi] Add support for load/store/lifetime markers (#182532)

Bytes are adjusted to respect the incoming byte type proposed in
https://discourse.llvm.org/t/rfc-add-a-new-byte-type-to-llvm-ir/89522.

Note that the current implementation of constant folding doesn't handle
bitcasts with weird types like `<8 x i3> to <3 x i8>`:

https://github.com/llvm/llvm-project/blob/49de34459c99b33c27aae4596ed5e67ce3d89eae/llvm/lib/Analysis/ConstantFolding.cpp#L223-L232
So I take the result from Alive2 as reference:
https://alive2.llvm.org/ce/z/ZGA_xP
DeltaFile
+303-32llvm/tools/llubi/lib/Context.cpp
+192-0llvm/test/tools/llubi/loadstore_le.ll
+190-0llvm/test/tools/llubi/loadstore_be.ll
+127-8llvm/tools/llubi/lib/Interpreter.cpp
+46-17llvm/tools/llubi/lib/Value.h
+42-4llvm/tools/llubi/lib/Context.h
+900-619 files not shown
+1,048-6515 files