- Mar 17, 2020
-
-
Simon Pilgrim authored
ISD::ROTL/ROTR rotation values are guaranteed to act as a modulo amount, so for power-of-2 bitwidths we only need the lowest bits. Differential Revision: https://reviews.llvm.org/D76201
-
Jon Chesterfield authored
Summary: [Clang] Attribute to allow defining undef global variables Initializing global variables is very cheap on hosted implementations. The C semantics of zero initializing globals work very well there. It is not necessarily cheap on freestanding implementations. Where there is no loader available, code must be emitted near the start point to write the appropriate values into memory. At present, external variables can be declared in C++ and definitions provided in assembly (or IR) to achive this effect. This patch provides an attribute in order to remove this reason for writing assembly for performance sensitive freestanding implementations. A close analogue in tree is LDS memory for amdgcn, where the kernel is responsible for initializing the memory after it starts executing on the gpu. Uninitalized variables in LDS are observably cheaper than zero initialized. Patch is loosely based on the cuda __shared__ and opencl __local variable implementation which also produces undef global variables. Reviewers: kcc, rjmccall, rsmith, glider, vitalybuka, pcc, eugenis, vlad.tsyrklevich, jdoerfert, gregrodgers, jfb, aaron.ballman Reviewed By: rjmccall, aaron.ballman Subscribers: Anastasia, aaron.ballman, davidb, Quuxplusone, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74361
-
Louis Dionne authored
-
Aaron Ballman authored
-
Mikhail Dvorskiy authored
It fixes an ambiguity issue in case of a user has a custom policy and calls a version of exclusive_scan with binary operation. Differential Revision: https://reviews.llvm.org/D62719
-
Richard Smith authored
template_id annotation when parsing a type.
-
Florian Hahn authored
Functions include their arguments in the use-list. Changed function values mean that the result of the function changed. We only need to update the call sites with the new function result and do not have to propagate the call arguments. To do so, this patch splits up the visitCallSite into handleCallResult and handleCallArguments and updates markUsersAsChanged to only update call results for functions. Reviewers: efriedma, davide Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D75846
-
Paula Toth authored
Summary: There seems to be a race condition between the pipe closing and the child process death. Likely these two events are not atomic on some versions of linux. With the removal of `WNOHANG` we eliminate the race condition, however if the child closes the pipe intentionally then it could result in the test runner hanging. I find this situation less likely, where as I experience failures locally with this race condition rather consistently. Reviewers: sivachandra, abrachet Reviewed By: sivachandra, abrachet Subscribers: MaskRay, jfb, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D76267
-
Fangrui Song authored
-
Atmn Patel authored
The current implementation of binomial_distribution is not guaranteed to converge for certain extreme configurations of the engine and distribution. This is due to a mistake in the implementation of the algorithm from the given reference paper. The algorithm in the paper is guaranteed to terminate but has redundant statements. The current implementation simplified away the redundancy into a while loop, but it excludes the return condition of the case where a good sample cannot be returned for the particular sample being used from the uniform distribution, which is what causes the infinite loop. This change guarantees termination by recognizing that a good sample cannot be returned and returning 0 after breaking the loop. This is also in contrast to the paper because the return value as specified in the paper violates basic checks in at least a subset of the extreme cases where the current implementation fails to terminate. This default return value of 0 is satisfactory for the extreme case known so far. Since this is only meant to affect extreme cases where the algorithm does not terminate anyways, the behavior is expected to remain exactly the same for all non-extreme cases that have been terminating so far. Fixes https://llvm.org/PR44847 Differential Revision: https://reviews.llvm.org/D74997
-
Vedant Kumar authored
[DwarfDebug] Fix an assertion error when emitting call site info that combines two DW_OP_stack_values When compiling ``` struct S { float w; }; void f(long w, long b); void g(struct S s) { int w = s.w; f(w, w*4); } ``` I get Assertion failed: ((!CombinedExpr || CombinedExpr->isValid()) && "Combined debug expression is invalid"). That's because we combine two epxressions that both end in DW_OP_stack_value: ``` (lldb) p Expr->dump() !DIExpression(DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_LLVM_convert, 64, DW_ATE_signed, DW_OP_stack_value) (lldb) p Param.Expr->dump() !DIExpression(DW_OP_constu, 4, DW_OP_mul, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_LLVM_convert, 64, DW_ATE_signed, DW_OP_stack_value) (lldb) p CombinedExpr->isValid() (bool) $0 = false (lldb) p CombinedExpr->dump() !DIExpression(4097, 32, 5, 4097, 64, 5, 16, 4, 30, 4097, 32, 5, 4097, 64, 5, 159, 159) ``` I believe that in this particular case combining two stack values is safe, but I didn't want to sink the special handling into DIExpression::append() because I do want everyone to think about what they are doing. Patch by Adrian Prantl. Fixes PR45181. rdar://problem/60383095 Differential Revision: https://reviews.llvm.org/D76164
-
LLVM GN Syncbot authored
-
Scott Constable authored
RDF is designed to be target agnostic. Therefore it would be useful to have it available for other targets, such as X86. Based on a previous patch by Krzysztof Parzyszek Differential Revision: https://reviews.llvm.org/D75932
-
Louis Dionne authored
-
Siva Chandra Reddy authored
This rule can help add targets to generate special object files like the crt1.o on linux. Also, it can be used to add specially compiled object stubs which are to be linked into the entrypoint objects. Reviewers: abrachet Differential Revision: https://reviews.llvm.org/D76271
-
Erich Keane authored
Discovered in a downstream, it is often useful to have slightly different semantics for an attribute based on its namespace, however our spelling infrastructure doesn't consider namespace when deciding to elide the enum list. The result is that the solution for a case where an attribute has slightly different semantics based on a namespace requires checking against the integer value, which is fragile. This patch makes us always emit the spelling enum if there is more than 1 and we're generating the header. Differential Revision: https://reviews.llvm.org/D76289
-
Sanjay Patel authored
Follow-on suggested in: D75961
-
Sanjay Patel authored
-
River Riddle authored
Summary: This revision adds a new hook, `notifyMatchFailure`, that allows for notifying the rewriter that a match failure is coming with the provided reason. This hook takes as a parameter a callback that fills a `Diagnostic` instance with the reason why the match failed. This allows for the rewriter to decide how this information can be displayed to the end-user, and may completely ignore it if desired(opt mode). For now, DialectConversion is updated to include this information in the debug output. Differential Revision: https://reviews.llvm.org/D76203
-
Huihui Zhang authored
Summary: DataLayout::getTypeAllocSize() return TypeSize. For cases where the scalable property doesn't matter, we should explicitly call getKnownMinSize() to avoid implicit type conversion to uint64_t, which is not valid for scalable vector type. Reviewers: sdesmalen, efriedma, apazos, reames Reviewed By: efriedma Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76260
-
Alexey Bataev authored
According to the standard, The event-handle will be considered as if it was specified on a firstprivate clause.
-
Craig Topper authored
I believe we were previously calculating a pointer info with the scalar base and an offset of 0. But that's not really where the gather is pointing. The offset is a function of the indices of the GEP we looked through. Also set the size of the MachineMemOperand to UnknownSize Differential Revision: https://reviews.llvm.org/D76157
-
shafik authored
Fix to get the AST we generate for function templates closer to what clang generates and expects. We fix which FuntionDecl we are passing to CreateFunctionTemplateSpecializationInfo and we strip template parameters from the name when creating the FunctionDecl and FunctionTemplateDecl. These two fixes together fix asserts and ambiguous lookup issues for several cases which are added to the already existing small function template test. This fixes issues with overloads, overloads and ADL, variadic function templates and templated operator overloads. Differential Revision: https://reviews.llvm.org/D75761
-
Dimitry Andric authored
Summary: The former are like: libcxx/include/typeinfo:322:11: warning: definition of implicit copy constructor for 'bad_cast' is deprecated because it has a user-declared destructor [-Wdeprecated-copy-dtor] virtual ~bad_cast() _NOEXCEPT; ^ libcxx/include/typeinfo:344:11: note: in implicit copy constructor for 'std::bad_cast' first required here throw bad_cast(); ^ Fix these by adding an explicitly defaulted copy constructor. The latter are like: libcxx/include/codecvt:105:37: warning: dynamic exception specifications are deprecated [-Wdeprecated-dynamic-exception-spec] virtual int do_encoding() const throw(); ^~~~~~~ Fix these by using the _NOEXCEPT macro instead. Reviewers: EricWF, mclow.lists, ldionne, #libc Reviewed By: EricWF, #libc Subscribers: dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D76150
-
Nick Desaulniers authored
Summary: Was accidentally removed by commit af64948e when it overrode TargetInfo::convertConstraint. Fixes: pr/45225 Reviewers: eli.friedman, sdesmalen Reviewed By: sdesmalen Subscribers: echristo, sdesmalen, kristof.beyls, cfe-commits, kmclaughlin, srhines Tags: #clang Differential Revision: https://reviews.llvm.org/D76297
-
Sagar Jain authored
This patch adds llvm.fence. I tried not to change the syntax much. syntax: LLVM IR `fence [syncscope("<target-scope>")] <ordering>` MLIR LLVM Dialect `llvm.fence [syncscope("<target-scope>")] <ordering>` example: LLVM IR: `fence syncscope("agent") seq_cst` MLIR: `llvm.fence syncscope("agent") seq_cst` Differential Revision: https://reviews.llvm.org/D75645
-
Sebastian Neubauer authored
We cannot move wwm over exec copies because the exec register needs an exact exec mask. Differential Revision: https://reviews.llvm.org/D76232
-
Jin Lin authored
Summary: The following change is to allow the machine outlining can be applied for Nth times, where N is specified by the compiler option. By default the value of N is 1. The motivation is that the repeated machine outlining can further reduce code size. Please refer to the presentation "Improving Swift Binary Size via Link Time Optimization" in LLVM Developers' Meeting in 2019. Reviewers: aschwaighofer, tellenbach, paquette Reviewed By: paquette Subscribers: tellenbach, hiraditya, llvm-commits, jinlin Tags: #llvm Differential Revision: https://reviews.llvm.org/D71027
-
Yaxun (Sam) Liu authored
Differential Revision: https://reviews.llvm.org/D76262
-
Sam McCall authored
Summary: Conservatively escaping everything is bad in coc.nvim which shows the markdown to the user, and we have reports of it causing problems for other parsers. Fixes https://github.com/clangd/clangd/issues/301 Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75687
-
Simon Pilgrim authored
Under certain circumstances we'll end up in the position where the negated shift amount will get truncated to the type specified getScalarShiftAmountTy(), so we need to test for a truncated version of the shift amount as well. This allows us to remove half of the remaining patterns tested for by X86ISelLowering's combineOrShiftToFunnelShift.
-
Simon Pilgrim authored
As discussed on PR45118, getInlinedAtScope() shouldn't ever return null. So we can simplify the logic to an assertion and remove all other null tests.
-
Kang Zhang authored
-
Sergej Jaskiewicz authored
Reviewers: probinson, jyknight Reviewed By: probinson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76074
-
Yaxun (Sam) Liu authored
Differential Revision: https://reviews.llvm.org/D76039
-
Matt Arsenault authored
-
Guillaume Chatelet authored
Summary: courbet Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76274
-
Tyker authored
Summary: Prevent InstCombine from removing llvm.assume for which the arguement is true when they have operand bundles with usefull information. Reviewers: jdoerfert, nikic, lebedev.ri Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76147
-
alex-t authored
Summary: This change enable the divergence driven selection for the SEXT DAG opcode. Reviewers: vpykhtin, rampitec Reviewed By: vpykhtin Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Differential Revision: https://reviews.llvm.org/D76230
-