This is a helper script to create llvm-mca tests that follow the style
described in #173926 . That is, instead of putting both the input
instructions and CHECK lines in the same file, we consolidate all input
(files) into a single place, read by their `.test` files counterpart to
check the per-processor results.
The script added by this patch will enumerate each (`.s`) input files
and create the corresponding `.test` file, parameterized by the provided
`--triple` and `--cpu` options. Users also have the option to exclude
certain input files or add additional `llvm-mca` / `FileCheck`
arguments.
The main change is to eliminate the use of "Argument" terminology when
dealing with overloaded types since overloaded types can be either
argument or return values, and some additional renaming for clarity.
1. Rename `Tys` argument to various intrinsic APIs to `OverloadTys` to
better reflect its meaning.
2. Rename `IITDescriptorKind::Argument` to
`IITDescriptorKind::Overloaded` to better convey that it's an overloaded
type. Removed "Argument" suffix for other kinds for dependent types.
3. Rename `ArgKind` to `AnyKind`, `getArgumentNumber` to
`getOverloadIndex`, `getArgumentKind` to `getOverloadKind`,
`getRefArgNumber` to `getRefOverloadIndex`, and `IIT_ARG` to `IIT_ANY`.
4. Rename `IIT_ANYPTR` (used to represent a pointer qualified with
address space) to `IIT_PTR_AS` to clearly distinguish it from
`llvm_anyptr_ty`
5. Change the packing of [ref overload index & overload index] for
`VecOfAnyPtrsToElt` to pack the overload index into the lower bits, so
we can use the `getOverloadIndex` function to get the overload index.
Moving these into the middle-end pipeline will allow for additional
optimization of the expansion result, such as CSE of redundant loads
(c.f. https://godbolt.org/z/bEna4Md9r). For now, we conservatively place
the passes at the end of the middle-end pipeline, so we mostly don't
benefit from additional optimizations yet. The pipeline position will be
moved in a future change.
This builds on work done by legrosbuffle in
https://reviews.llvm.org/D60318.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NF (No-Flags) instructions should not compress to non-NF instructions,
as this would incorrectly modify flags behavior. The compression table
is only intended for encoding optimizations that preserve semantics.
This removes the incorrect NF entries that could have led to
miscompilation if the compression logic were applied.
Currently the virtual address space usage of lit fluctuates wildly, with
peak usage exceeding 4GB, which results in subsequent thread spawning
errors on 32-bit systems.
The cause of this is a circular reference in TimeoutHelper._timer (via the
callback), which causes the 8MB thread stack to not be immediately
reclaimed when the timer is cancelled.
We can avoid this by explicitly unsetting the timer.
This lets someone set git config options at whatever scope (per-repo,
global, etc.) for the options that they care about. This provides
similar functionality to just wrapping the script in a shell script with
one's desired options without the need to do that.
We need to be careful about how when we get the flags and how to execute
the git command to get the flags. For now, we do this before normal
argument parsing and fail silently to avoid printing output if someone
passes something like --quiet through the git config. This means options
like --verbose and --dry-run don't work for this specific command, but I
think that is a reasonable tradeoff.
In _wait_for(), all async tasks are waited for. However, the objects
are held in the async_result list until the function calls complete.
This leads to about 3.6gig mem usage on my system when running
check-llvm, even though these objects aren't needed after the ar.get()
call.
Dealloc them as we go instead.
Addresses #188641
In #188242, we replaced `PointerUnion`'s `PointerIntPair` storage with
`PunnedPointer<void*>`. The old formatters relied on the PIP synthetic
provider (LLDB) / `get_pointer_int_pair helper` (GDB) which no longer
work.
Instead, read raw bytes from `PunnedPointer` and compute the active tag
from template argument type alignments -- the same fixed-width encoding
the C++ implementation uses. When template arg enumeration is truncated
(e.g., function-local types in GDB), the formatters fall back to showing
a tag-stripped `void*` instead of silently misdecoding.
Alternatives that didn't work out:
- Adding a C++ helper (`getActiveMemberIdx`) callable from Python: gets
optimized out even with `__attribute__((used, noinline))`, and
expression evaluation fails for synthetic children.
- Using `isa`/`dyn_cast` checks from Python: requires expression
evaluation, which does not work for local types or synthetic children
without a frame context.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit b1aa6a45060bb9f89efded9e694503d6b4626a4a and commit
ce44d63e0d14039f1e8f68e6b7c4672457cabd4e.
This fails the build with some older gcc:
llvm/include/llvm/CodeGenTypes/LowLevelType.h:501:35: error: call to
non-constexpr function ‘static llvm::LLT llvm::LLT::integer(unsigned
int)’
return integer(getSizeInBits());
^
Added extra information in LLT to support ambiguous fp types during
GlobalISel. Original idea by @tgymnich
Main differences from https://github.com/llvm/llvm-project/pull/122503
are:
* Do not deprecate LLT::scalar
* Allow targets to enable/disable IR translation with extenden LLT via
`TargetOption::EnableGlobalISelExtendedLLT` (disabled by default)
* `IRTranslator` use `TargetLoweringInfo` for appropriate `LLT`
generation.
* For this reason added flag in GlobalISelMatchTable` to allow switch
between legacy and new extended LLT names
* Revert using stubs like `LLT::float32` for float types as they are
real now. Added `TODO` for such cases.
Also MIRParser now may parse new type indentifiers.
---------
Co-authored-by: Tim Gymnich <tim@gymni.ch>
Co-authored-by: Ryan Cowan <ryan.cowan@arm.com>
user.login is the account name and user.name is an optional display name
(often their full name). I got an email generated from a colleague's PR
that said:
```
Author: None (<their username>)
```
As they hadn't set user.name in their account. Which isn't a problem,
but it would be neater if we didn't print None.
So I've added a helper function to handle that. If the user has set
both, the output is as it was before, if the user has not, we just show
the login name.
The login name can apparently be None too. In that case we'll print
"None" for it. This does not seem to be a common case though, and I'm
not sure printing anything else would be any more useful.
Add checksum verification for libxml2, zlib, and zstd source archives
via `cmake -E *sum` and `cmake -E compare_files` commands.
This also adds the following minor changes:
* Factor out libxml2 version into variable.
* Check `tar` return code.