- May 05, 2021
-
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D101861
-
Sushma Unnibhavi authored
Reviewed By: xgupta, gargaroff Differential Revision: https://reviews.llvm.org/D101227
-
Hans Wennborg authored
The test doesn't pass in no-asserts builds, see comment on https://reviews.llvm.org/D101805
-
Fraser Cormack authored
Previously, RISC-V would make legal all fixed-length vectors types whose size are less than or equal to some function of the minimum value of VLEN and the maximum-permissible LMUL grouping. Due to vector legalization issues, this patch instead caps the legal fixed-length vector types to those with 256 elements. This value was chosen because it is the longest vector length which has corresponding MVTs across all supported element types. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D101839
-
Julien Pagès authored
Improve the code generation of fp_to_sint and fp_to_uint for integer on 16-bits. Differential Revision: https://reviews.llvm.org/D101481 Patch by Julien Pagès!
-
Javier Setoain authored
While we figure out how to best add Standard support for scalable vectors, these instructions provide a workaround for basic arithmetic between scalable vectors. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D100837
-
Fangrui Song authored
The internal `cl::opt` option --x86-asm-syntax sets the AsmParser and AsmWriter dialect. The option is used by llc and llvm-mc tests to set the AsmWriter dialect. This patch adds -M {att,intel} as GNU objdump compatible aliases (PR43413). Note: the dialect is initialized when the MCAsmInfo is constructed. `MCInstPrinter::applyTargetSpecificCLOption` is called too late and its MCAsmInfo reference is const, so changing the `cl::opt` in `MCInstPrinter::applyTargetSpecificCLOption` is not an option, at least without large amount of refactoring. Reviewed By: hoy, jhenderson, thakis Differential Revision: https://reviews.llvm.org/D101695
-
Yang Fan authored
GCC warning: ``` In file included from /llvm-project/clang/include/clang/Basic/LangOptions.h:22, from /llvm-project/clang/include/clang/Frontend/CompilerInvocation.h:16, from /llvm-project/clang/lib/Frontend/CompilerInvocation.cpp:9: /llvm-project/clang/include/clang/Basic/TargetCXXABI.h: In static member function ‘static bool clang::TargetCXXABI::isSupportedCXXABI(const llvm::Triple&, clang::TargetCXXABI::Kind)’: /llvm-project/clang/include/clang/Basic/TargetCXXABI.h:114:3: warning: control reaches end of non-void function [-Wreturn-type] 114 | }; | ^ ```
-
Med Ismail Bennani authored
Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Jianzhou Zhao authored
https://reviews.llvm.org/D101666 enables sanitizer allocator. This broke all test cases on non x86-64.
-
Med Ismail Bennani authored
This patch fixes the column symbol resolution when creating a breakpoint with the `move_to_nearest_code` flag set. In order to achieve this, the patch adds column information handling in the `LineTable`'s `LineEntry` finder. After experimenting a little, it turns out the most natural approach in case of an inaccurate column match, is to move backward and match the previous `LineEntry` rather than going forward like we do with simple line breakpoints. The patch also reflows the function to reduce code duplication. Finally, it updates the `BreakpointResolver` heuristic to align it with the `LineTable` method. rdar://73218201 Differential Revision: https://reviews.llvm.org/D101221 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
LLVM GN Syncbot authored
-
Brad Smith authored
-
zoecarver authored
Based on D101079. Differential Revision: https://reviews.llvm.org/D101189
-
zoecarver authored
The begining of [range.prim]. Differential Revision: https://reviews.llvm.org/D101079
-
Juneyoung Lee authored
This is a simple folding that does these: ``` select x_inv, true, (select y, x, false) => select x_inv, true, y ``` https://alive2.llvm.org/ce/z/-STJ2d ``` select (select y, x, false), true, x_inv => select y, true, x_inv ``` https://alive2.llvm.org/ce/z/6ruYt6 Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D101807
-
Juneyoung Lee authored
-
zoecarver authored
Differential Revision: https://reviews.llvm.org/D101316
-
William S. Moses authored
Differential Revision: https://reviews.llvm.org/D101798
-
Serguei Katkov authored
statepoint instruction uses tied-def registers to represent live gc value which is use and def at the same time on a call. At the same time invoke statepoint instruction is a last split point which can throw and jump to landing pad. As a result we have instructon which is last split point with tied-defs registers and we need to teach Greedy RA to work with it. The option -use-registers-for-gc-values-in-landing-pad controls whether statepoint lowering will generate tied-defs for invoke statepoint and is off by default now. To resolve all issues the following changes has been done. 1) Last Split point for invoke statepoint should be statepoint itself If statepoint has a def it is a relocated gc pointer and it should be available in landing pad. So we cannot split interval after statepoint at end of basic block. 2) Do not split interval on tied-def If end of interval for overlap utility is a use which has tied-def we should not split interval on this instruction due to in this case use and def may have different registers and it breaks tied-def property. 3) Take into account Last Split Point for enterIntvAtEnd If the use after Last Split Point is a def so it should be tied-def and we can take the def of the tied-use as ParentVNI and thus tied-use and tied-def will be live in resulting interval. 4) Handle the case when def is after LIP in InlineSpiller If def of LI is after last insertion point of basic block we cannot hoist in this BB. The example of such instruction is invoke statepoint where def represents the relocated live gc pointer. Invoke is a last insertion point and its def is located after it. In this case there is no place to insert spill and we bail out. 5) Fix removeBackCopies to account empty copies RegAssignMap cannot hold empty interval, so do not set stop to kill value if it produces empty interval. This can happen if we remove back-copy and right before that we have another back-copy. For example, for parent %0 we can get %1 = COPY %0 %2 = COPY %0 while we removing %2 we cannot set kill for %1 due to its empty. 6) Do not hoist copy to BB if its def is after LSP If the parent def is a LastSplitPoint or later we cannot hoist copy to this basic block because inserted copy (or re-materialization) will be located before the def. All parts have been reviewed separately as follows: https://reviews.llvm.org/D100747 https://reviews.llvm.org/D100748 https://reviews.llvm.org/D100750 https://reviews.llvm.org/D100927 https://reviews.llvm.org/D100945 https://reviews.llvm.org/D101028 Reviewers: reames, rnk, void, MatzeB, wmi, qcolombet Reviewed By: reames, qcolombet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D101150
-
LLVM GN Syncbot authored
-
Lang Hames authored
This test was removed in 51495fd2 due to broken bots. Its reintroduction is expected to trigger failures on some builders. The test has been modified to print error messages in full, which should aid in tracking these down.
-
Walter Erquinigo authored
When dumping the traced instructions in a for loop, like this one 4: for (int a = 0; a < n; a++) 5: do something; there might be multiple LineEntry objects for line 4, but with different address ranges. This was causing the dump command to dump something like this: ``` a.out`main + 11 at main.cpp:4 [1] 0x0000000000400518 movl $0x0, -0x8(%rbp) [2] 0x000000000040051f jmp 0x400529 ; <+28> at main.cpp:4 a.out`main + 28 at main.cpp:4 [3] 0x0000000000400529 cmpl $0x3, -0x8(%rbp) [4] 0x000000000040052d jle 0x400521 ; <+20> at main.cpp:5 ``` which is confusing, as main.cpp:4 appears twice consecutively. This diff fixes that issue by making the line entry comparison strictly about the line, column and file name. Before it was also comparing the address ranges, which we don't need because our output is strictly about what the user sees in the source. Besides, I've noticed that the logic that traverses instructions and calculates symbols and disassemblies had too much coupling, and made my changes harder to implement, so I decided to decouple it. Now there are two methods for iterating over the instruction of a trace. The existing one does it on raw load addresses, but the one provides a SymbolContext and an InstructionSP, and does the calculations efficiently (not as efficient as possible for now though), so the caller doesn't need to care about these details. I think I'll be using that iterator to reconstruct the call stacks. I was able to fix a test with this change. Differential Revision: https://reviews.llvm.org/D100740
-
Jianzhou Zhao authored
This reverts commit 78804e6b.
-
Jianzhou Zhao authored
This is a part of https://reviews.llvm.org/D101204 Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D101666
-
Jianzhou Zhao authored
This relates to https://reviews.llvm.org/D95835. In DFSan origin tracking we use StackDepot to record stack traces and origin traces (like MSan origin tracking). For at least two reasons, we wanted to control StackDepot's memory cost 1) We may use DFSan origin tracking to monitor programs that run for many days. This may eventually use too much memory for StackDepot. 2) DFSan supports flush shadow memory to reduce overhead. After flush, all existing IDs in StackDepot are not valid because no one will refer to them.
-
Med Ismail Bennani authored
Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Med Ismail Bennani authored
This patch should fix the windows test failure following `3e2ed744`. It makes use of a `SourceLocationSpec` object when resolving a symbol context from `SymbolFilePDB` file. Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Fangrui Song authored
Fix PR45416: the diagnostic when '=' is missing is misleading. `FileOutputBuffer::create` returns successfully when the filename is empty (the temporary file is `.tmp%%%%%%%`), but `FileOutputBuffer::commit` will error when renaming `.tmp%%%%%%%` to the empty name). Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D101697
-
Giorgis Georgakoudis authored
This reverts commit 956cae2f.
-
Aart Bik authored
This revision migrates more code from Linalg into the new permanent home of SparseTensor. It replaces the test passes with proper compiler passes. NOTE: the actual removal of the last glue and clutter in Linalg will follow Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D101811
-
Han Zhu authored
For a simple loop like: ``` struct S { int x; int y; char b; }; unsigned foo(S* __restrict__ a, S* b, int n) { for (int i = 0; i < n; i++) a[i] = b[i]; return sizeof(a[0]); } ``` We could eliminate the loop and convert it to a large memcpy of 12*n bytes. Currently this is not handled. Output of `opt -loop-idiom -S < memcpy_before.ll` ``` %struct.S = type { i32, i32, i8 } define dso_local i32 @_Z3fooP1SS0_i(%struct.S* noalias nocapture %a, %struct.S* nocapture readonly %b, i32 %n) local_unnamed_addr { entry: %cmp7 = icmp sgt i32 %n, 0 br i1 %cmp7, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry br label %for.body for.cond.cleanup.loopexit: ; preds = %for.body br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry ret i32 12 for.body: ; preds = %for.body, %for.body.preheader %i.08 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ] %idxprom = zext i32 %i.08 to i64 %arrayidx = getelementptr inbounds %struct.S, %struct.S* %b, i64 %idxprom %arrayidx2 = getelementptr inbounds %struct.S, %struct.S* %a, i64 %idxprom %0 = bitcast %struct.S* %arrayidx2 to i8* %1 = bitcast %struct.S* %arrayidx to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 4 dereferenceable(12) %0, i8* nonnull align 4 dereferenceable(12) %1, i64 12, i1 false) %inc = add nuw nsw i32 %i.08, 1 %cmp = icmp slt i32 %inc, %n br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit } ; Function Attrs: argmemonly nofree nosync nounwind willreturn declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #0 attributes #0 = { argmemonly nofree nosync nounwind willreturn } ``` The loop idiom pass currently only handles load and store instructions. Since struct S is too big to fit in a register, the loop body contains a memcpy intrinsic. With this change, re-run `opt -loop-idiom -S < memcpy_before.ll`. The loop memcpy is promoted to loop preheader. For this trivial case, the loop is dead and will be removed by another pass. ``` %struct.S = type { i32, i32, i8 } define dso_local i32 @_Z3fooP1SS0_i(%struct.S* noalias nocapture %a, %struct.S* nocapture readonly %b, i32 %n) local_unnamed_addr { entry: %a1 = bitcast %struct.S* %a to i8* %b2 = bitcast %struct.S* %b to i8* %cmp7 = icmp sgt i32 %n, 0 br i1 %cmp7, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %0 = zext i32 %n to i64 %1 = mul nuw nsw i64 %0, 12 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %a1, i8* align 4 %b2, i64 %1, i1 false) br label %for.body for.cond.cleanup.loopexit: ; preds = %for.body br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry ret i32 12 for.body: ; preds = %for.body, %for.body.preheader %i.08 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ] %idxprom = zext i32 %i.08 to i64 %arrayidx = getelementptr inbounds %struct.S, %struct.S* %b, i64 %idxprom %arrayidx2 = getelementptr inbounds %struct.S, %struct.S* %a, i64 %idxprom %2 = bitcast %struct.S* %arrayidx2 to i8* %3 = bitcast %struct.S* %arrayidx to i8* %inc = add nuw nsw i32 %i.08, 1 %cmp = icmp slt i32 %inc, %n br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit } ; Function Attrs: argmemonly nofree nosync nounwind willreturn declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #0 attributes #0 = { argmemonly nofree nosync nounwind willreturn } ``` Reviewed By: zino Differential Revision: https://reviews.llvm.org/D97667
-
Giorgis Georgakoudis authored
This patch refactors a subset of Clang OpenMP tests, generating checklines using the update_cc_test_checks script. This refactoring facilitates updating the Clang OpenMP code generation codebase by automating test generation. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D101849
-
Thomas Lively authored
We previously did not have tests demonstrating that the intrinsics in wasm_simd128.h lower to reasonable LLVM IR. This commit adds such a test. Differential Revision: https://reviews.llvm.org/D101805
-
Med Ismail Bennani authored
This patch refactors a good part of the code base turning the usual FileSpec, Line, Column, CheckInlines, ExactMatch arguments into a SourceLocationSpec object. This change is required for a following patch that will add handling of the column line information when doing symbol resolution. Differential Revision: https://reviews.llvm.org/D100965 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Jianzhou Zhao authored
D101666 needs this change. Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D101857
-
Leonard Chan authored
This attempts to move driver tests out of Frontend and to Driver, separates RUNs that should fail from RUNs that should succeed, and prevent creating output files or dumping output. Differential Revision: https://reviews.llvm.org/D101867
-
Louis Dionne authored
This reverts commit da456167, which broke the Clang build. I'm able to reproduce it but I want to give myself a bit more time to investigate. Differential Revision: https://reviews.llvm.org/D101638
-
Baptiste Saleil authored
-
- May 04, 2021
-
-
River Riddle authored
We weren't properly visiting region successors when the terminator wasn't return like, which could create incorrect results in the analysis. This revision ensures that we properly visit region successors, to avoid optimistically assuming a value is constant when it isn't. Differential Revision: https://reviews.llvm.org/D101783
-