- May 04, 2023
-
-
Florian Hahn authored
The step is already expanded in the VPlan. Use this expansion instead. This is a step towards modeling fixing up IV users in VPlan. It also fixes a crash casued by SCEV-expanding the Step expression in fixupIVUsers, where the IR is in an incomplete state Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D147963
-
Timm Bäder authored
Forward-declare OptionalDiagnostic instead. And turn a few comments in to doc comments.
-
Timm Bäder authored
in the static functions. Since a Floating is backed by an APFloat, we don't want to copy that around if it's not necessary.
-
Jean Perier authored
Add hlfir.forall_mask, hlfir.where, and hlfir.elsewhere operations that are operations that holds (optionally for hlfir.elsewhere) the evaluation of a logical mask that controls the evaluation of nested operations. They allow representing Fortran forall control mask, as well as where and eslewhere statements/constructs. They use the OrderedAssignmentTreeOpInterface since they can all be used inside Forall and their masks should be fully evaluated for all the index-value set induced by parent Forall before any of the nested operations in their body is evaluated. I initially tried making them into a single operation with some attributes to make a difference, but I felt this made the verifier/parser/printer and usages messier/tricky compared to making three distinct operations that represent the three Fortran feature in a vanilla way. Differential Revision: https://reviews.llvm.org/D149754
-
Jean Perier authored
This patch adds the hlfir.forall operation and the OrderAssignmentTreeOpInterface that allows representing Fortran forall. It uses regions to keep Fortran expression evaluation independent from each other in the IR. Forall assignments inside hlfir.forall are represented with hlfir.region_assign which also keeps the IR generated for each expressions independently. The goal of this representation is to provide a representation that is straightforward to generate from Fortran parse tree without any analysis, while providing enough structure information so that an optimization pass can decide how to schedule, and save if needed, the evaluations of the Forall and Where expression and statements. It allows the data dependency analysis to be done at the HLFIR level. The OrderAssignmentTreeOpInterface allows ensuring that the Forall/Where tree structure is kept in the IR. It will allow visiting this tree in the IR without hard coding the operation structures in the pass. Differential Revision: https://reviews.llvm.org/D149734
-
Mikael Holmen authored
gcc warned with ../lib/FuzzMutate/RandomIRBuilder.cpp:319:28: warning: unused variable 'PtrTy' [-Wunused-variable] 319 | if (PointerType *PtrTy = dyn_cast<PointerType>(I.getType())) | ^~~~~ -
Mikael Holmen authored
gcc warned with ../../clang-tools-extra/clangd/Protocol.cpp:481:23: warning: unused variable 'ChangeAnnotation' [-Wunused-variable] 481 | if (const auto& ChangeAnnotation = | ^~~~~~~~~~~~~~~~ -
Timm Bäder authored
We might classify different clang types to the same interp types, so skip the cast in that case. No test attached since this is already exercised a few times in the existing tests.
-
Timm Bäder authored
-
Timm Bäder authored
-
Guillaume Chatelet authored
The `-v` flag means verbose and not version. With `clang` this flag prints the version and exits successfully. Under `GCC` this is not a valid command line so the binary exits with an error.
-
Job Noorman authored
The `valueDelta` map was used to calculate the symbol value deltas from the previous iteration. Since the symbol values themselves are also updated every iteration, the following invariant holds: ``` sa[i].offset == sa[i].d->value + valueDelta[sa[i].d] ``` Note that `sa[i].offset` contains the original value of `sa[i].d` and is never changed. This means that the current way of updating symbol values can be rewritten to not need the `valueDelta` map: ``` sa[i].d->value -= delta - valueDelta.find(sa[i].d)->second; <=> (replace invariant) sa[i].d->value -= delta - (sa[i].offset - sa[i].d->value); <=> sa[i].d->value = sa[i].d->value - (delta - (sa[i].offset - sa[i].d->value)); <=> sa[i].d->value = sa[i].d->value - delta + sa[i].offset - sa[i].d->value; <=> sa[i].d->value = sa[i].offset - delta; ``` This patch implements this simplification. I believe this improves the readability of the code as it took me quite some time to understand the use of `valueDelta`. It might also have a slight performance benefit as it removes one iteration over all relocations every relax iteration. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D149735
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D149634
-
Timm Bäder authored
-
Timm Bäder authored
Fixes https://github.com/llvm/llvm-project/issues/62004 Differential Revision: https://reviews.llvm.org/D147840
-
Matthias Springer authored
Add a helper function that makes dynamic sizes of `memref.alloca` ops independent of a given set of values. This functionality can be used to make dynamic allocations hoistable from loops. Differential Revision: https://reviews.llvm.org/D149316
-
Nimish Mishra authored
This patch adds lowering support for atomic capture operation. First is created a region (without any operand) for the atomic capture operation. Then based on one of the following configurations... 1. [update-stmt, capture-stmt] 2. [capture-stmt, update-stmt] 3. [capture-stmt, write-stmt] ... the lowering proceeds by creating these individual operations inside the atomic capture's region. Differential Revision: https://reviews.llvm.org/D127272 Reviewed By: kiranchandramohan
-
Chen Zheng authored
Some debuggers like DBX on AIX assume the address in debug line entries is always incremental. But clang generates two entries (entry for file scope line and entry for prologue end) with same address if prologue is empty And if the prologue is empty, seems the first debug line entry for the function is unnecessary(i.e. removing the first entry won't impact the behavior in GDB on Linux), so I implement this for all debuggers. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D147506
-
Chen Zheng authored
[DebugLine] save one debug line entry for empty prologue
-
Fangrui Song authored
-
Nimish Mishra authored
construct This patch adds lowering support for lastprivate privatization on unstructured construct. Generic lastprivate lowering on sections involves creating a if operation on the lexically last section block and updating the lastprivate variable inside it. However, this control flow is not needed if the section construct is lowered as an unstructured construct. Hence, this patch modifies the lowering control flow to not emit an unnecessary scf.if if the section block is lowered as an unstructured construct. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D143077
-
Alexander Yermolovich authored
There are CUs that have DW_AT_loclists_base, but no DW_AT_location in children DIEs. Pre-bolt it points to a valid offset. We were not updating it, so it ended up pointing in the middle of a list and caused LLDB to print out errors. Changed it to point to first location list. I don't think it should matter since there are no accesses to it anyway. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D149798
-
NAKAMURA Takumi authored
-
Fangrui Song authored
GotPltSectionVA is specific to x86-32 PIC PLT entries. Let's remove the argument from the generic interface. As a side effect of not requiring .got.plt, this simplification addresses a subset of https://github.com/llvm/llvm-project/issues/62537 by enabling .plt dumping for some ld.bfd -z now linked x86-32/x86-64 images without .got.plt
-
wren romano authored
This helps catch some otherwise hard to track down segfaults. N.B., even though `getSparseTensorType` is not touched in this patch, it also gains the new error checking (via `getRankedTensorType`). Depends On D149805 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D149806
-
wren romano authored
(This will be used in future patches, but is split off for easier reviewing) Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D149805
-
Bolshakov authored
Several issues have been discovered and (hopefully) fixed here: - Reference NTTPs should be mangled in the same manner as pointer ones. - Pointer fields of class type NTTPs should be treated in the same manner as reference ones. - Pointer-to-member fields of class type NTTPs should be treated differently compared to pointer-to-member NTTPs. Tests on pointer-to-member-function NTTP class fields added. - Correct mangling of pointers to anonymous union members. - A bug in mangling references to subobjects fixed. - Mangling array subscripts and base class members in references to subobjects. Reference NTTP mangling was done back in 2013 in e8fdc06e, and Microsoft might change mangling algorithm since then. But class type NTTPs are introduced only in C++20, and the test was written in b637148e. It is strange if the MS ABI had been realy changed, because Microsoft claims that they maintain ABI stability since VS 2015. I've tested both on v142 and v143 MSVC toolsets, and they show the same behavior on the test cases which are changed in this PR. But pointer-to-member-function NTTP class field mangling has been actually changed, because it was erroneous in v142, leading to name collisions. Moreover, pointer-to-member mangling with conversions across class hierarchy has been enabled. Differential Revision: https://reviews.llvm.org/D146386
-
Daniel Paoliello authored
The S_LPROC32_ID and S_GPROC32_ID CodeView Debug Symbols have a flags field which LLVM has had the values for (in the ProcSymFlags enum) but has never actually set. These flags are used by Microsoft-internal tooling that leverages debug information to do binary analysis. Modified LLVM to set the correct flags: - ProcSymFlags::HasOptimizedDebugInfo - always set, as this indicates that debug info is present for optimized builds (if debug info is not emitted for optimized builds, then LLVM won't emit a debug symbol at all). - ProcSymFlags::IsNoReturn and ProcSymFlags::IsNoInline - set if the function has the NoReturn or NoInline attributes respectively. - ProcSymFlags::HasFP - set if the function requires a frame pointer (per TargetFrameLowering::hasFP). Differential Revision: https://reviews.llvm.org/D148761
-
Michael Maitland authored
Parsing instruments and analysis regions causes us to see the same labels two times since we parse the same file twice under the same context. This change creates a seperate context for instrument parsing and another for analysis region parsing. I will post a follow up commit once I get some free cycles to parse analysis regions and instruments in one parsing pass under a single context. Differential Revision: https://reviews.llvm.org/D149781
-
Shao-Ce SUN authored
This patch was split from D122918 . Co-Author: @liaolucy @realqhc Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D149665
-
Uday Bondhugula authored
The dependencies were set up improperly likely due to past code locations. MathTransforms shouldn't depend on VectorUtils which add a whole bunch of additional dependencies; it instead depends on the SCF dialect. Differential Revision: https://reviews.llvm.org/D149797
-
max authored
Differential Revision: https://reviews.llvm.org/D149690
-
Jon Chesterfield authored
Removes the redundant Ack/Data bit manipulation. Represents the inbox/outbox state with one bit instead of two. This will be useful if we change to a packed representation and otherwise cuts the runtime state space from 16 to 4. Further simplification is possible, this patch is intentionally minimal. - can_{send,recv}_data are now in == out - {client,server}::try_open can be factored into Process:try_open This implements the state machine of D148191, modulo differences in atomic ordering and fences. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D149788 -
Thomas Lively authored
The wasm64 versions of the v128.storeX_lane instructions was incorrectly defined as returning a v128 value, which resulted in spurious drop instructions being emitted and causing validation to fail. This was not caught earlier because wasm64 has been experimental and not well tested. Update the relevant test file to test both wasm32 and wasm64. Fixes #62443. Differential Revision: https://reviews.llvm.org/D149780
-
Valentin Clement authored
Reduction clause on loop or compute constructs is not currently lowered but no TODO message was issued. Add a proper TODO so the user is informed. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D149789
-
Krzysztof Drewniak authored
This changes the test in GlobalISel, which makes it match the test elsewhere. Differential Revision: https://reviews.llvm.org/D149795
-
Felipe de Azevedo Piovezan authored
We use a map of Argument->AllocaInst when mapping Arguments to the AllocaInst created for them. Said map is declared from "Value" and called a "DbgPtrCache". This commit: * replaces Value to the more specialized Argument class, to reflect the intent better (i.e. we are _always_ mapping Arguments). * replaces the name "DbgPtrCache" with the more explicit "ArgToAllocaMap", as it is not clear reading the code what a "DbgPtr" is. Differential Revision: https://reviews.llvm.org/D149748
-
Nikolas Klauser authored
Reviewed By: ldionne, Mordante, #libc Spies: grandinj, libcxx-commits, arphaman Differential Revision: https://reviews.llvm.org/D148478
-
Jon Chesterfield authored
Prevent operation reordering with fence instead of a comment. The mailboxes are in shared memory and the locks structure in device memory. If the mailboxes are read and then the lock taken, the lock says nothing about the current or future state of those mail boxes. The relaxed atomic fetch_or can be reordered before the relaxed atomic loads of unrelated variables unless there is a fence preventing this. Patches both Client::try_open and Server::try_open, one of which is missing an optimisation and the other is missing the comment, but which otherwise could be Process::try_open followed by buffer->opcode = opcode in Client. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D149790
-
Slava Zakharin authored
Required after D148767 for flang+debug+slibs build. Reviewed By: chapuni, clementval Differential Revision: https://reviews.llvm.org/D149764
-