- Apr 29, 2022
-
-
Alexey Moksyakov authored
The relocation value is calculated using the formula S + A - P, the verification of the value is performed by inversely calculating the location address Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D124270
-
Benjamin Kramer authored
-
Yuanfang Chen authored
In case of interrupting, there were None. Fixes PR55176.
-
David Penry authored
This reverts commit 28d09bbb while I investigate a buildbot failure.
-
Simon Pilgrim authored
With BMI2 we have SHRX which is a lot quicker than regular x86 shifts. Fixes #55138
-
Craig Topper authored
Add extra check-prefixes to merge common results.
-
David Penry authored
This patch permits Swing Modulo Scheduling for ARM targets turns it on by default for the Cortex-M7. The t2Bcc instruction is recognized as a loop-ending branch. MachinePipeliner is extended by adding support for "unpipelineable" instructions. These instructions are those which contribute to the loop exit test; in the SMS papers they are removed before creating the dependence graph and then inserted into the final schedule of the kernel and prologues. Support for these instructions was not previously necessary because current targets supporting SMS have only supported it for hardware loop branches, which have no loop-exit-contributing instructions in the loop body. The current structure of the MachinePipeliner makes it difficult to remove/exclude these instructions from the dependence graph. Therefore, this patch leaves them in the graph, but adds a "normalization" method which moves them in the schedule to stage 0, which causes them to appear properly in kernel and prologues. It was also necessary to be more careful about boundary nodes when iterating across successors in the dependence graph because the loop exit branch is now a non-artificial successor to instructions in the graph. In additional, schedules with physical use/def pairs in the same cycle should be treated as creating an invalid schedule because the scheduling logic doesn't respect physical register dependence once scheduled to the same cycle. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D122672
-
River Riddle authored
We weren't properly returning the result of the constraint, which leads to errors when actually trying to use the generated C++. Differential Revision: https://reviews.llvm.org/D124586
-
River Riddle authored
We currently aren't handling this properly, and in the case of a string block just crash. This commit adds proper error handling and detection for eof. Differential Revision: https://reviews.llvm.org/D124585
-
River Riddle authored
SourceMgr generally uses 1-based locations, whereas the LSP is zero based. This commit corrects this conversion and also enhances the conversion from SMLoc to SMRange to support string tokens. Differential Revision: https://reviews.llvm.org/D124584
-
River Riddle authored
We currently emit an error during verification if a pdl.operation with non-inferrable results is used within a rewrite. This allows for catching some errors during compile time, but is slightly broken. For one, the verification at the PDL level assumes that all dialects have been loaded, which is true at run time, but may not be true when the PDL is generated (such as via PDLL). This commit fixes this by not emitting the error if the operation isn't registered, i.e. it uses the `mightHave` variant of trait/interface methods. Secondly, we currently don't verify when a pdl.operation has no explicit results, but the operation being created is known to expect at least one. This commit adds a heuristic error to detect these cases when possible and fail. We can't always capture when the user made an error, but we can capture the most common case where the user expected an operation to infer its result types (when it actually isn't possible). Differential Revision: https://reviews.llvm.org/D124583
-
River Riddle authored
pdl.attribute currently has a syntax ambiguity that leads to the incorrect parsing of pdl.attribute operations with locations that don't also have a constant value. For example: ``` pdl.attribute loc("foo") ``` The above IR is treated as being a pdl.attribute with a constant value containing the location, `loc("foo")`, which is incorrect. This commit changes the syntax to use `= <constant-value>` to clearly distinguish when the constant value is present, as opposed to just trying to parse an attribute. Differential Revision: https://reviews.llvm.org/D124582 -
River Riddle authored
This allows for inferring the result types of operations in certain situations by using the type of an operand. This commit allowed for automatically supporting type inference for many more operations with no additional effort, e.g. nearly all Arithmetic operations now support result type inferrence with no additional changes. Differential Revision: https://reviews.llvm.org/D124581
-
River Riddle authored
This allows for using attribute types in result type inference for use with InferTypeOpInterface. This was a TODO before, but it isn't much additional work to properly support this. After this commit, arith::ConstantOp can now have its InferTypeOpInterface implementation automatically generated. Differential Revision: https://reviews.llvm.org/D124580
-
Peter Klausler authored
This is a common extension, though semantics differ across compilers. I've chosen to interpret the CHARACTER data as if it were an arbitrary-precision integer value and format or read it as such. This matches Intel's compilers and nvfortran. (GNU Fortran can't handle lengths > 1 and XLF seems to get the enddianness wrong.) This patch generalizes the previous implementations of B/O/Z input and output so that they'll work for arbitrary data in memory, and then uses them for all B/O/Z input/output, including (now) CHARACTER. Differential Revision: https://reviews.llvm.org/D124547
-
Mircea Trofin authored
The result is a data bag, this makes sure it's signaled to a user that the data can't be mutated when, for example, doing something like: auto &R = FAM.getResult<FunctionPropertiesAnalysis>(F) ... R.Uses++
-
Simon Pilgrim authored
-
Florian Hahn authored
This reverts commit 43842b88 while I investigate a buildbot failure. It also reverts the follow-up commit 2883de05.
-
Chris Lattner authored
I would ideally like to eliminate 'requiredOperandCount' as a bit of verification that should be in the client side, but it is much more widely used than I expected. Just tidy some pieces up around it given we can't drop it immediately. NFC. Differential Revision: https://reviews.llvm.org/D124629
-
Bill Wendling authored
A record may have more than just FieldDecls in it. If so, then we're likely to drop them if we only randomize the FieldDecls. We need to be careful about anonymous structs/unions. Their fields are made available in the RecordDecl as IndirectFieldDecls, which are listed after the anonymous struct/union. The ordering doesn't appear to be super important, however we place them unrandomized at the end of the RecordDecl just in case. There's also the possiblity of StaticAssertDecls. We also want those at the end. All other non-FieldDecls we place at the top, just in case we get something like: struct foo { enum e { BORK }; enum e a; }; Link: https://github.com/KSPP/linux/issues/185 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D123958 -
Dominic Chen authored
Set LONG_DOUBLE_IS_DOUBLE, add ifdefs for 128-bit integer types Differential Revision: https://reviews.llvm.org/D124204
-
David Tenty authored
For the AIX linker, under default options, global or weak symbols which have no visibility bits set to zero (i.e. no visibility, similar to ELF default) are only exported if specified on an export list provided to the linker. So AIX has an additional visibility style called "exported" which indicates to the linker that the symbol should be explicitly globally exported. This change maps "dllexport" in the LLVM IR to correspond to XCOFF exported as we feel this best models the intended semantic (discussion on the discourse RFC thread: https://discourse.llvm.org/t/rfc-adding-exported-visibility-style-to-the-ir-to-model-xcoff-exported-visibility/61853) and allows us to enable writing this visibility for the AIX target in the assembly path. Reviewed By: DiggerLin Differential Revision: https://reviews.llvm.org/D123951
-
David Green authored
Given a shuffle feeding a commutative reduction, the lane ordering of the shuffle will not alter the result. This is also true if there are a number of operations between the reduction and the shuffle, providing they only operate lane-wise. This patch searches for cases like that in Vector Combine, allowing us to check the cost of the shuffle vs an in-order identity shuffle and replace the order if possible. This only handles a single shuffle at the moment to keep things simple, and is able to ignore splats that produce results where every result is the same. This is a more powerful version of a combine that already happens in instrcombine, capable of optimizing more cases by looking through more instructions and being able to cost the shuffle. Differential Revision: https://reviews.llvm.org/D123494
-
Jacques Pienaar authored
tree-sitter grammar file that tries to closely matches LangRef (it could use some tweaking and cleanup, but kept fairly basic). Also updated LangRef in places where found some issues while doing the nearly direct transcription. This only adds a grammar file, not all the other parts (npm etc) that accompanies it. Those I'll propose for separate repo like we do for vscode extension. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D124352
-
Biplob Mishra authored
InstCombine: Add no-one-use tests and create thwart complexity-based canonicalization for the or-and combine tests
-
Chris Lattner authored
The asm parser had a notional distinction between parsing an operand (like "%foo" or "%4#3") and parsing a region argument (which isn't supposed to allow a result number like #3). Unfortunately the implementation has two problems: 1) It didn't actually check for the result number and reject it. parseRegionArgument and parseOperand were identical. 2) It had a lot of machinery built up around it that paralleled operand parsing. This also was functionally identical, but also had some subtle differences (e.g. the parseOptional stuff had a different result type). I thought about just removing all of this, but decided that the missing error checking was important, so I reimplemented it with a `allowResultNumber` flag on parseOperand. This keeps the codepaths unified and adds the missing error checks. Differential Revision: https://reviews.llvm.org/D124470
-
Yitzhak Mandelbaum authored
This patch changes `Environment::join`, in the case that two values at the same location are not (pointer) equal, to structurally compare indirection values (pointers and references) for equivalence (that is, equivalent pointees) before resorting to merging. This change makes join consistent with equivalence, which also performs structural comparison. It also fixes a bug where the values are `ReferenceValue` but the merge creates a non-reference value. This case arises when the `ReferenceValue`s were created to represent an lvalue, so the "reference-ness" is not reflected in the type. In this case, the pointees will always be equivalent, because lvalues at the same code location point to the location of a fixed declaration, whose location is itself stable across blocks. We were unable to reproduce a unit test for this latter bug, but have verified the fix in the context of a larger piece of code that triggers the bug. Differential Revision: https://reviews.llvm.org/D124540
-
Alexey Bataev authored
Need to emit final update of the inscan reduction variables. For worksharing loops, the reduction values are stored in the temp array, need to copy the last element to the original var at the end of the construct. Differential Revision: https://reviews.llvm.org/D121156
-
Paul Robinson authored
-
Alan Zhao authored
In MASM, if a QWORD symbol is passed to a jmp or call instruction in 64-bit mode or a DWORD or WORD symbol is passed in 32-bit mode, then MSVC's assembler recognizes that as an indirect call. Additionally, if the operand is qualified as a ptr, then that should also be an indirect call. Furthermore, in 64-bit mode, such operands are implicitly rip-relative (in fact, MSVC's assembler ml64.exe does not allow explicitly specifying rip as a base register.) To keep this patch managable, this patch does not include: * error messages for wrong operand types (e.g. passing a QWORD in 32-bit mode) * resolving indirect calls if the symbol is declared after it's first use (llvm-ml currently only runs a single pass). * imlementing the extern keyword (required to resolve https://crbug.com/762167.) This patch is likely missing a bunch of edge cases, so please do point them out in the review. Reviewed By: epastor, hans, MaskRay Committed By: epastor (on behalf of ayzhao) Differential Revision: https://reviews.llvm.org/D124413
-
Simon Pilgrim authored
-
Alexey Bataev authored
Introduced masks where they are not added and improved target dependent cost models to avoid returning of the incorrect cost results after adding masks. Differential Revision: https://reviews.llvm.org/D100486
-
Paul Robinson authored
-
Craig Topper authored
This improves opportunities to use bset/bclr/binv. Unfortunately, there are no W versions of these instrcutions so this isn't always a clear win. If we use SLLW we get free sign extend and shift masking, but need to put a 1 in a register and can't remove an or/xor. If we use bset/bclr/binv we remove the immediate materializationg and logic op, but might need a mask on the shift amount and sext.w. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D124096
-
Aaron Ballman authored
-
Pavel Samolysov authored
The structure ArgPart and alias OffsetAndArgPart have been moved into the anonymous namespace. NFC. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D124617
-
Pavel Samolysov authored
The condition should be 'ArgParts.size() > MaxElements', so that if we have exactly 3 elements in the 'ArgParts' vector, the promotion should be allowed because the 'MaxElement' threshold is not exceeded yet. The default value for 'MaxElement' has been decreased to 2 in order to avoid an actual change in argument promoting behavior. However, this changes byval argument transformation behavior by allowing adding not more than 2 arguments to the function instead of 3 allowed before. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D124178
-
Bjorn Pettersson authored
The description of SETCC says /// SetCC operator - This evaluates to a true value iff the condition is /// true. If the result value type is not i1 then the high bits conform /// to getBooleanContents. Without this patch, we sign extended the i1 to the used larger type regardless of getBooleanContents. This resulted in miscompiles, as shown in the attached testcase that ended up returning -1 instead of 1 when using -mattr=+v. Fixes https://github.com/llvm/llvm-project/issues/55168 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D124618
-
Daniel Kiss authored
When the sigreturn trampoline is found the unw_proc_info_t.end_ip need to be set to indicate a stack frame is found. Reviewed By: cjdb, #libunwind, MaskRay Differential Revision: https://reviews.llvm.org/D124522
-
Simon Pilgrim authored
[InstCombine][X86] Add exhaustive simplify demanded vector elts tests for avx2 per-element vector shifts
-