- May 05, 2021
-
-
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
-
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
-
Florian Hahn authored
This patch updates the code that sinks recipes required for first-order recurrences to properly handle replicate-regions. At the moment, the code would just move the replicate recipe out of its replicate-region, producing an invalid VPlan. When sinking a recipe in a replicate-region, we have to sink the whole region. To do that, we first need to split the block at the target recipe and move the region in between. This patch also adds a splitAt helper to VPBasicBlock to split a VPBasicBlock at a given iterator. Fixes PR50009. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D100751
-
Rob Suderman authored
All linalg.init operations must be fed into a linalg operation before subtensor. The inserted linalg.fill guarantees it executes correctly. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D101848
-
Baptiste Saleil authored
-
Fangrui Song authored
llvm-mc will error "expected comma" instead of "unexpected token".
-
Dávid Bolvanský authored
This reverts commit 4e7a4c73. Not needed, pattern is handled by instcombine already.
-
Arthur O'Dwyer authored
Differential Revision: https://reviews.llvm.org/D101638
-
Baptiste Saleil authored
This patch disables some of the passes at -O1. These passes have a significant impact on compilation time, so we only want them to be enabled starting from -O2. Differential Revision: https://reviews.llvm.org/D101414
-
Louis Dionne authored
In std::tuple, we should try to avoid calling std::is_copy_constructible whenever we can to avoid surprising interactions with (I believe) compiler builtins. This bug was reported in https://reviews.llvm.org/D96523#2730953. The issue was that when tuple<_Up...> was the same as tuple<_Tp...>, we would short-circuit the _Or (because sizeof...(_Tp) != 1) and go evaluate the following `is_constructible<_Tp, const _Up&>...`. That shouldn't actually be a problem, but see the analysis in https://reviews.llvm.org/D101770#2736470 for why it is with Clang and GCC. Instead, after this patch, we check whether the constructed-from tuple is the same as the current tuple regardless of the number of elements, since we should always prefer the normal copy constructor in that case anyway. Differential Revision: https://reviews.llvm.org/D101770
-
Fangrui Song authored
-
Matt Arsenault authored
-
Matt Arsenault authored
The resulting output is semantically closer to what the DAG emits and is more compatible with the existing CCAssignFns. The returns of f32 in f80 are clearly broken, but they were broken before when using G_ANYEXT to go from f32 to f80.
-
Fangrui Song authored
The directive name is not useful because the next line replicates the error line which includes the directive.
-
Thomas Lively authored
We previously had an ISel pattern for i64x2.abs, but because the ISDNode was not marked legal for v2i64, the instruction was not being selected. Differential Revision: https://reviews.llvm.org/D101803
-
Alina Sbirlea authored
-
Xun Li authored
This patch is to address https://bugs.llvm.org/show_bug.cgi?id=49916. When the size of an alloca is 0, it will trigger an assertion in OptimizedStructLayout when being added to the frame. Fix it by not adding it at all. We return index 0 (beginning of the frame) for all 0-sized allocas. Differential Revision: https://reviews.llvm.org/D101841
-
Adrian Prantl authored
-
Martin Storsjö authored
Unwind info generated by MSVC tends to have relocations pointing at static "label" symbols like "$LN4" instead of regular ones based on the actual function's name. Try to resolve such symbols to a non-label symbol if possible (ideally to an external symbol), to improve the readability. Differential Revision: https://reviews.llvm.org/D101567
-
Martin Storsjö authored
This is a followup to 2b01a417; previously the RVAs of the exported symbols from comdats were left zero. Thanks to Kleis Auke Wolthuizen for the fix suggestion and pointing out the omission. Differential Revision: https://reviews.llvm.org/D101615
-
Martin Storsjö authored
After 39bbfb77, bash is no longer a hard requirement. Differential Revision: https://reviews.llvm.org/D101779
-
Giorgis Georgakoudis authored
The script update_cc_test_checks runs all non-filechecked runlines before the filechecked ones. This creates problems since outputs of those non-filechecked runlines may conflict and that will fail the execution of update_cc_test_checks. This patch executes non-filechecked in the order specified in the test file to avoid this issue. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D101683
-
Giorgis Georgakoudis authored
Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D101800
-
Leonard Chan authored
Reduces the number of targets/triples for this test since not all cmake invocations will build for those targets.
-
Dan Liew authored
When the target triple was an Apple platform `ToolChain::getOSLibName()` (called by `getCompilerRTPath()`) would return the full OS name including the version number (e.g. `darwin20.3.0`). This is not correct because the library directory for all Apple platforms is `darwin`. This in turn caused * `-print-runtime-dir` to return a non-existant path. * `-print-file-name=<any compiler-rt library>` to return the filename instead of the full path to the library. Two regression tests are included. rdar://77417317 Differential Revision: https://reviews.llvm.org/D101682
-