- Mar 31, 2020
-
-
Florian Hahn authored
This is a speculative fix to silence the spurious C4129 warning that some version of MSVC generate for the raw string literals in the changed files. Before disabling the warning (D76428), try a potential fix suggested in the review.
-
Peter Smith authored
The default GNU linker script uses the following idiom for the array sections. I'll use .init_array here, but this also applies to .preinit_array and .fini_array sections. .init_array : { PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(.init_array)) PROVIDE_HIDDEN (__init_array_end = .); } The C-library will take references to the _start and _end symbols to process the array. This will make LLD keep the OutputSection even if there are no .init_array sections. As the current check for RELRO uses the section type for .init_array the above example with no .init_array InputSections fails the checks as there are no .init_array sections to give the OutputSection a type of SHT_INIT_ARRAY. This often leads to a non-contiguous RELRO error message. The simple fix is to a textual section match as well as a section type match. Differential Revision: https://reviews.llvm.org/D76915
-
Florian Hahn authored
This patch updates ValueLattice to distinguish between ranges that are guaranteed to not include undef and ranges that may include undef. A constant range guaranteed to not contain undef can be used to simplify instructions to arbitrary values. A constant range that may contain undef can only be used to simplify to a constant. If the value can be undef, it might take a value outside the range. For example, consider the snipped below define i32 @f(i32 %a, i1 %c) { br i1 %c, label %true, label %false true: %a.255 = and i32 %a, 255 br label %exit false: br label %exit exit: %p = phi i32 [ %a.255, %true ], [ undef, %false ] %f.1 = icmp eq i32 %p, 300 call void @use(i1 %f.1) %res = and i32 %p, 255 ret i32 %res } In the exit block, %p would be a constant range [0, 256) including undef as %p could be undef. We can use the range information to replace %f.1 with false because we remove the compare, effectively forcing the use of the constant to be != 300. We cannot replace %res with %p however, because if %a would be undef %cond may be true but the second use might not be < 256. Currently LazyValueInfo uses the new behavior just when simplifying AND instructions and does not distinguish between constant ranges with and without undef otherwise. I think we should address the remaining issues in LVI incrementally. Reviewers: efriedma, reames, aqjune, jdoerfert, sstefan1 Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D76931
-
James Henderson authored
This test covers the case where --gc-sections is used when there are many sections. In particular, it ensures that there is no adverse interaction with common and absolute symbols. Reviewed by: MaskRay, grimar Differential Revision: https://reviews.llvm.org/D76003
-
James Henderson authored
The test had a few style issues, and I noticed a hole in the coverage (namely that the search order wasn't tested). Adding cases for the hole in turn meant other cases weren't important. The .so test case isn't important, since the code is shared code, so I've removed it. Additionally, I've modified the usage of the "bar" directive to show that an unneeded library must still be present, or the link will fail, even though it isn't linked in. Reviewed by: MaskRay, grimar Differential Revision: https://reviews.llvm.org/D76851
-
James Henderson authored
In particular, these messages should start with a lower-case letter and should have no trailing period at the end of the last sentence. See http://lists.llvm.org/pipermail/llvm-dev/2020-March/140178.html for context. Reviewed by: aaron.ballman, hubert.reinterpretcast, rnk, dblaikie Differential Revision: https://reviews.llvm.org/D76833
-
Denis Antrushin authored
For the PHI node %1 = phi [%A, %entry], [%X, %latch] it is incorrect to use SCEV of backedge val %X as an exit value of PHI unless %X is loop invariant. This is because exit value of %1 is value of %X at one-before-last iteration of the loop. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D73181
-
Guillaume Chatelet authored
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77127
-
Simon Pilgrim authored
combineX86ShufflesRecursively should handle this someday
-
Simon Pilgrim authored
Make sure its defined earlier so more shuffle lowering methods can use it.
-
Daan Sprenkels authored
Canonicalize the case when a scalar extracted from a vector is truncated. Transform such cases to bitcast-then-extractelement. This will enable erasing the truncate operation. This commit fixes PR45314. reviewers: spatel Differential revision: https://reviews.llvm.org/D76983
-
Tom Weaver authored
This patch addresses the issue of the regression suite not running on windows hardware. It changes the following things: * add new dexter regression suite command to lit.cfg.py that makes use of the clang-cl_vs2015 and dbgend builder and debuggers. * sprinkle the new regressionsuite command through the feature and tool tests that require them. * mark certain problem tests on windows * [revert fix] fixed darwin regression test failures by adding unsupported line for system-darwin to command tests. There's a couple of tests that fail (or pass) in unexpected ways on Windows. Problem tests are both the penalty and perfect expect_watch_type.cpp tests. Type information reporting parity is not possible a this time in dexter due to the nature of how different debuggers report type information back to their users. reviewers: Orlando Differential Revision: https://reviews.llvm.org/D76609
-
Shivam Mittal authored
Summary: Resolve the two duplicated pragma marks in lldb/source/Commands/CommandObjectTarget.cpp Reviewers: teemperor Reviewed By: teemperor Subscribers: teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D77096
-
David Green authored
qdadd is defined as sat(Rm + sat(2*Rn)). We had the Rm and Rn switched the wrong way around. Differential Revision: https://reviews.llvm.org/D77049
-
Denis Antrushin authored
Summary: In method SelectionDAGBuilder::LowerStatepoint, array SI.GCTransitionArgs is initialized from wrong part of ImmutableStatepoint class. We copy gc args instead of transitions args. Reviewers: reames, skatkov Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77075
-
Guillaume Chatelet authored
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: arsenm, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, atanasyan, Jim, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77121
-
Sebastian Neubauer authored
Add a new llvm.amdgcn.ballot intrinsic modeled on the ballot function in GLSL and other shader languages. It returns a bitfield containing the result of its boolean argument in all active lanes, and zero in all inactive lanes. This is intended to replace the existing llvm.amdgcn.icmp and llvm.amdgcn.fcmp intrinsics after a suitable transition period. Use the new intrinsic in the atomic optimizer pass. Differential Revision: https://reviews.llvm.org/D65088
-
LLVM GN Syncbot authored
-
Florian Hahn authored
For casts with constant range operands, we can use ConstantRange::castOp. Reviewers: davide, efriedma, mssimpso Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D71938
-
Kai Wang authored
Leverage ARM ELF build attribute section to create ELF attribute section for RISC-V. Extract the common part of parsing logic for this section into ELFAttributeParser.[cpp|h] and ELFAttributes.[cpp|h]. Differential Revision: https://reviews.llvm.org/D74023
-
Shengchen Kan authored
-
Guillaume Chatelet authored
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: arsenm, jvesely, nhaehnle, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77120
-
Marcel Hlopko authored
Summary: This patch removes delayed folding and replaces it with forward peeking. Delayed folding was previously used as a solution to the problem that declaration doesn't have a representation in the AST. For example following code: ``` int a,b; ``` is expressed in the AST as: ``` TranslationUnitDecl |-... |-VarDecl `int a` `-VarDecl `int b` ``` And in the syntax tree we need: ``` *: TranslationUnit `-SimpleDeclaration |-int |-SimpleDeclarator | `-a |-, |-SimpleDeclarator | `-b |-; ``` So in words, we need to create SimpleDeclaration to be a parent of SimpleDeclarator nodes. Previously we used delayed folding to make sure SimpleDeclarations will be eventually created. And in case multiple declarators requested declaration creation, declaration range was extended to cover all declarators. This design started to be hard to reason about, so we decided to replace it with forward peeking. The last declarator node in the chain is responsible for creating SimpleDeclaration for the whole chain. Range of the declaration corresponds to the source range of the declarator node. Declarator decides whether its the last one by peeking to the next AST node (see `isResponsibleForCreatingDeclaration`). This patch does following: * Removed delayed folding logic * Tweaks Token.dumpForTests * Moves getQualifiedNameStart inside BuildTreeVisitor * Extracts BuildTreeVisitor.ProcessDeclaratorAndDeclaration * Renames Builder.getDeclRange to Builder.getDeclarationRange and uses the method in all places. * Adds a bunch of tests Reviewers: gribozavr2 Reviewed By: gribozavr2 Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76922
-
Guillaume Chatelet authored
-
Guillaume Chatelet authored
-
Djordje Todorovic authored
Octeon branches (bbit0/bbit032/bbit1/bbit132) have an immediate operand, so it is legal to have such replacement within MipsBranchExpansion::replaceBranch(). According to the specification, a branch (e.g. bbit0 ) looks like: bbit0 rs p offset // p is an immediate operand if !rs<p> then branch Without this patch, an assertion triggers in the method, and the problem has been found in the real example. Differential Revision: https://reviews.llvm.org/D76842
-
Guillaume Chatelet authored
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: rovka, hiraditya, volkan, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77079
-
Guillaume Chatelet authored
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77078
-
Dylan McKay authored
-
Craig Topper authored
Differential Revision: https://reviews.llvm.org/D77092
-
Dylan McKay authored
In the past, AVR functions were only lowered with interrupt-specific machine code if the function was defined with the "avr-interrupt" or "avr-signal" calling conventions. This patch modifies the backend so that if the function does not have a special calling convention, but does have an "interrupt" attribute, that function is interpreted as a function with interrupts. This also extracts the "is this function an interrupt" logic from several disparate places in the backend into one AVRMachineFunctionInfo attribute. Bug found by Wilhelm Meier.
-
Wei Mi authored
Compbinary format uses MD5 to represent strings in name table. That gives smaller profile without the need of compression/decompression when writing/reading the profile. The patch adds the support in extbinary format. It is off by default but user can choose to enable it. Note the feature of using MD5 in name table can bring very small chance of name conflict leading to profile mismatch. Besides, profile using the feature won't have the profile remapping support. Differential Revision: https://reviews.llvm.org/D76255
-
Julian Lettner authored
The shtest-inject test relied on being executed in "single process" mode and started to fail with a `PicklingError` after it was removed: ``` Can't pickle <class 'lit.TestingConfig.CustomFormat'>: attribute lookup lit.TestingConfig.CustomFormat failed ``` This happened because the test config has to be serialized to the worker process, but apparently the `CustomFormat` class defined inline is not serializable. This change allows passing the tested functionality (preamble_commands) directly to `lit.formats.ShTest` so we can use it directly in the test.
-
Julian Lettner authored
Remove the "serial run" abstraction which bypasses Python's `multiprocessing.Pool` and instead directly runs tests without spawning worker processes. This abstraction has not offered the benefits I hoped it would and therefore does not carry its weight.
-
Julian Lettner authored
In previous commits [1,2] I changed worker.py to only send back the test result from the worker process instead of the whole test object. This was a mistake. lit.Test contains fields (e.g., xfials, requires, unsupported) that are only populated when we actually execute the test, but are queried when we report the results in the parent process. This commit essentially reverts the following changes: [1] a3d2f9b5 [2] 17bb660f
-
Ahmed Taei authored
Summary: Otherwise the added @generic_const_int will fail Reviewers: nicolasvasilache, rriddle, mravishankar Subscribers: mehdi_amini, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77109
-
QingShan Zhang authored
We have this transformation in PowerPC peephole: Replace instruction: renamable $x28 = ADDI8 renamable $x7, -8 renamable $x28 = ADD8 killed renamable $x28, renamable $x0 STFD killed renamable $f0, -8, killed renamable $x28 :: (store 8 into %ir._ind_cast99.epil) with: renamable $x28 = ADDI8 renamable $x7, -16 STFDX killed renamable $f0, $x0, killed $x28 :: (store 8 into %ir._ind_cast99.epil) It is invalid as the '$x0' in STFDX is constant 0, not register r0. Reviewed By: Nemanjai Differential Revision: https://reviews.llvm.org/D77034
-
Nico Weber authored
-
Nico Weber authored
- only complain about duplicate 'sources' lines if they contain more than 1 elements each (before, 0 and 1 element lists were counted too). In practice, this only has an effect for clang/lib/Headers/BUILD.gn - make the '# NOSORT' diag actually work. This too only affects clang/lib/Headers/BUILD.gn. In aggregate, changes to clang/lib/Headers/BUILD.gn still can't be auto-merged, but for a slighly better reason.
-
Nico Weber authored
-