- Jul 05, 2023
-
-
Nikita Popov authored
To make sure it is removed in the same InstCombine iteration.
-
David Green authored
If we know bits are already 0, we will not need to clear them again with a BIC. So we can use KnownBits to shrink the size of the constant in the creation BIC from And, potentially undoing the known-bits folds that happen during compilation. BIC only has a single register operand for input and output, so has less scheduling freedom than a AND, but usually saves the materialization of a constant. Differential Revision: https://reviews.llvm.org/D154217
-
David Green authored
-
Corentin Jabot authored
The type was never saved, and therefore never transformed in dependent contexts. Reviewed By: aaron.ballman, #clang-language-wg Differential Revision: https://reviews.llvm.org/D154492
-
Nikita Popov authored
The suffix for the git revision may not be present (or may not be a git revision).
-
Nikita Popov authored
Support the canonical range check pattern for KnownBits assumptions. This is the same as the generic ConstantRange handling, just shifted by an offset.
-
Akash Banerjee authored
Fix clang test error cuased by commit 4a492265. Minor change in order of globals.
-
Corentin Jabot authored
We did not return an error when failing to producing a valid expression when performing the initialization of an aggregate initialized with a parenthesized list of expressions. This is a regression introduced in Clang 17. Fixes #63278 Reviewed By: aaron.ballman, #clang-language-wg Differential Revision: https://reviews.llvm.org/D154486
-
Kadir Cetinkaya authored
Currently exporter can have same relevance signals as the origin header when name match signals don't trigger. This patch introduces a tie braker signal to boost origin headers in such cases, this is deliberately introduced with lower significance than public-ness to make sure we still prefer a public-exporter instead of a private-origin header. Differential Revision: https://reviews.llvm.org/D154349
-
Nikita Popov authored
-
Kiran Chandramohan authored
The sourcerange was missing for a few directives when they were the first directive to appear in a program without a program statement. Reviewed By: DavidTruby Differential Revision: https://reviews.llvm.org/D153634
-
Dhruv Chawla authored
This patch introduces a fold for the operation "usub_sat(X, C) pred C2" where "C" and "C2" are constants. The fold is: usub_sat(X, C) pred C2 => (X < C) || ((X - C) pred C2) -> when (0 pred C2) is true => (X >= C) && ((X - C) pred C2) -> when (0 pred C2) is false These expressions can generally be folded into a simpler expression. As they can sometimes emit more than one instruction, they are limited to cases where the "usub_sat" has only one user. Fixes #58342. Proofs: https://alive2.llvm.org/ce/z/ws_N2J Differential Revision: https://reviews.llvm.org/D154206
-
Dhruv Chawla authored
Create test cases to test the fold for the expression pattern 'usub_sat(X, C) pred C2'. Differential Revision: https://reviews.llvm.org/D154342
-
Akash Banerjee authored
This patch changes the emitTargetDataCalls function in clang to make use of the OpenMPIRBuilder::createTargetData function for Target Data directive code gen. Reapplying commit 0d8d7181 after fixing libomptarget test failure related to debug info. Depends on D146557 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D150860
-
Kiran Chandramohan authored
Fixes #63638 Reviewed By: TIFitis Differential Revision: https://reviews.llvm.org/D154442
-
Stefan Gränitz authored
[Kaleidoscope] Fix race condition in order-of-destruction between SectionMemoryManager and its MemoryMapper SectionMemoryManager's default memory mapper used to be a global static object. If the SectionMemoryManager itself is a global static object, it might be destroyed after its memory mapper and thus couldn't use it from the destructor. The Kaleidoscope tutorial reproduced this situation with MSVC for a long time. Since 47f5c54f it's triggered with GCC as well. The solution from this patch was proposed in the existing review https://reviews.llvm.org/D107087 before, but it didn't move forward. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D154338
-
Louis Dionne authored
Note that _FilesystemClock will now be implemented by calling gettimeofday() on Apple platforms instead of clock_gettime(). However, since both are equivalent, this should not change the behavior on Apple platforms. There should be no behavior change on other platforms. In addition to being a consistency clean up, this fixes some issues seen by folks as reported in https://reviews.llvm.org/D154390#4471924. Differential Revision: https://reviews.llvm.org/D154457
-
Henrik G. Olsson authored
The previous git URL regex only matched SSH urls, starting with 'git@'. If the repo was cloned using a https URL it would not match. rdar://105239218
-
Louis Dionne authored
We use 17.0 instead of Clang 17 in our status tables pretty consistently, but not universally. This ensures that we do it universally, for all versions. Differential Revision: https://reviews.llvm.org/D154461
-
-
Sam McCall authored
These changes are OK, but they break downstream stuff that needs more time to adapt :-( This reverts commit 71579569. This reverts commit 5e4ad816. This reverts commit 1c3ac8df.
-
Jean Perier authored
The need to save LHS addresses on a stack before doing an assignment is very limited: it is only really needed for forall and vectore subscripted LHS where the LHS cannot be computed as a descriptor. The previous current WHERE codegen was creating address stacks for LHS element addresses when the LHS evaluation conflicts with the assignment (may depend on the LHS value). This is not needed since the computed array designator for the LHS is already "saved" before the assignment from an SSA point of view. This patch prevents LHS temporary stack from being created outside of forall and vector subscripted assignments. Differential Revision: https://reviews.llvm.org/D154418
-
Fabio D'Urso authored
Reviewed By: Caslyn, Chia-hungDuan Differential Revision: https://reviews.llvm.org/D153888
-
Sam McCall authored
And simplify formulas containing true/false It's unclear to me how useful this is, it does make formulas more conveniently self-contained now (we can usefully print them without carrying around the "true/false" labels) (while here, simplify !!X to X, too) Differential Revision: https://reviews.llvm.org/D153485
-
Henrik G. Olsson authored
This prevents update_cc_tests.py from emitting hard-coded identifiers for metadata (global variable checkers still check hard-coded identifiers). Instead it emits regex checkers that match even if the identifiers change. Also adds a new mode for --check-globals: instead of simply being on or off, it now has the options 'none', 'smart' and 'all', with 'none' and 'all' corresponding to the previous modes. The 'smart' mode only emits checks for global definitions referenced in the IR or other metadata that itself has a definition checker emitted, making the rule transitive. It does not emit checks for attribute sets, since that is better checked by --check-attributes. This mode is made the new default. To make the change in default mode backwards compatible a version bump is introduced (to v3), and the default remains 'none' in v1 & v2. This will result in metadata checks being emitted more often, so filters are added to not check absolute file paths and compiler version git hashes. rdar://105239218
-
Nikita Popov authored
For non-equality icmps, we don't do any KnownBits-specific reasoning, and just use the known bits as a constraint on the range. We can generalize this for all predicates by round-tripping through ConstantRange and using makeAllowedICmpRegion(). The minor improvement in zext-or-icmp is because we assume that a value is ult [0,1], which means it must be zero.
-
Markus Böck authored
This is a common pattern produced by clang and similar. Essentially, it coalesces stores into adjacent integer fields into a single integer store. This violates our definition of type-consistency that the pass is supposed to enforce and also prevents SROA and mem2reg from eliminating `alloca`s. This patch fixes that by splitting these stores into multiple stores. It does so by simply using logical shift rights and truncating the produced value to the size of the field, optionally bitcasting before storing into the field. The implementation is currently very simple, only working on struct types of a single depth and adjacent fields in that struct, with no padding inbetween. Future work could improve on these once required. Differential Revision: https://reviews.llvm.org/D154449
-
Sam McCall authored
[dataflow] Replace most BoolValue subclasses with references to Formula (and AtomicBoolValue => Atom and BoolValue => Formula where appropriate) This properly frees the Value hierarchy from managing boolean formulas. We still distinguish AtomicBoolValue; this type is used in client code. However we expect to convert such uses to BoolValue (where the distinction is not needed) or Atom (where atomic identity is intended), and then fold AtomicBoolValue into FormulaBoolValue. We also distinguish TopBoolValue; this has distinct rules for widen/join/equivalence, and top-ness is not represented in Formula. It'd be nice to find a cleaner representation (e.g. the absence of a formula), but no immediate plans. For now, BoolValues with the same Formula are deduplicated. This doesn't seem desirable, as Values are mutable by their creators (properties). We can probably drop this for FormulaBoolValue immediately (not in this patch, to isolate changes). For AtomicBoolValue we first need to update clients to stop using value pointers for atom identity. The data structures around flow conditions are updated: - flow condition tokens are Atom, rather than AtomicBoolValue* - conditions are Formula, rather than BoolValue Most APIs were changed directly, some with many clients had a new version added and the existing one deprecated. The factories for BoolValues in Environment keep their existing signatures for now (e.g. makeOr(BoolValue, BoolValue) => BoolValue) and are not deprecated. These have very many clients and finding the most ergonomic API & migration path still needs some thought. Differential Revision: https://reviews.llvm.org/D153469
-
LLVM GN Syncbot authored
-
Sam McCall authored
This reverts commit 7a72ce98. Test problems were due to unspecified order of function arg evaluation.
-
Haojian Wu authored
If the source code is compilable-but-layering-violation, we still want the tool to be functional on it (rather than bailing out). Differential Revision: https://reviews.llvm.org/D154477
-
Simon Pilgrim authored
The IceLakeServer model was directly copied from SkylakeServer model and we didn't do much to adjust the changes in port layout etc. IceLake handles all store AGU on ports 7/8 (and not 2/3/7 like Skylake), store memory ops are handled on ports 4/9 (and not just port 4) Fixes #62602
-
Simon Pilgrim authored
Noticed while trying to resurrect D138359 - the overrides matched the base class schedule WriteVecIMul definition
-
Simon Pilgrim authored
Noticed while trying to resurrect D138359 - the overrides matched the base class schedule WriteSystem/WriteMicrocoded definition (apart from znver2 where vzeroupper is almost free)
-
Jacek Caban authored
Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D149439
-
Alex Zinenko authored
Add integration tests exercising transform dialect matchers for slightly larger compositions of structured ops, namely reductions and matrix multiplications with optional leading and trailing elementwise operations. Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D154440
-
LLVM GN Syncbot authored
-
Alex Bradbury authored
This represents the crash reported in <https://github.com/llvm/llvm-project/issues/63661>
-
Nikita Popov authored
When processing assumes, we also handle assumes on ptrtoint of the value. In canonical IR, these will have the same size as the value. However, in non-canonical IR there may be an implicit zext or trunc, which results in a bit width mismatch. We currently handle this by adjusting bitwidth everywhere, but this is fragile and I'm pretty sure that the way we do this is incorrect for some predicates, because we effectively end up commuting an ext/trunc and an icmp. Instead, add an m_PtrToIntSameSize() matcher that will only handle bitwidth preserving cases. For the bitwidth-changing cases, wait until they have been canonicalized. The original handling for this was added purely to prevent crashes in an earlier implementation which failed to account for this entirely.
-
Jens Massberg authored
In case of a top level context the first template argument of a concept should be dropped. Currently the indexer doesn't support different signatures for different contexts (for an index entry always the default `Symbol` context is used). Thus we add a hack which checks if we are in a top level context and have a concept and in that case removes the first argment of the signature and snippet suffix. If there is only a single argument, the signature and snippet suffix are completly removed. The check for the first argument is done by simply looking for the first comma which should be sufficient in most cases. Additionally extend test environment to support adding artificial index entries with signature and completion snippet suffix. Differential Revision: https://reviews.llvm.org/D154450
-