- Jan 07, 2022
-
-
Craig Topper authored
The 0 immediate can't be selected to vmsgtu.vi/vmsleu.vi by decrementing the immediate. To prevent his we had special patterns that provided alternate lowering for the 0 cases. This relied on tablegen prioritizing the 0 pattern over the sim5_plus1 range. This patch introduces simm5_plus1_nonzero that excludes 0. It also excludes the special case for vmsltu.vi since we can just use vmsltu.vx and let the 0 be selected to X0. This is an alternative to some of the changes in D116584. Reviewed By: Chenbing.Zheng, asb Differential Revision: https://reviews.llvm.org/D116723
-
Jake Egan authored
Include the value of `ZLIB_ROOT` in `LLVMConfig.cmake` so `FindZLIB` can pick it up. This fixes an issue where ZLIB is not found on AIX runtimes despite specifying `-DZLIB_ROOT`. Reviewed By: daltenty Differential Revision: https://reviews.llvm.org/D116235
-
Craig Topper authored
Function calls and compare instructions tend to cause sext.w instructions to be inserted. If we make good use of W instructions, these operations can often end up being redundant. We don't always detect these during SelectionDAG due to things like phis. There also some cases caused by failure to turn extload into sextload in SelectionDAG. extload selects to LW allowing later sext.ws to become redundant. This patch adds a pass that examines the input of sext.w instructions trying to determine if it is already sign extended. Either by finding a W instruction, other instructions that produce a sign extended result, or looking through instructions that propagate sign bits. It uses a worklist and visited set to search as far back as necessary. Reviewed By: asb, kito-cheng Differential Revision: https://reviews.llvm.org/D116397
-
Evgeny Mandrikov authored
See https://wg21.link/cwg2237 Reviewed By: shafik, dexonsmith Differential Revision: https://reviews.llvm.org/D115355
-
Craig Topper authored
The zextload hook is only used to determine whether to insert a zero_extend or any_extend for narrow types leaving a basic block. Returning true from this hook tends to cause any load whose output leaves the basic block to become an LWU instead of an LW. Since we tend to prefer sexts for i32 compares on RV64, this can cause extra sext.w instructions to be created in other basic blocks. If we use LW instead of LWU this gives the MIR pass from D116397 a better chance of removing them. Another option might be to teach getPreferredExtendForValue in FunctionLoweringInfo.cpp about our preference for sign_extend of i32 compares. That would cause SIGN_EXTEND to be chosen for any value used by a compare instead of using the isZExtFree heuristic. That will require code to convert from the llvm::Type* to EVT/MVT as well as querying the type legalization actions to get the promoted type in order to call TargetLowering::isSExtCheaperThanZExt. That seemed like many extra steps when no other target wants it. Though it would avoid us needing to lean on the MIR pass in some cases. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D116567
-
Craig Topper authored
Pre-work for a future change that will use these opcodes with other rounding modes. Differential Revision: https://reviews.llvm.org/D116724
-
Nikita Popov authored
Explicitly check the load/store value type, because this is no longer implicitly checked through the pointer type.
-
Simon Pilgrim authored
Avoids static-analyzer null dereference warnings.
-
Matt Arsenault authored
Fixes verifier error when writing MIR tests that didn't have phis to begin with.
-
- Jan 06, 2022
-
-
Matthias Springer authored
This change simplifies BufferizableOpInterface and other functions. Overall, the API will get smaller: Functions related to custom IR traversal are deleted entirely. This will makes it easier to write BufferizableOpInterface implementations. This is also in preparation of unifying Comprehensive Bufferize and core bufferization. While Comprehensive Bufferize could theoretically maintain its own IR traversal, there is no reason to do so, because all bufferize implementations in BufferizableOpInterface have to support partial bufferization anyway. And we can share a larger part of the code base between the two bufferizations. Differential Revision: https://reviews.llvm.org/D116448
-
David Goldman authored
This reverts commit 37be7488/ relands https://reviews.llvm.org/D116417 now that the internal issue has been fixed.
-
Jan Svoboda authored
-
Matthias Springer authored
This is mostly for documentation purposes: Passing the object as a const reference signifies that analysis decisions cannot be changed after the analysis. Differential Revision: https://reviews.llvm.org/D116742
-
Nikolas Klauser authored
Reformat `<__filesystem/operations.h>` Reviewed By: Quuxplusone, #libc, ldionne Spies: ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D116234
-
Simon Pilgrim authored
Provides an early-out if we fail to find an AllocaInst, and avoids a static analyzer warning about null dereferencing.
-
Simon Pilgrim authored
-
Matthias Springer authored
This does not work if BufferizationState is passed around as a const reference in most places. Differential Revision: https://reviews.llvm.org/D116741
-
Vy Nguyen authored
(parial)fixes PR/53026 Differential Revision: https://reviews.llvm.org/D116718
-
Alexey Bataev authored
-
Alexey Bataev authored
-
Nikita Popov authored
This enforces the LangRef change from D116531 in the Verifier, now that clang and tests have been updated.
-
Simon Pilgrim authored
Fix static analysis warning by using cast<> instead of dyn_cast<> as both isa<> and isGuaranteedToExecuteForEveryIteration expect a non-null Instruction pointer.
-
Nikita Popov authored
This is the autoupgrade part of D116531. If old bitcode is missing the elementtype attribute for indirect inline asm constraints, automatically add it. As usual, this only works when upgrading in typed mode, we haven't figured out upgrade in opaque mode yet.
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D116739
-
Fanbo Meng authored
z/OS doesn't support fopen64() functions. Modify the preprocessor directive for z/OS to use fopen() instead. Reviewed By: #libc, abhina.sreeskantharajan, muiez, ldionne Differential Revision: https://reviews.llvm.org/D111226
-
Arjun P authored
Initialize some variables to zero to avoid a warning about them possibly being used uninitialized. In actuality, they will never be used before initialization.
-
Nikita Popov authored
The comments here were outdated and a bit confusing without the knowledge that we're only guarding against reads on unwind.
-
Arjun P authored
-
Nikita Popov authored
When determining whether the memory is local to the function (and we can thus introduce spurious writes without thread-safety issues), check for a noalias call rather than the hardcoded list of memory allocation functions. Noalias calls are the more general way to determine allocation functions, as long as we're only interested in the property that the returned value is distinct from any other accessible memory. Differential Revision: https://reviews.llvm.org/D116728
-
Nikita Popov authored
This updates LLVM tests for D116531 by adding elementtype attributes to operands that correspond to indirect asm constraints.
-
Sander de Smalen authored
This addresses a suggestion by @nikic on D115356.
-
Peixin-Qiao authored
This supports the following checks for THREADPRIVATE Directive: ``` [5.1] 2.21.2 THREADPRIVATE Directive A threadprivate variable must not appear in any clause except the copyin, copyprivate, schedule, num_threads, thread_limit, and if clauses. ``` This supports the following checks for DECLARE TARGET Directive: ``` [5.1] 2.14.7 Declare Target Directive A threadprivate variable cannot appear in the directive. ``` Besides, procedure name and the entity with PARAMETER attribute cannot be in the threadprivate directive. The main program name and module name cannot be in the threadprivate directive and declare target directive. There is no clear description or restriction about the entity with PARAMETER attribute in OpenMP 5.1 Specification, and a warning is given. Reviewed By: kiranchandramohan, shraiysh, NimishMishra Differential Revision: https://reviews.llvm.org/D114941
-
Florian Hahn authored
This patch updates SCEVExpander::expandUnionPredicate to not create redundant 'or false, x' instructions. While those are trivially foldable, they can be easily avoided and hinder code that checks the size/cost of the generated checks before further folds. I am planning on look into a few other similar improvements to code generated by SCEVExpander. I remember a while ago @lebedev.ri working on doing some trivial folds like that in IRBuilder itself, but there where concerns that such changes may subtly break existing code. Reviewed By: reames, lebedev.ri Differential Revision: https://reviews.llvm.org/D116696
-
Andrew Ng authored
Add CMake variable LLVM_EXTERNAL_PROJECT_BUILD_TOOL_ARGS to allow arguments to be passed to the native tool used in CMake --build invocations for external projects. Can be used to pass extra arguments for enhanced versions of build tools, e.g. distributed build options. Differential Revision: https://reviews.llvm.org/D115815
-
David Green authored
-
Prashant Kumar authored
This commits adds division normalization in the `getDivRepr` function which extracts the gcd from the dividend and divisor and normalizes them. Signed-off-by:
Prashant Kumar <pk5561@gmail.com> Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D115595
-
Nikita Popov authored
Add a test with a noalias call that is not a known allocation function.
-
Markus Böck authored
This patch allows the usage of the normalDestOperands and unwindDestOperands operands of llvm.invoke and have them be correctly mapped to phis in the successor when exported to LLVM IR. Differential Revision: https://reviews.llvm.org/D116706
-
Chuanqi Xu authored
Although we moved to Github Issues. The bug report message refers to Bugzilla still. This patch tries to update these URLs. Reviewed By: MaskRay, Quuxplusone, jhenderson, libunwind, libc++ Differential Revision: https://reviews.llvm.org/D116351
-
Alex Zinenko authored
Historically, the bindings for the Linalg dialect were included into the "core" bindings library because they depended on the C++ implementation of the "core" bindings. The other dialects followed the pattern. Now that this dependency is gone, split out each dialect into a separate Python extension library. Depends On D116649, D116605 Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D116662
-