summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [Sanitizer][RISCV][AArch64][Android] Adjust allocator teststest-D97234Luís Marques2021-03-301-15/+31
| | | | | | | | | | | | | | | On 64-bit systems with small VMAs (e.g. 39-bit) we can't use SizeClassAllocator64 parameterized with size class maps containing a large number of classes, as that will make the allocator region size too small (< 2^32). Several tests were already disabled for Android because of this. This patch provides the correct allocator configuration for RISC-V (riscv64), generalizes the gating condition for tests that can't be enabled for small VMA systems, and tweaks the tests that can be made compatible with those systems to enable them. I think the previous gating on Android should instead be AArch64+Android, so the patch reflects that.
* [lldb] Remove linux/mips debugging supportPavel Labath2021-03-3019-2347/+0
| | | | | | | | | | | | As discussed on lldb-dev <https://lists.llvm.org/pipermail/lldb-dev/2021-March/016777.html> the mips code is unmaintained and untested. It also carries a lot of technical debt which is not limited to mips-specific code. Generic mips support remains (and is going to be used by the upcoming freebsd code). Resurrecting mips support should be a matter of re-adding the relevant register context files (while avoiding reintroducing the debt).
* [AMDGPU] Remove outdated TODOs. NFCSebastian Neubauer2021-03-301-2/+0
| | | | | | spillSGPRToVGPR is already respected in these places since D95768. Differential Revision: https://reviews.llvm.org/D99570
* [lldb] [server] Support for multiprocess extensionMichał Górny2021-03-3011-10/+431
| | | | | | | | | | Add a minimal support for the multiprocess extension in lldb-server. The server indicates support for it via qSupported, and accepts thread-ids containing a PID. However, it still does not support debugging more than one inferior, so any other PID value results in an error. Differential Revision: https://reviews.llvm.org/D98482
* [analyzer] Fix crash when reasoning about C11 atomics (PR49422)Valeriy Savchenko2021-03-302-0/+14
| | | | | | rdar://75020762 Differential Revision: https://reviews.llvm.org/D99274
* [libc++] Add a CI job to test the Runtimes buildLouis Dionne2021-03-302-0/+33
| | | | Differential Revision: https://reviews.llvm.org/D97888
* [analyzer] Support allocClassWithName in OSObjectCStyleCast checkerValeriy Savchenko2021-03-303-10/+53
| | | | | | | | | | | | | | | | `allocClassWithName` allocates an object with the given type. The type is actually provided as a string argument (type's name). This creates a possibility for not particularly useful warnings from the analyzer. In order to combat with those, this patch checks for casts of the `allocClassWithName` results to types mentioned directly as its argument. All other uses of this method should be reasoned about as before. rdar://72165694 Differential Revision: https://reviews.llvm.org/D99500
* [Analyzer] Track RValue expressionsGabor Marton2021-03-304-1/+153
| | | | | | | | | | | It makes sense to track rvalue expressions in the case of special concrete integer values. The most notable special value is zero (later we may find other values). By tracking the origin of 0, we can provide a better explanation for users e.g. in case of division by 0 warnings. When the divisor is a product of a multiplication then now we can show which operand (or both) was (were) zero and why. Differential Revision: https://reviews.llvm.org/D99344
* [OPENMP]Fix PR48740: OpenMP declare reduction in C does not require an ↵Alexey Bataev2021-03-305-9/+43
| | | | | | | | | | | | | initializer If no initializer-clause is specified, the private variables will be initialized following the rules for initialization of objects with static storage duration. Need to adjust the implementation to the current version of the standard. Differential Revision: https://reviews.llvm.org/D99539
* clang-format: [JS] do not collapse - - to --.Martin Probst2021-03-302-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | In JavaScript, `- -1;` is legal syntax, the language allows unary minus. However the two tokens must not collapse together: `--1` is prefix decrement, i.e. different syntax. Before: - -1; ==> --1; After: - -1; ==> - -1; This change makes no attempt to format this "nicely", given by all likelihood this represents a programming mistake by the user, or odd generated code. The check is not guarded by language: this appears to be a problem in Java as well, and will also be beneficial when formatting syntactically incorrect C++ (e.g. during editing). Differential Revision: https://reviews.llvm.org/D99495
* [gn build] Port c51e91e04681LLVM GN Syncbot2021-03-301-1/+0
|
* Revert "[Passes] Add relative lookup table converter pass"Krasimir Georgiev2021-03-3026-743/+16
| | | | | | | This reverts commit 5178ffc7cf92527557ae16e86d0fa90d538c2a19. Compiling `llvm-profdata` with a compiler build from this produces a crashing binary.
* Move test to X86 directoryOliver Stannard2021-03-301-0/+0
| | | | This test uses the X86 backend, so shouldn't be run if that isn't built.
* [lldb] [Process/gdb-remote] Fix TID reading to use U64Michał Górny2021-03-302-4/+4
| | | | | Fix multiple instances of reading thread-id to use U64 type instead of U32. This is consistent with lldb::tid_t being a 64-bit type.
* [clang] [PR49736] [C++2b] Correctly reject lambdas with requires clause and ↵Marek Kurdej2021-03-304-13/+46
| | | | | | | | | | | | no parameter list This fixes http://llvm.org/PR49736 caused by implementing http://wg21.link/P1102 (https://reviews.llvm.org/rG0620e6f4b76a9725dbd82454d58c5a68a7e47074), by correctly allowing requires-clause only: 1) directly after template-parameter-list 2) after lambda-specifiers iff parameter-declaration-clause is present (2nd kind of lambda-declarator) Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D99489
* [x86] enhance matching of pmaddwdSanjay Patel2021-03-302-57/+78
| | | | | | | | | | | | | | This was crashing with the example from: https://llvm.org/PR49716 ...and that was avoided with a283d7258360 , but as we can see from the SSE vs. AVX test code diff, we can try harder to match the pattern. This matcher code was adapted from another pmadd pattern match in D49636, but it needs different ops to deal with size mismatches. Differential Revision: https://reviews.llvm.org/D99531
* Fix path in test added in e0577b3130a646b0ee090c04a40400483031c7a9 to work ↵Douglas Yung2021-03-301-1/+1
| | | | | | with both Linux/Windows paths. Patch by Ying Yi!
* [LoopUnswitch] Simplify branch condition if it is select with constant operandsJuneyoung Lee2021-03-302-2/+9
| | | | | | | | This fixes the miscompilation reported in https://reviews.llvm.org/rG5bb38e84d3d0#986154 . `select _, true, false` matches both m_LogicalAnd and m_LogicalOr, making later transformations confused. Simplify the branch condition to not have the form.
* NFC: Migrate PartialInlining to work on InstructionCostSander de Smalen2021-03-302-18/+38
| | | | | | | | | | | | | This patch migrates cost values and arithmetic to work on InstructionCost. When the interfaces to TargetTransformInfo are changed, any InstructionCost state will propagate naturally. See this patch for the introduction of the type: https://reviews.llvm.org/D91174 See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D97382
* [gn build] (semi-manually) port 51fa9e0fd984Nico Weber2021-03-301-0/+1
|
* Fix cleanup error in TestVSCode_disconnect.test_launchMuhammad Omair Javaid2021-03-302-3/+5
| | | | | | | | | | | | TestVSCode_disconnect.test_launch fails with clean up error because disconnect gets called twice once from the test case and once from the tear down hook. This patch disables disconnect after its been called from test_launch Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D99491
* [lli] Leaving two EH frame tests with MCJIT only after PowerPC failureStefan Gränitz2021-03-302-2/+2
| | | | Will investigate these in isolation once the rest of D98931 successfully landed.
* [ARM] Handle Splats in MVE lane interleavingDavid Green2021-03-302-18/+20
| | | | | | | As another addition to MVE lane interleaving, this handles Splat shuffle vectors, as the shuffle of a splat is a splat. Differential Revision: https://reviews.llvm.org/D97291
* [RegAlloc] Add a test with use in statepoint expected to be on stack.Serguei Katkov2021-03-301-0/+100
| | | | | | | | The test shows that RA computes the spill weight independent on the fact that statepoint instruction for var operands is ok to accept this operand on stack. As a result the corresponding virtual register evicts the other register which requires register for use. It causes redundant fill operation.
* [LoopVectorize] Add support for scalable vectorization of induction variablesDavid Sherwood2021-03-302-20/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the vectorization of induction variables when using scalable vectors, which required the following changes: 1. Removed assert from InnerLoopVectorizer::getStepVector. 2. Modified InnerLoopVectorizer::createVectorIntOrFpInductionPHI to use a runtime determined value for VF and removed an assert. 3. Modified InnerLoopVectorizer::buildScalarSteps to work for scalable vectors. I did this by calculating the full vector value for each Part of the unroll factor (UF) and caching this in the VP state. This means that we are always able to extract an arbitrary element from the vector if necessary. In addition to this, I also permitted the caching of the individual lane values themselves for the known minimum number of elements in the same way we do for fixed width vectors. This is a further optimisation that improves the code quality since it avoids unnecessary extractelement operations when extracting the first lane. 4. Added an assert to InnerLoopVectorizer::widenPHIInstruction, since while testing some code paths I noticed this is currently broken for scalable vectors. Various tests to support different cases have been added here: Transforms/LoopVectorize/AArch64/sve-inductions.ll Differential Revision: https://reviews.llvm.org/D98715
* Re-apply "[lli] Make -jit-kind=orc the default JIT engine"Stefan Gränitz2021-03-30101-42/+103
| | | | | | | | MCJIT served well as the default JIT engine in lli for a long time, but the code is getting old and maintenance efforts don't seem to be in sight. In the meantime Orc became mature enough to fill that gap. The newly added greddy mode is very similar to the execution model of MCJIT. It should work as a drop-in replacement for common JIT tasks. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D98931
* [ASTImporter] Import member specialization/instantiation of enum declsGabor Marton2021-03-302-1/+36
| | | | | | | We do the import of the member enum specialization similarly to as we do with member CXXRecordDecl specialization. Differential Revision: https://reviews.llvm.org/D99421
* Revert "[loop-idiom] Hoist loop memcpys to loop preheader"Krasimir Georgiev2021-03-304-468/+45
| | | | | | | This reverts commit 92ddd3c1b6cd8f01f39dfd716cf3e976de126e66. Causes multistage clang crashes, e.g.: https://lab.llvm.org/buildbot/#/builders/36/builds/6678
* [lldb] Change CreateHostNativeRegisterContextLinux argument typePavel Labath2021-03-307-10/+12
| | | | to NativeThreadLinux. This avoid casts down the line.
* [AArch64][SVE] Lower fixed length INSERT_VECTOR_ELTJoe Ellis2021-03-303-0/+323
| | | | Differential Revision: https://reviews.llvm.org/D98496
* [AArch64][SVE] Lower fixed length EXTRACT_VECTOR_ELTJoe Ellis2021-03-304-13/+255
| | | | Differential Revision: https://reviews.llvm.org/D98625
* [clangd] Perform merging for stale symbols in MergeIndexKadir Cetinkaya2021-03-303-29/+106
| | | | | | | | | | | | | | | | | Clangd drops symbols from static index whenever the dynamic index is authoritative for the file. This results in regressions when static and dynamic index contains different set of information, e.g. IncludeHeaders. After this patch, we'll choose to merge symbols from static index with dynamic one rather than just dropping. This implies correctness problems when the definition/documentation of the symbol is deleted. But seems like it is worth having in more cases. We still drop symbols if dynamic index owns the file and didn't report the symbol, which means symbol is deleted. Differential Revision: https://reviews.llvm.org/D98538
* [lldb] Add a test for Obj-C properties with conflicting namesRaphael Isemann2021-03-302-0/+19
| | | | | | | | This is apparently allowed in Objective-C so we should test this in LLDB. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D99513
* [ObjC][CodeGen] Fix missing debug info in situations where an instance and ↵Raphael Isemann2021-03-302-3/+31
| | | | | | | | | | | | | | | | | | | | class property have the same identifier Since the introduction of class properties in Objective-C it is possible to declare a class and an instance property with the same identifier in an interface/protocol. Right now Clang just generates debug information for whatever property comes first in the source file. The second property is ignored as it's filtered out by the set of already emitted properties (which is just using the identifier of the property to check for equivalence). I don't think generating debug info in this case was never supported as the identifier filter is in place since 7123bca7fb6e1dde51be8329cfb523d2bb9ffadf (which precedes the introduction of class properties). This patch expands the filter to take in account identifier + whether the property is class/instance. This ensures that both properties are emitted in this special situation. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D99512
* [docs] remove references to checking out svn reposNuno Lopes2021-03-301-25/+0
|
* Revert "[X86] Pass to transform tdpbsud&tdpbusd&tdpbuud intrinsics to scalar ↵Bing1 Yu2021-03-302-331/+45
| | | | | | operation" This reverts commit 275df61f043ccf86a9c17957379bff9434da1489.
* [InstructionCost] Don't conflate Invalid costs with Unknown costs.Sander de Smalen2021-03-307-313/+311
| | | | | | | | | | | | | | | | | | | | | | | | We previously made a change to getUserCost to return a Invalid cost when one of the TTI costs returned '-1' (meaning 'unknown' or 'infinitely expensive'). It makes no sense to say that: shufflevector <2 x i8> %x, <2 x i8> %y, <4 x i32> <i32 0, i32 1, i32 2, i32 3> has an invalid cost. Perhaps the cost is not known, but the IR is valid and can be code-generated. Invalid should only be used for IR that cannot possibly be code-generated and where a cost is nonsensical. With more passes now asserting that the cost must be valid, it is possible that those assertions will fail for perfectly valid IR. An incomplete cost-model probably shouldn't be a reason for the compiler to break. It's better to consider these costs as 'very expensive' and ignore them for other reasons. At some point, we should consider replacing -1 with some other mechanism. Reviewed By: paulwalker-arm, dmgreen Differential Revision: https://reviews.llvm.org/D99502
* [X86] Pass to transform tdpbsud&tdpbusd&tdpbuud intrinsics to scalar operationBing1 Yu2021-03-302-45/+331
| | | | | | Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D99244
* Revert "[lldb/DWARF] Simplify DIE extraction code slightly"Pavel Labath2021-03-301-8/+14
| | | | | This reverts commit 1b96e133cf5215cb9ebfe7f14630f479c1611f22 due to failures on windows.
* [AMDGPU] Update AMDGPU PAL usage documentationTim Renouf2021-03-301-118/+362
| | | | Change-Id: I65f3edcfe5063551cad5aab0da1374c3a6ccd3a2
* [lli] Add option -lljit-platform=Inactive to disable platform support explicitlyStefan Gränitz2021-03-307-7/+50
| | | | | | | | | This option tells LLJIT to disable platform support explicitly: JITDylibs aren't scanned for special init/deinit symbols and no runtime API interposes are injected. It's useful in two cases: for platforms that don't have such requirements and platforms for which we have no explicit support yet and that don't work well with the generic IR platform. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D99416
* [NFC][scudo] Produce debug infoVitaly Buka2021-03-302-0/+2
|
* [llvm-profdata] Make sure to consume Error on the error path of ↵Markus Böck2021-03-304-1/+16
| | | | | | | | setIsIRLevelProfile 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
* [lldb] Remove ScriptInterpreterLuaTest.Plugin unittestPavel Labath2021-03-301-6/+0
| | | | | | 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.
* [lldb] Add a dwarf unit test for null unit diesPavel Labath2021-03-302-0/+50
| | | | | This is the test I mentioned in the previous commit (1b96e133), but forgot to add.
* [lldb/DWARF] Simplify DIE extraction code slightlyPavel Labath2021-03-301-14/+8
| | | | | | | | 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.
* [loop-idiom] Hoist loop memcpys to loop preheaderHan Zhu2021-03-294-45/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "[loop-idiom] Hoist loop memcpys to loop preheader"Han Zhu2021-03-294-468/+45
| | | | | | This reverts commit deb5095833a834e0ef5f784138da53e66febff05. Bad commit message.
* [DebugInfo][unittest] Fix heap-use-after-free after D76115Fangrui Song2021-03-291-8/+3
|
* [loop-idiom] Hoist loop memcpys to loop preheaderHan Zhu2021-03-294-45/+468
| | | | | | | | | | | | | | | | | | Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Blame Revision: Differential Revision: https://phabricator.intern.facebook.com/D26380397