- May 17, 2022
-
-
Ellis Hoag authored
When using counter relocations, two instructions are emitted to compute the address of the counter variable. ``` %BiasAdd = add i64 ptrtoint <__profc_>, <__llvm_profile_counter_bias> %Addr = inttoptr i64 %BiasAdd to i64* ``` When promoting a counter, these instructions might not be available in the block, so we need to copy these instructions. This fixes https://github.com/llvm/llvm-project/issues/55125 Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D125710
-
Matthias Springer authored
Return immediately when an op bufferization patterns fails. Differential Revision: https://reviews.llvm.org/D125087
-
Mogball authored
An attribute without a type builder followed by a colon in an assembly format is potentially ambiguous because the parser will read ahead to parse the colon-type and pass this as the type argument to the attribute's constructor. However, the previous verifier that checks for this ambiguity erroneously produces an error in the case of ``` let assemblyFormat = "( `(` $attr `)` )? `:`"; ``` This patch fixes the bug by implementing a checker that correctly handles all edge cases, including very strange assembly formats like: ``` let assemblyFormat = "( `(` $attr ) : (`>`)? attr-dict (`>` $a^) : (`<`)? `:`"; ``` Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125445
-
River Riddle authored
This was carry over from LLVM IR where the alias definition can be ambiguous, but MLIR type aliases have no such problems. Having the `type` keyword is superfluous and doesn't add anything. This commit drops it, which also nicely aligns with the syntax for attribute aliases (which doesn't have a keyword). Differential Revision: https://reviews.llvm.org/D125501
-
Mogball authored
This patch adds a topological sort utility and pass. A topological sort reorders the operations in a block without SSA dominance such that, as much as possible, users of values come after their producers. The utility function sorts topologically the operation range in a given block with an optional user-provided callback that can be used to virtually break cycles. The toposort pass itself recursively sorts graph regions under the target op. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D125063
-
zhijian authored
Summary: Use object::Archive::create so that the returned archive object has a dynamic type of either Archive or BigArchive. Reviewers: James Henderson,Fangrui Song Differential Revision: https://reviews.llvm.org/D124940
-
Mogball authored
The attribute self type parameter is currently treated like any other attribute parameter in the assembly format. The self type parameter should be handled by the operation parser and printer and play no role in the generated parsers and printers of attributes. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125724
-
Aart Bik authored
This is the first implementation of complex (f64 and f32) support in the sparse compiler, with complex add/mul as first operations. Note that various features are still TBD, such as other ops, and reading in complex values from file. Also, note that the std::complex<float> had a bit of an ABI issue when passed as single argument. It is still TBD if better solutions are possible. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D125596
-
Yang Keao authored
In D123677, @YangKeao provided an implementation of `DOTGraphTraits{Viewer,Printer}` in the new pass manager. This commit migrates the `DomPrinter` and `DomViewer` to the new pass manager. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D124904 -
Paul Walker authored
During early gather/scatter enablement two different approaches were taken to represent scaled indices: * A Scale operand whereby byte_offsets = Index * Scale * An IndexType whereby byte_offsets = Index * sizeof(MemVT.ElementType) Having multiple representations is bad as shown by this patch which fixes instances where the two are out of sync. The dedicated scale operand is more flexible and pervasive so this patch removes the UNSCALED values from IndexType. This means all indices are scaled but the scale can be one, hence unscaled. SDNodes now use the scale operand to answer the "isScaledIndex" question. I toyed with the idea of keeping the UNSCALED enums and helper functions but because they will have no uses and force SDNodes to validate the set of supported values I figured it's best to remove them. We can re-add them if there's a real need. For similar reasons I've kept the IndexType enum when a bool could be used as I think being explicitly looks better. Depends On D123347 Differential Revision: https://reviews.llvm.org/D123381
-
Louis Dionne authored
As mentionned in D97044, it is fine if users include <atomic> and then include <stdatomic.h> -- we don't need to error out for that case. Differential Revision: https://reviews.llvm.org/D125579
-
Louis Dionne authored
I think this notion of libc++abi's version was relevant a long time ago on Apple platforms when we were using a Xcode project to build the library. As part of moving Apple's build to CMake, D59489 made it possible to specify the "ABI version" of libc++abi in use. However, it's not possible to build libc++abi with that old ABI anymore and we don't need the ability to link against that version from libc++ anymore. Hence, we can clean this up and stop falsely pretending that libc++abi has more than one ABI version. Differential Revision: https://reviews.llvm.org/D125687
-
John Paul Adrian Glaubitz authored
Linux on SPARC uses fstatat64 instead. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D125572
-
Utkarsh Saxena authored
Reduces time spent in findRef by 66%. Differential Revision: https://reviews.llvm.org/D125675
-
Robert Suderman authored
We were custom counting per bit for the clz instruction. Math dialect now has an intrinsic to do this in one instruction. Migrated to this instruction and fixed a minor bug math-to-llvm for the intrinsic. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D125592
-
zhijian authored
Summary: llvm-ar can not read empty big archive correctly. it output error as error: unable to load 'empty.a': truncated or malformed archive (characters in size field in archive member header are not all decimal numbers: '<bigaf>' Reviewers: James Henderson Differential Revision: https://reviews.llvm.org/D124017
-
Stanislav Mekhanoshin authored
This reverts ffbee7ac, see also bug 37653 which it was fixing. The bug claims this is an undocumented feature which actually works. In the reality it is documented as not working for a good reason. It likely does something, but it is useless anyway. These instructions write into the LDS. The LDS address is: M0 + inst_offset + (TIDinWave * 4). For a store wider than a DWORD neighboring lanes will overwrite each other. Differential Revision: https://reviews.llvm.org/D125409
-
Utkarsh Saxena authored
Differential Revision: https://reviews.llvm.org/D125682
-
Alex Bradbury authored
The logic around IsCanonical previously used getAsString and compared to "1". Just using getValueAsBit is simpler.
-
Jakub Kuderski authored
In this instance, the trailing return type does not improve readability as it repeats what is returned in the same line. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125697
-
Fangrui Song authored
The former is a bit misleading and a user may try installing zlib which will not help.
-
Fangrui Song authored
-
Rahman Lavaee authored
[llvm-objdump] Let --symbolize-operands symbolize basic block addresses based on the SHT_LLVM_BB_ADDR_MAP section. `--symbolize-operands` already symbolizes branch targets based on the disassembly. When the object file is created with `-fbasic-block-sections=labels` (ELF-only) it will include a SHT_LLVM_BB_ADDR_MAP section which maps basic blocks to their addresses. In such case `llvm-objdump` can annotate the disassembly based on labels inferred on this section. In contrast to the current labels, SHT_LLVM_BB_ADDR_MAP-based labels are created for every machine basic block including empty blocks and those which are not branched into (fallthrough blocks). The old logic is still executed even when the SHT_LLVM_BB_ADDR_MAP section is present to handle functions which have not been received an entry in this section. Reviewed By: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D124560
-
Adrian Prantl authored
-
David Green authored
There have been some patterns in the AArch64 backend to optimize code of the form: ldrsh w8, [x0] scvtf s0, w8 to: ldr h0, [x0] sshll v0.4s, v0.4h, #0 scvtf s0, s0 The idea is to remove the GRP->FPR move, but in reality is making code larger and slower (or the same) on all the cpus I tried. This patch adds the UseAlternateSExtLoadCVTF32 predicate similar to nearby related pattern. Differential Revision: https://reviews.llvm.org/D125470
-
Sanjay Patel authored
The existing transform was wrong in 3 ways: 1. It created an extra instruction when the source and dest types don't match. 2. It did not account for an extra use of the icmp, so could create 2 extra insts. 3. It favored bit hacks over icmp (icmp generally has better analysis). This fixes #54692 (modeled by the PhaseOrdering tests). This is a minimal step to fix the bug, but we should likely invert the sibling transform for the "is negative" pattern too. The backend should be able to invert this back to a shift if that leads to better codegen.
-
Sanjay Patel authored
-
Craig Topper authored
This bug is in generic DAG combine and easily reproducible on many targets. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D125640
-
Craig Topper authored
If we use multiply it would be with 0x0101 which is 1 more than a power of 2. On some targets we would expand this to shl+add. By avoiding the multiply earlier, we can generate better code. Note, PowerPC doesn't do the shl+add expansion of multiply so one of the tests increased in instruction count. Limiting to scalars because it almost always increased the number of instructions in vector tests. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D125638
-
Craig Topper authored
-
Philip Reames authored
-
Hongtao Yu authored
Current profile generation caculcates callsite body samples and call target samples separately. The former is done based on LBR range samples while the latter is done based on branch samples. Note that there's a subtle difference. LBR ranges is formed from two consecutive branch samples. Therefore the last entry in a LBR record will not be counted towards body samples while there's still a chance for it to be counted towards call targets if it is a function call. I'm making sense of the call body samples by updating it to the aggregation of call targets. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D122609
-
Matthias Springer authored
This changes replaces the `fully-dynamic-layout-maps` options (which was badly named) with two new options: * `unknown-type-conversion` controls the layout maps on buffer types for which no layout map can be inferred. * `function-boundary-type-conversion` controls the layout maps on buffer types inside of function signatures. Differential Revision: https://reviews.llvm.org/D125615
-
- May 16, 2022
-
-
Ellis Hoag authored
Add a map from functions to load instructions that compute the profile bias. Previously we assumed that if the first instruction in the function was a load instruction, then it must be computing the bias. This was likely to work out because functions usually start with the `llvm.instrprof.increment` instruction, but optimizations could change this. For example, inlining into a non-profiled function. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D114319
-
Sanjay Patel authored
-
Philip Reames authored
-
Simon Pilgrim authored
As mentioned on D123678 this appears to be causing namespace resolution issues on some versions of gcc.
-
David Green authored
-
Sanjay Patel authored
The tests (see C++ source in #54692) have multiple potential optimizations/canonicalizations, but we should be consistent since they are logically identical.
-
Sanjay Patel authored
The bug number was typo'd when it was added for D86243.
-