Progress:
In progressChanges

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

Summary

  1. [MSan] Set zeroext on call arguments to msan functions with zeroext parameter attribute (details)
  2. [TargetLowering] Only inspect attributes in the arguments for ArgListEntry (details)
  3. [NFC] Use ArgListEntry indirect types more in ISel lowering (details)
  4. [docs] Fix broken docs after 1c7f32334 (details)
  5. [mlir-docs] Add a blurb on recursion during pattern application (details)
  6. [mlir] Allow derived rewrite patterns to define a non-virtual `initialize` hook (details)
  7. [x86] trim zeros from constants for readability; NFC (details)
  8. [x86] add FMF propagation test for target-specific intrinsic; NFC (details)
  9. scudo: Test realloc on increasing size buffers. (details)
  10. [Demangle][Rust] Parse named types (details)
  11. [Demangle][Rust] Parse array type (details)
  12. [Demangle][Rust] Parse slice type (details)
  13. [Demangle][Rust] Parse tuples (details)
  14. Default stack alignment of x86 NaCl to 16 bytes (details)
  15. [symbolizer] Added StartAddress for the resolved function. (details)
  16. [Demangle][Rust] Speculative fix for bot build failure (details)
  17. [OpenMP] Stabilize OpenMP/parallel_for_codegen.cpp test (NFC) (details)
  18. [SampleFDO] New hierarchical discriminator for Flow Sensitive SampleFDO (details)
  19. [gn build] Port 886629a8c9e5 (details)
  20. Fix a buildbot failure from commit 886629a8 (details)
  21. [libc++] Some fixes to the <bit> utilities. (details)
  22. [libc++] Alphabetize header inclusions and include-what-you-use <__debug>. NFCI. (details)
  23. Apply [[standalone_debug]] to some types in the STL. (details)
  24. [mlir] Speed up Lexer::getEncodedSourceLocation (details)
  25. Add a helper function to convert LogicalResult to int for return from main (details)
Commit b86302e500791481da5f446c700a63693b355024 by aeubanks
[MSan] Set zeroext on call arguments to msan functions with zeroext parameter attribute

ABI attributes need to match between the caller and callee.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D102667
The file was modifiedllvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
The file was modifiedllvm/test/Instrumentation/MemorySanitizer/with-call-type-size.ll
The file was modifiedllvm/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll
Commit 1c7f32334d4becc725b9025fd32291a0e5729acd by aeubanks
[TargetLowering] Only inspect attributes in the arguments for ArgListEntry

Parameter attributes are considered part of the function [1], and like
mismatched calling conventions [2], we can't have the verifier check for
mismatched parameter attributes.

This is a reland after fixing MSan issues in D102667.

[1] https://llvm.org/docs/LangRef.html#parameter-attributes
[2] https://llvm.org/docs/FAQ.html#why-does-instcombine-simplifycfg-turn-a-call-to-a-function-with-a-mismatched-calling-convention-into-unreachable-why-not-make-the-verifier-reject-it

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D101806
The file was modifiedllvm/test/CodeGen/AMDGPU/call-argument-types.ll
The file was modifiedllvm/test/CodeGen/ARM/this-return.ll
The file was modifiedllvm/test/CodeGen/X86/fast-cc-pass-in-regs.ll
The file was modifiedllvm/test/CodeGen/ARM/returned-ext.ll
The file was modifiedllvm/test/CodeGen/SPARC/64abi.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-special-input-vgprs.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/gfx-callable-argument-types.ll
The file was modifiedllvm/test/CodeGen/X86/tailcall-msvc-conventions.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/tail-call-amdgpu-gfx.ll
The file was modifiedllvm/test/CodeGen/X86/preallocated.ll
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedllvm/test/CodeGen/ARM/ipra-r0-returned.ll
The file was modifiedllvm/test/CodeGen/X86/fast-cc-merge-stack-adj.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/movtopush.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-this-return.ll
The file was modifiedllvm/test/CodeGen/AArch64/tailcall-explicit-sret.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-special-input-vgprs-packed.ll
The file was modifiedllvm/test/CodeGen/SystemZ/args-02.ll
The file was addedllvm/test/CodeGen/X86/mismatched-byval.ll
The file was modifiedllvm/test/CodeGen/SystemZ/args-03.ll
The file was modifiedllvm/test/CodeGen/AArch64/bitfield-extract.ll
The file was modifiedllvm/test/CodeGen/X86/pop-stack-cleanup.ll
Commit bc7d15c61da78864b35e3c114294d6e4db645611 by aeubanks
[NFC] Use ArgListEntry indirect types more in ISel lowering

For opaque pointers, we're trying to avoid uses of
PointerType::getElementType().

A couple of ISel places use PointerType::getElementType(). Some of these
are easy to fix by using ArgListEntry's indirect types.

The inalloca type wasn't stored there, as opposed to preallocated and
byval which have their indirect types available, so add it and use it.

This is a reland after an MSan fix in D102667.

Differential Revision: https://reviews.llvm.org/D101713
The file was modifiedllvm/include/llvm/IR/InstrTypes.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/FastISel.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
Commit b9d25cc9213887a36d987b7d0057b8aafa6adee4 by aeubanks
[docs] Fix broken docs after 1c7f32334
The file was modifiedllvm/docs/ReleaseNotes.rst
Commit 93cb71a4649ac71b9aca48ba5496f11ffbc4b26d by riddleriver
[mlir-docs] Add a blurb on recursion during pattern application

We currently do not document how the pattern rewriter infra treats recursion when it gets detected. This revision adds a blurb on recursion in patterns, and how patterns can signal that they are equipped to handle it.

Differential Revision: https://reviews.llvm.org/D102439
The file was modifiedmlir/docs/PatternRewriter.md
Commit 2257e4a70e4aabe7255161f3a54922d7dcf1c059 by riddleriver
[mlir] Allow derived rewrite patterns to define a non-virtual `initialize` hook

This is a hook that allows for providing custom initialization of the pattern, e.g. if it has bounded recursion, setting the debug name, etc., without needing to define a custom constructor. A non-virtual hook was chosen to avoid polluting the vtable with code that we really just want to be inlined when constructing the pattern. The alternative to this would be to just define a constructor for each pattern, this unfortunately creates a lot of otherwise unnecessary boiler plate for a lot of patterns and a hook provides a much simpler/cleaner interface for the very common case.

Differential Revision: https://reviews.llvm.org/D102440
The file was modifiedmlir/docs/PatternRewriter.md
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/include/mlir/IR/PatternMatch.h
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
Commit 7d15c4941499b1454432d63604dc6bbe56e32ce7 by spatel
[x86] trim zeros from constants for readability; NFC
The file was modifiedllvm/test/CodeGen/X86/fma-fneg-combine.ll
Commit 62eec33616a462c5860cd980450d53c632b123e8 by spatel
[x86] add FMF propagation test for target-specific intrinsic; NFC
The file was modifiedllvm/test/CodeGen/X86/fmf-propagation.ll
Commit 8e93d10633d751a3e9169bf9fa68326925ffa097 by peter
scudo: Test realloc on increasing size buffers.

While developing a change to the allocator I ended up breaking
realloc on secondary allocations with increasing sizes. That didn't
cause any of the unit tests to fail, which indicated that we're
missing some test coverage here. Add a unit test for that case.

Differential Revision: https://reviews.llvm.org/D102716
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
Commit 068332978c672afb7504b2d2856d0df9010f27bf by tomasz.miasko
[Demangle][Rust] Parse named types

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102571
The file was modifiedllvm/include/llvm/Demangle/RustDemangle.h
The file was modifiedllvm/test/Demangle/rust.test
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
Commit b42400ccf3be9c8a422f175e16109e358298973c by tomasz.miasko
[Demangle][Rust] Parse array type

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102573
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
The file was modifiedllvm/test/Demangle/rust.test
Commit a84c65c204ccbd2647eb567d1f7a9dca4ded977f by tomasz.miasko
[Demangle][Rust] Parse slice type

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102578
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
The file was modifiedllvm/test/Demangle/rust.test
Commit 774de7a09bee2e21f3cd7d8f8a001d83e2654483 by tomasz.miasko
[Demangle][Rust] Parse tuples

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102579
The file was modifiedllvm/test/Demangle/rust.test
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
Commit 5f2b27666797c6462641434fee7ee010c77d22c0 by dschuff
Default stack alignment of x86 NaCl to 16 bytes

X86 NaCl generally requires the stack to be aligned to 16 bytes.
This change was already implemented in two downstream NaCl compilers
based on llvm.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D102610
The file was modifiedllvm/lib/Target/X86/X86Subtarget.cpp
The file was modifiedllvm/test/CodeGen/X86/stack-align2.ll
Commit 4fedb3a613a3ebfb91f42b454e476c29cd05b8f5 by aorlov
[symbolizer] Added StartAddress for the resolved function.

In many cases it is helpful to know at what address the resolved function starts.
This patch adds a new StartAddress member to the DILineInfo structure.

Reviewed By: jhenderson, dblaikie

Differential Revision: https://reviews.llvm.org/D102316
The file was modifiedllvm/include/llvm/DebugInfo/DIContext.h
The file was modifiedllvm/test/tools/llvm-symbolizer/sym-verbose.test
The file was modifiedllvm/lib/DebugInfo/Symbolize/DIPrinter.cpp
The file was modifiedllvm/docs/CommandGuide/llvm-symbolizer.rst
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFContext.cpp
The file was modifiedllvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
The file was modifiedllvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h
The file was modifiedllvm/test/tools/llvm-symbolizer/output-style-json-code.test
Commit 57f408861d423ead3fc408dbb203778938eb2fe3 by tomasz.miasko
[Demangle][Rust] Speculative fix for bot build failure

> error: ‘InType’ is not a class, namespace, or enumeration
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
Commit ff99fdf63f9939d5205c0c0df85f28c5509eac0f by michael.p.rice
[OpenMP] Stabilize OpenMP/parallel_for_codegen.cpp test (NFC)

Revert recent commit to require x86-registered-target (e4b790c5e3653053819182a67c593bc65de860ac).
Remove -O1 from the run lines so they are less dependent on backend passes.
Update the CHECK6 and CHECK10 lines with script.

Differential Revision: https://reviews.llvm.org/D102720
The file was modifiedclang/test/OpenMP/parallel_for_codegen.cpp
Commit 886629a8c9e58752627d8ae7abf6fa93191a3df8 by xur
[SampleFDO] New hierarchical discriminator for Flow Sensitive SampleFDO

This patch implements first part of Flow Sensitive SampleFDO (FSAFDO).
It has the following changes:
(1) disable current discriminator encoding scheme,
(2) new hierarchical discriminator for FSAFDO.

For this patch, option "-enable-fs-discriminator=true" turns on the new
functionality. Option "-enable-fs-discriminator=false" (the default)
keeps the current SampleFDO behavior. When the fs-discriminator is
enabled, we insert a flag variable, namely, llvm_fs_discriminator, to
the object. This symbol will checked by create_llvm_prof tool, and used
to generate a profile with FS-AFDO discriminators enabled. If this
happens, for an extbinary format profile, create_llvm_prof tool
will add a flag to profile summary section.

Differential Revision: https://reviews.llvm.org/D102246
The file was addedllvm/include/llvm/CodeGen/MIRFSDiscriminator.h
The file was modifiedllvm/lib/CodeGen/TargetPassConfig.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was addedllvm/test/CodeGen/X86/fsafdo_test2.ll
The file was modifiedllvm/lib/CodeGen/CMakeLists.txt
The file was addedllvm/lib/CodeGen/MIRFSDiscriminator.cpp
The file was modifiedllvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was modifiedllvm/include/llvm/LTO/Config.h
The file was modifiedllvm/lib/LTO/LTOBackend.cpp
The file was addedllvm/include/llvm/Support/Discriminator.h
The file was addedllvm/test/CodeGen/X86/fsafdo_test1.ll
The file was modifiedllvm/include/llvm/IR/DebugInfoMetadata.h
The file was modifiedllvm/include/llvm/CodeGen/Passes.h
The file was modifiedllvm/lib/Transforms/Utils/LoopUnroll.cpp
The file was modifiedllvm/lib/IR/DebugInfoMetadata.cpp
Commit 09ac3523b6729c9300e044081c442c304602cfd9 by llvmgnsyncbot
[gn build] Port 886629a8c9e5
The file was modifiedllvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
Commit a32e39a75b8137ee20c623887cbc1b4865e49b94 by xur
Fix a buildbot failure from commit 886629a8
The file was modifiedllvm/lib/CodeGen/MIRFSDiscriminator.cpp
Commit e130fbe24e5801feba4526ef5b190acbefba7d91 by arthur.j.odwyer
[libc++] Some fixes to the <bit> utilities.

Fix __bitop_unsigned_integer and rename to __libcpp_is_unsigned_integer.
There are only five unsigned integer types, so we should just list them out.
Also provide `__libcpp_is_signed_integer`, even though the Standard doesn't
consume that trait anywhere yet.

Notice that `concept uniform_random_bit_generator` is specifically specified
to rely on `concept unsigned_integral` and *not* `__is_unsigned_integer`.
Instantiating `std::ranges::sample` with a type `U` satisfying
`uniform_random_bit_generator` where `unsigned_integral<U::result_type>`
and not `__is_unsigned_integer<U::result_type>` is simply IFNDR.

Orthogonally, fix an undefined behavior in std::countr_zero(__uint128_t).

Orthogonally, improve tests for the <bit> manipulation functions.
It was these new tests that detected the bug in countr_zero.

Differential Revision: https://reviews.llvm.org/D102328
The file was modifiedlibcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
The file was modifiedlibcxx/include/bit
The file was modifiedlibcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp
The file was modifiedlibcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
The file was modifiedlibcxx/include/type_traits
Commit 06b40e80aefc9a7ccf2efbf7717037bd103a779c by arthur.j.odwyer
[libc++] Alphabetize header inclusions and include-what-you-use <__debug>. NFCI.
The file was modifiedlibcxx/include/regex
The file was modifiedlibcxx/include/future
The file was modifiedlibcxx/include/functional
The file was modifiedlibcxx/include/fstream
The file was modifiedlibcxx/include/__node_handle
The file was modifiedlibcxx/include/numeric
The file was modifiedlibcxx/include/bit
The file was modifiedlibcxx/include/set
The file was modifiedlibcxx/include/deque
The file was modifiedlibcxx/include/span
The file was modifiedlibcxx/include/map
Commit 7c2f58278e664d336e9d0ef0687bdd6c3837dc03 by akhuang
Apply [[standalone_debug]] to some types in the STL.

Add this attribute to some types to ensure that they have
debug info.
The debug info for these classes are required for debuggers to display
some STL types. With constructor homing (a new debug info optimization)
their debug info isn't emitted because their constructors are never
called.

The list of types with the attribute added are __hash_value_type,
__value_type, __tree_node_base, __tree_node, __hash_node, __list_node,
and __forward_list_node.

Differential Revision: https://reviews.llvm.org/D98750
The file was modifiedlibcxx/include/unordered_map
The file was modifiedlibcxx/include/list
The file was modifiedlibcxx/include/__config
The file was modifiedlibcxx/include/map
The file was modifiedlibcxx/include/__tree
The file was modifiedlibcxx/include/forward_list
The file was modifiedlibcxx/include/__hash_table
Commit 861d69a5259653f60d59795597493a7939b794fe by riddleriver
[mlir] Speed up Lexer::getEncodedSourceLocation

We currently use SourceMgr::getLineAndColumn to get the line and column for an SMLoc, but this includes a call to StringRef::find_last_of that ends up dominating compile time. In D102567, we start creating locations from the input file for block arguments which resulted in an extreme performance regression for modules with very large amounts of block arguments. This revision switches to just using a pointer offset from the beginning of the line to calculate the column(all MLIR files are simple ascii), resulting in a compile time reduction from 4700 seconds (1 hour and 18 minutes) to 8 seconds.

Differential Revision: https://reviews.llvm.org/D102734
The file was modifiedmlir/lib/Parser/Lexer.cpp
Commit 58369fce30af484889356f225d89cb0b32009206 by joker.eph
Add a helper function to convert LogicalResult to int for return from main

At present, a lot of code contains main function bodies like "return failed(mlir::MlirOptMain(...);". This is unfortunate for two reasons: a) it uses ADL, which is maybe not what the free "failed" function was designed for; and b) it is a bit awkward to read, requring the reader to both understand the boolean nature of the value and the semantics of main's return value. (And it's also not portable, since 1 is not a portable success value.)

The replacement code, `return mlir::AsMainReturnCode(mlir::MlirOptMain(...))` is a bit more self-explanatory.

The change applies the new function to a few internal uses of MlirOptMain, too.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D102641
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/examples/standalone/standalone-opt/standalone-opt.cpp
The file was modifiedmlir/include/mlir/Support/MlirOptMain.h