- Mar 30, 2021
-
-
Markus Böck authored
Encountered a crash while running a debug build, where this code path would be taken due to a mismatch in profile coverage data versions. Without consuming the error, an assert would be triggered inside the destructor of Error. Differential Revision: https://reviews.llvm.org/D99457
-
Pavel Labath authored
This test is not useful as the functions it's testing are just returning a constant. It also fails in unoptimized builds as it's comparing character strings by address.
-
Pavel Labath authored
This is the test I mentioned in the previous commit (1b96e133), but forgot to add.
-
Pavel Labath authored
Remove the "depth" variable, as the same information can be obtained through die_index_stack.size(). Also add a test case for a one tricky case I noticed -- a unit containing only a null unit die.
-
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 -
Fangrui Song authored
-
Han Zhu authored
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Blame Revision: Differential Revision: https://phabricator.intern.facebook.com/D26380397
-
Johannes Doerfert authored
The `noinline` for non-SPMD parallel functions is probably not necessary but as long as we use it we should put it on the outermost parallel function, which is the wrapper, not the actual outlined function. Resolves PR49752 Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D99506
-
Max Kazantsev authored
-
Fangrui Song authored
The previous code may underestimate the static TLS surplus part, which may cause false positives to LeakSanitizer if a dynamically loaded module uses the surplus and there is an allocation only referenced by a thread's TLS.
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Alok Kumar Sharma authored
This is needed for Fortran assumed shape arrays whose dimensions are defined as, - 'count' is taken from array descriptor passed as parameter by caller, access from descriptor is defined by type DIExpression. - 'lowerBound' is defined by callee. The current alternate way represents using upperBound in place of count, where upperBound is calculated in callee in a temp variable using lowerBound and count Representation with count (DIExpression) is not only clearer as compared to upperBound (DIVariable) but it has another advantage that variable count is accessed by being parameter has better chance of survival at higher optimization level than upperBound being local variable. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D99335 -
Rahman Lavaee authored
Empty functions (functions with no real code) are irrelevant for propeller optimizations and their addresses sometimes conflict with other functions which obfuscates the analysis. This simple change skips the BB address map emission for such functions. Reviewed By: tmsriram Differential Revision: https://reviews.llvm.org/D99395
-
Stella Stamenova authored
This breaks the windows bots because the dependency does not exist on Windows. Per the cmake file: if(CMAKE_HOST_UNIX) add_subdirectory(LLJITWithRemoteDebugging) endif() This reverts commit bd56e91f.
-
Jun Ma authored
-
Jun Ma authored
Differential Revision: https://reviews.llvm.org/D99324
-
Jun Ma authored
Differential Revision: https://reviews.llvm.org/D99412
-
Louis Dionne authored
Download older roots from Dropbox instead of Green Dragon, which is too unreliable. Also XFAIL tests that were broken for back-deployment configurations by D98097. Differential Revision: https://reviews.llvm.org/D99359
-
Hsiangkai Wang authored
Add asm constraint 'vr' for vector registers. Add asm constraint 'vm' for vector mask registers. Differential Revision: https://reviews.llvm.org/D98616
-
Evandro Menezes authored
Differential Revision: https://reviews.llvm.org/D99557
-
Adrian Prantl authored
This commit adds debugging support for set types defined in languages such as Pascal and Modula-2. Patch by Peter McKinna! Differential Revision: https://reviews.llvm.org/D76115
-
Dave Lee authored
-
David Blaikie authored
-
Thomas Lively authored
When I updated the SIMD opcodes in f5764a86, I accidentally missed updating i8x16.popcnt. This patch fixes the omission. Differential Revision: https://reviews.llvm.org/D99536
-
Jonas Devlieghere authored
-
Huihui Zhang authored
Use SmallVector instead of SmallSet to track the context profiles mapped. Doing this can help avoid non-determinism caused by iterating over unordered containers. This bug was found with reverse iteration turning on, --extra-llvm-cmake-variables="-DLLVM_REVERSE_ITERATION=ON". Failing LLVM test profile-context-tracker-debug.ll . Reviewed By: MaskRay, wenlei Differential Revision: https://reviews.llvm.org/D99547
-
Jessica Paquette authored
regbank-ceil.ll -> regbank-ceil.mir The IR test was intended to only check register banks. This makes it brittle, especially as we improve load/store combines in GlobalISel. Rewriting this as a MIR test also makes it more consistent with the rest of the testcases in GlobalISel.
-
Jonas Devlieghere authored
dsymutil is not relocating the DW_AT_low_pc for a DW_TAG_label. This patch fixes that and adds a test. Differential revision: https://reviews.llvm.org/D99534
-
Jonas Devlieghere authored
-
Greg Clayton authored
When LLVM error handling was introduced to the parsing of the .debug_aranges it would cause major issues if any DWARFDebugArangeSet::extract() calls returned any errors. The code in DWARFDebugInfo::GetCompileUnitAranges() would end up calling DWARFDebugAranges::extract() which would return an error if _any_ DWARFDebugArangeSet had any errors, but it default constructed a DWARFDebugAranges object into DWARFDebugInfo::m_cu_aranges_up and populated it partially, and returned an error prior to finishing much needed functionality in the DWARFDebugInfo::GetCompileUnitAranges() function. Subsequent callers to this function would see that the DWARFDebugInfo::m_cu_aranges_up was actually valid and return this partially populated DWARFDebugAranges reference _and_ it would not be sorted or minimized. This above bugs would cause an incomplete .debug_aranges parsing, it would skip manually parsing any compile units for ranges, and would not sort the DWARFDebugAranges in m_cu_aranges...
-
LLVM GN Syncbot authored
-
Gulfem Savrun Yeniceri authored
Lookup tables generate non PIC-friendly code, which requires dynamic relocation as described in: https://bugs.llvm.org/show_bug.cgi?id=45244 This patch adds a new pass that converts lookup tables to relative lookup tables to make them PIC-friendly. Differential Revision: https://reviews.llvm.org/D94355
-
Florian Hahn authored
Currently performExtendCombine assumes that the src-element bitwidth * 2 is a valid MVT. But this is not the case for i1 and it causes a crash on the v64i1 test cases added in this patch. It turns out that this code appears to not be needed; the same patterns are handled by other code and we end up with the same results, even without the custom lowering. I also added additional test cases in a50037aa. Let's just remove the unneeded code. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D99437
-
Jonas Devlieghere authored
Print LLVM's pretty stack trace when lldb-vscode crashes. Also removes the unnecessary call to PrintStackTraceOnErrorSignal in lldb-server as it's already part of InitLLVM. Differential revision: https://reviews.llvm.org/D99535
-
Nikita Popov authored
If the successor block has a phi node, then additional moves may be inserted into predecessors, which may clobber eflags. Don't try to fold the with.overflow result into the branch in that case. This is done by explicitly checking for any phis in successor blocks, not sure if there's some more principled way to address this. Other fused compare and branch patterns avoid the issue by emitting the comparison when handling the branch, so that no instructions may be inserted in between. In this case, the with.overflow call is emitted separately (and I don't think this is avoidable, as it will generally have at least two users). Fixes https://bugs.llvm.org/show_bug.cgi?id=49587. Differential Revision: https://reviews.llvm.org/D98600
-
Fanbo Meng authored
Reviewed By: abhina.sreeskantharajan Differential Revision: https://reviews.llvm.org/D99514
-
Fangrui Song authored
This is the behavior required by the standards. Differential Revision: https://reviews.llvm.org/D99480
-