Age | Commit message (Collapse) | Author | Files | Lines |
|
Non-root users may be able to set real-time scheduling policies. Don't
expect failure to set real-time scheduling policies based on UID.
Instead, check that if it fails, it is either due to missing privileges,
or unsupported parameters if the scheduling policy is not mandated by
POSIX.
Fixes #95564.
|
|
Otherwise LinkGraph::dump output could change
(llvm/test/ExecutionEngine/JITLink/x86-64/COFF_pdata_strip.s) when
llvm::hash_value(StringRef) changes.
|
|
Closes #95418.
|
|
|
|
Otherwise llvm/test/TableGen/GlobalISelCombinerEmitter/type-inference.td
could fail when llvm::hash_value(StringRef) changes.
Fix #66377
|
|
This change fixes the issue
https://github.com/llvm/llvm-project/issues/95977 due to commit
c0cba5198155dba246ddd5764f57595d9bbbddef inserting allocas after the
terminator op in the insertion block in the case where the block had
only a single operation, its terminator, in it. With this change, the
hoisted constant-sized allocas are placed at the front of the insertion
block, rather than right after the first operation in it.
|
|
Don't rely on the iteration order of DenseSet<StringRef>, which is not
guaranteed to be deterministic.
|
|
This diff contains the compiler-rt changes / preparations for nsan.
Test plan:
1. cd build/runtimes/runtimes-bins && ninja check-nsan
2. ninja check-all
|
|
Otherwise llvm/test/LTO/X86/cfi_jt_aliases.ll could fail when
DenseMapInfo<StringRef> changes.
|
|
--show-region-summary etc (#96016)
|
|
ArrayRef can be implicitly constructed from a C array while inferring
its size.
|
|
PINNED is a CUDA data attribute meant for the host variables. Do not
consider it when computing the number of device variables in assignment
for the cuda data transfer.
|
|
Add a 128-bit xxhash function, following the existing
`llvm::xxh3_64bits` and `llvm::xxHash` implementations. Previously,
48e93f57f1ee914ca29aa31bf2ccd916565a3610 added support for
`llvm::xxh3_64bits`, which closely follows the upstream implementation
at https://github.com/Cyan4973/xxHash, with simplifications from Devin
Hussey's xxhash-clean.
However, it is desirable to have a larger 128-bit hash key for use cases
such as filesystem checksums where chance of collision needs to be
negligible.
So to that end this also ports over the 128-bit xxh3_128bits as
`llvm::xxh3_128bits`.
Testing:
- Add a test based on xsum_sanity_check.c in upstream xxhash.
|
|
Split off from https://github.com/llvm/llvm-project/pull/92555
and slightly generalized to more precisely check for a header mask.
Use it to replace manual checks in collectHeaderMasks.
|
|
This change is part of this proposal:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294
This is part 1 of 4 PRs. It sets the ground work for adding the
intrinsics.
Add DXIL Lower for `acos`, `asin`, `atan`, `cosh`, `sinh`, and `tanh`
https://github.com/llvm/llvm-project/issues/70079
https://github.com/llvm/llvm-project/issues/70080
https://github.com/llvm/llvm-project/issues/70081
https://github.com/llvm/llvm-project/issues/70083
https://github.com/llvm/llvm-project/issues/70084
https://github.com/llvm/llvm-project/issues/95966
|
|
Fixes issue reported in: https://github.com/llvm/llvm-project/pull/94224
The recent commit above added an ilist_parent<ParentTy> option, which
added a parent pointer to the ilist_node_base type for the list. The
const methods for returning that parent pointer however were incorrectly
implemented, returning `const ParentPtrTy`, which is equivalent to
`ParentTy * const` rather than `const ParentTy *`. This patch fixes this
by passing around `ParentTy` in ilist's internal logic rather than
`ParentPtrTy`, removing the ability to have a `void*` parent pointer but
cleanly fixing this error.
|
|
assignment operator (#95444)
Since 83ead2b, std::pair would not be trivially copyable when it holds a
trivially copyable type without an assignment operator. That is because
pair gained an elligible copy-assignment-operator (the const version) in
83ead2b in C++ >= 23.
This means that the trivially copyable property of std::pair for such
types would be inconsistent between C++11/14/17/20 (trivially copyable)
and C++23/26 (not trivially copyable). This patch makes std::pair's
behavior consistent in all Standard modes EXCEPT C++03, which is a
pre-existing condition and we have no way of changing (also, it
shouldn't matter because the std::is_trivially_copyable trait was
introduced in C++11).
While this is not technically an ABI break, in practice we do know that
folks sometimes use a different representation based on whether a type
is trivially copyable. So we're treating 83ead2b as an ABI break and
this patch is fixing said breakage.
This patch also adds tests stolen from #89652 that pin down the ABI of
std::pair with respect to being trivially copyable.
Fixes #95428
|
|
|
|
Add a mechanism to specify constraints to the design document. These facilitate
specification of DXIL Op attributes that are predicated by Shader Model version.
|
|
and Interfaces. This is a newer implementation of PR
https://github.com/llvm/llvm-project/pull/85141 and
[RFC](https://discourse.llvm.org/t/rfc-target-description-and-cost-model-in-mlir/76990)
by considering reviews and comments on the original PR.
As an example of attributes supported by this commit:
```
module attributes {
dlti.target_system_spec =
#dlti.target_device_spec<
#dlti.dl_entry<"dlti.device_id", 0: ui32>,
#dlti.dl_entry<"dlti.device_type", "CPU">,
#dlti.dl_entry<"dlti.L1_cache_size_in_bytes", 8192 : ui32>>,
#dlti.target_device_spec <
#dlti.dl_entry<"dlti.device_id", 1: ui32>,
#dlti.dl_entry<"dlti.device_type", "GPU">,
#dlti.dl_entry<"dlti.max_vector_op_width", 64 : ui32>>,
#dlti.target_device_spec <
#dlti.dl_entry<"dlti.device_id", 2: ui32>,
#dlti.dl_entry<"dlti.device_type", "XPU">>>
}
```
|
|
|
|
DenseMap iteration order is not guaranteed to be deterministic.
Without the change, clang/test/Driver/linker-wrapper{,-libs}.c would
fail when `combineHashValue` changes (#95970).
|
|
`combineHashValue` is a custom bit mixer from 2008
(5fc8ab6d187aefbf1d2cbd36e191e675b14db8f6) used for std::pair and
std::tuple. It has a long dependency chain and slow. Replace it with
a simply multiply-xorshift style hash using a constant from
splitmix64[1]. abseil-cpp and carbon also use this style, but with
uint128 to probably get a lower avalanche bias. We don't use uint128 for
MSVC portability.
Measured time to compute [0,1000000000) values on an i7-11850H:
* old: 1.163s
* new: 0.427s
[1]: https://jonkagstrom.com/tuning-bit-mixers/index.html
Pull Request: https://github.com/llvm/llvm-project/pull/95970
|
|
DenseMap iteration order is not guaranteed to be deterministic.
Without the change,
llvm/test/Transforms/GlobalMerge/basic.ll could fail when
`combineHashValue` changes (#95970).
|
|
Adds e2e tests for clang-doc, which serves as useful test against
regression in the html output. It also serves as a helpful tool for code
review as we can see the diffs to clang-docs output
Closes https://github.com/llvm/llvm-project/issues/93925
|
|
If the GN arg `sysroot` was set to a root-relative path like e.g.
`"//sysroot"`, we weren't rebasing it correctly, leading to
warnings from clang about it ignoring a non-existent sysroot.
Similar to 6073f87d7f160.
|
|
A C array can be implicitly cast to ArrayRef.
|
|
|
|
The InitElem op assumes an array.
|
|
arm_mve_pred_v2i (#94847)
|
|
For interleave groups, we only generate a pointer for the start of the
interleave group (the instruction at the insert position). The other
addresses for other members are alreayd considered free, but so are
their operands, if they are only used in address computations for
other interleave group members.
|
|
This change builds on 0a357ad which supported non-constant strides in
howFarToZero, but used only context insensitive reasoning.
This change does two things:
1) Directly use context sensitive queries to prove facts established
before the loop. Note that we technically only need facts known
at the latch, but using facts known on entry is a conservative
approximation which will cover most everything.
2) For the non-zero check, we can usually prove non-zero from the
finite assumption implied by mustprogress. This eliminates the
need to do the context sensitive query in the common case.
|
|
Noticed because static analyzer doesn't understand that isRecordType is just a wrapper to isa<> and was warning about a potential null dereference
|
|
script
|
|
|
|
If we have a urem expression, emitting it as a urem is significantly
better that letting the fully expansion kick in. We have the risk of a
udiv or mul which could have previously been shared, but loosing that
seems like a reasonable tradeoff for being able to round trip a urem w/o
modification.
|
|
Depending on the platform, the parameter for __arm_get_sme_state
requires a `unsigned long long*` instead of a `unsigned long*`.
From ASTContext.cpp:
case 'W':
// This modifier represents int64 type.
|
|
|
|
This should fix the failures that started happening after #93712 landed.
|
|
|
|
While I am at it, I'm constructing SmallVector directly from ArrayRef.
|
|
|
|
Fix style errors accidentally introduced in PRs #87259 and #94245.
Reviewers: rorth, jrtc27, brad0, s-barannikov
Reviewed By: s-barannikov
Pull Request: https://github.com/llvm/llvm-project/pull/96019
|
|
Add additional masked store tests which caused crashes with earlier
versions of https://github.com/llvm/llvm-project/pull/92555.
|
|
Some targets like RISC-V pass scalars wider than 2×XLEN bits by
reference, so those arguments are replaced in the argument list with an
address (See RISC-V ABIs Specification 1.0 section 2.1).
This commit implements this indirect parameter passing in GlobalISel.
---------
Co-authored-by: Gabor Spaits <Gabor.Spaits@hightec-rt.com>
|
|
(#95700)
This commit fixes a crash in `-reconcile-unrealized-casts` when cast ops
have multiple operands:
```
DialectConversion.cpp:1583: virtual void mlir::ConversionPatternRewriter::replaceOp(mlir::Operation *, mlir::ValueRange): Assertion `op->getNumResults() == newValues.size() && "incorrect # of replacement values"' failed.
```
This commit also generalizes the pass such that more ops are folded. In
particular (letters indicate types):
```
A
/ \
B C
|
A
```
Previously, such IR was not folded at all. The `A -> B -> A` type cast
cycle is now folded away. (The `A -> C` cast stays in place.)
This commit also turns the pass from a dialect conversion into a simple
IR walk. The pattern and its `populate` function are removed. The
pattern was a (non-conversion) rewrite pattern, but used in a dialect
conversion, which is generally not safe. In particular, the rewrite
pattern may traverse IR that was already scheduled for erasure by the
dialect conversion.
Note: Some test cases changed slightly (NFC) because the new pass
implementation no longer attempts to fold ops.
Note for LLVM integration: If your pipeline uses the removed `populate`
function, try to simply remove that function call. Chances are you may
not need it at all. If it is in fact needed, run the
`-reconcile-unrealized-casts` pass right after the pass that used to
populate the pattern.
---------
Co-authored-by: Maksim Levental <maksim.levental@gmail.com>
Co-authored-by: Markus Böck <markus.boeck02@gmail.com>
|
|
This patch adds more precise side effects to the current ops with memory
effects, allowing us to determine which OpOperand/OpResult/BlockArgument
the
operation reads or writes, rather than just recording the reading and
writing
of values. This allows for convenient use of precise side effects to
achieve
analysis and optimization.
Related discussions:
https://discourse.llvm.org/t/rfc-add-operandindex-to-sideeffect-instance/79243
|
|
A _e64 suffix should not be printed since these instructions only have
one legal encoding length. The absence of the IsSingle flag is hidden by
how the string is printed. We could fix it for GFX10 as well, but we
shouldn't change the asm output to omit _e64 at this point.
NFC.
|
|
A _e64 suffix should not be printed since these instructions only have
one legal encoding length. The absence of the IsSingle flag is hidden by
how the string is printed, but fix it for consistency.
NFC
|
|
Our getIntImmCostInst is falling back to returning TCC_Free in this case
even though both immediates take two instructions to materialise.
|