- Jan 11, 2021
-
-
Chris Lattner authored
llvm::APInt cannot hold zero bit values, therefore we shouldn't try to form them. Differential Revision: https://reviews.llvm.org/D94384
-
Esme-Yi authored
Summary: This patch added variants of vec_sel and fixed bugzilla 46770. Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D94162
-
Serguei Katkov authored
Loop peeling as a last step triggers loop simplification and this can change the loop structure. As a result all cashed values like latch branch becomes invalid. Patch re-structure the code to take into account the possible changes caused by peeling. Reviewers: dmgreen, Meinersbur, etiotto, fhahn, efriedma, bmahjour Reviewed By: Meinersbur, fhahn Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D93686
-
Craig Topper authored
This patch moves all but the BaseInstr to bits in TSFlags. For the index fields, we can just use a bit to indicate their presence. The locations of the operands are well defined. This reduces the llc binary by about 32K on my build. It also removes the binary search of the table from the custom inserter. Instead we just check that the SEW op is present. Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D94375
-
QingShan Zhang authored
We are checking the unsafe-fp-math for sqrt but not for fpow, which behaves inconsistent. As the direction is to remove this global option, we need to remove the unsafe-fp-math check for sqrt and update the test with afn fast-math flags. Reviewed By: Spatel Differential Revision: https://reviews.llvm.org/D93891
-
Nico Weber authored
This reverts commit 80dee796. Makes clang sometimes hang forever. See https://bugs.chromium.org/p/chromium/issues/detail?id=1164786#c6 for a stand-alone repro.
-
Philip Reames authored
This is a resubmit of dd6bb367 (which was reverted due to stage2 build failures in 7c63aac7), with the additional restriction added to the transform to only consider outer most loops. As shown in the added test case, ensuring LCSSA is up to date when deleting an inner loop is tricky as we may actually need to remove blocks from any outer loops, thus changing the exit block set. For the moment, just avoid transforming this case. I plan to return to this case in a follow up patch and see if we can do better. Original commit message follows... The basic idea is that if SCEV can prove the backedge isn't taken, we can go ahead and get rid of the backedge (and thus the loop) while leaving the rest of the control in place. This nicely handles cases with dispatch between multiple exits and internal side effects. Differential Revision: https://reviews.llvm.org/D93906
-
Fangrui Song authored
-
Kazu Hirata authored
This patch introduces a helper class SubsequentDelim to simplify loops that generate a comma-separated lists. For example, consider the following loop, taken from llvm/lib/CodeGen/MachineBasicBlock.cpp: for (auto I = pred_begin(), E = pred_end(); I != E; ++I) { if (I != pred_begin()) OS << ", "; OS << printMBBReference(**I); } The new class allows us to rewrite the loop as: SubsequentDelim SD; for (auto I = pred_begin(), E = pred_end(); I != E; ++I) OS << SD << printMBBReference(**I); where SD evaluates to the empty string for the first time and ", " for subsequent iterations. Unlike interleaveComma, defined in llvm/include/llvm/ADT/STLExtras.h, SubsequentDelim can accommodate a wider variety of loops, including: - those that conditionally skip certain items, - those that need iterators to call getSuccProbability(I), and - those that iterate over integer ranges. As an example, this patch cleans up MachineBasicBlock::print. Differential Revision: https://reviews.llvm.org/D94377 -
Shilei Tian authored
For now, `*_STANDALONE_BUILD` is set to ON even if they're built along with LLVM because of issues mentioned in the comments. This can cause some issues. For example, if we build OpenMP along with LLVM, we'd like to copy those OpenMP headers to `<prefix>/lib/clang/<version>/include` such that `clang` can find those headers without using `-I <prefix>/include` because those headers will be copied to `<prefix>/include` if it is built standalone. In this patch, we fixed the dependence issue in OpenMP such that it can be built correctly even with `OPENMP_STANDALONE_BUILD=OFF`. The issue is in the call to `add_lit_testsuite`, where `clang` and `clang-resource-headers` are passed as `DEPENDS`. Since we're building OpenMP along with LLVM, `clang` is set by CMake to be the C/C++ compiler, therefore these two dependences are no longer needed, where caused the dependence issue. Reviewed By: jdoerfert Differential Revision: https://re...
-
Shilei Tian authored
This patch added `openmp` to `LLVM_ALL_RUNTIMES` so that when the CMake argument `LLVM_ENABLE_RUNTIMES=all`, OpenMP can also be built. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D94369
-
Roman Lebedev authored
[NFCI][SimplifyCFG] Prefer to add Insert edges before Delete edges into DomTreeUpdater, if reasonable This has a measurable impact on the number of DomTree recalculations. While this doesn't handle all the cases, it deals with the most obvious ones.
-
Pavel Labath authored
- s/createUniqueFile/createUniquePath -- we don't want to create the file, just the file name - s/data()/str().c_str()/ -- paths given to system apis must be null-terminated
-
Philip Reames authored
-
Philip Reames authored
-
Fangrui Song authored
The test added in D87147 did not actually test PR47391. Use an absolute path to test the canonicalization.
-
Philip Reames authored
-
Sanjay Patel authored
This snuck into 0aa75fb1 , but I didn't catch it locally.
-
Sanjay Patel authored
A severe compile-time slowdown from this call is noted in: https://llvm.org/PR48689 My naive fix was to put it under LLVM_DEBUG ( 267ff790 ), but that's not limiting in the way we want. This is a quick fix (or we could just remove the call completely and rely on some later pass to discover potentially wrong IR?). A bigger/better fix would be to improve/limit verifyFunction() as noted in: https://llvm.org/PR47712 Differential Revision: https://reviews.llvm.org/D94328
-
Kazu Hirata authored
This patch eliminates pesky "No newline at end of file" messages from git diff.
-
Kazu Hirata authored
The function was introduced without a use on Feb 2, 2016 in commit e1100f53.
-
Kazu Hirata authored
-
Nikita Popov authored
The APFloat::convertToInteger() API already implements the desired saturation semantics.
-
Nikita Popov authored
-
- Jan 10, 2021
-
-
Florian Hahn authored
Currently make_early_inc_range cannot be used with iterators with operator* implementations that do not return a reference. Most notably in the LLVM codebase, this means the User iterator ranges cannot be used with make_early_inc_range, which slightly simplifies iterating over ranges while elements are removed. Instead of directly using BaseT::reference as return type of operator*, this patch uses decltype to get the actual return type of the operator* implementation in WrappedIteratorT. This patch also updates a few places to use make use of make_early_inc_range. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D93992
-
Nico Weber authored
-
Nicolas Vasilache authored
This assertion is an old remnant from earlier days when only affine functions existed. It is not the place of affine map composition to check whether orthogonal considerations on what is allowed to be a symbol under the AffineScope trait.
-
Juneyoung Lee authored
This patch is a part of D93817 and makes transformations in CodeGen use poison for shufflevector/insertelem's initial vector element. The change in CodeGenPrepare.cpp is fine because the mask of shufflevector should be always zero. It doesn't touch the second element (which is poison). The change in InterleavedAccessPass.cpp is also fine becauses the mask is of the form <a, a+m, a+2m, .., a+km> where a+km is smaller than the size of the first vector operand. This is guaranteed by the caller of replaceBinOpShuffles, which is lowerInterleavedLoad. It calls isDeInterleaveMask and isDeInterleaveMaskOfFactor to check the mask is the desirable form. isDeInterleaveMask has the check that a+km is smaller than the vector size. To check my understanding, I added an assertion & added a test to show that this optimization doesn't fire in such case. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D94056
-
Fangrui Song authored
-
Craig Topper authored
This makes the mask align with the position of the bits in TSFlags which is a little more logical. I might be adding more fields to TSFlags and some might be single bits where just ANDing with mask to test the bit would make sense. While there rename TargetFlags in validateInstruction to reflect that it's just the constraint bits.
-
Craig Topper authored
We currently have about 7000 opcodes in the RISCVGenInstrInfo.inc enum. We can use uint16_t to store these values. We would need to grow by nearly 9x before we run out of space so this should last for a little while. This reduces the llc binary by 32K.
-
Nico Weber authored
This is already checked two lines up. No behavior change.
-
Sriraman Tallam authored
This adds a new test checking llvm-symbolizer with an object built with basic block sections. Build a object with -fbasic-block-sections and reorder the basic blocks to be non-contiguous. Then check if llvm-symbolizer correctly reports the symbolized addresses. Included the source to build the object with command lines. Differential Revision: https://reviews.llvm.org/D91678
-
Fangrui Song authored
[CodeGenModule] Drop dso_local on function declarations for ELF -fno-pic -fno-direct-access-external-data ELF -fno-pic sets dso_local on a function declaration to allow direct accesses when taking its address (similar to a data symbol). The emitted code follows the traditional GCC/Clang -fno-pic behavior: an absolute relocation is produced. If the function is not defined in the executable, a canonical PLT entry will be needed at link time. This is similar to a copy relocation and is incompatible with (-Bsymbolic or --dynamic-list linked shared objects / protected symbols in a shared object). This patch gives -fno-pic code a way to avoid such a canonical PLT entry. The FIXME was about a generalization for -fpie -mpie-copy-relocations (now -fpie -fdirect-access-external-data). While we could set dso_local to avoid GOT when taking the address of a function declaration (there is an ignorable difference about R_386_PC32 vs R_386_PLT32 on i386), it likely does not provide any benefit and can just cause trouble, so we don't make the generalization.
-
Fraser Cormack authored
Original patch by @rogfer01. The RVV integer comparison instructions are defined in such a way that many LLVM operations are defined by using the "opposite" comparison instruction and swapping the operands. This is done in this patch in most cases, except for the mappings where the immediate range must be adjusted to accomodate: va < i --> vmsle{u}.vi vd, va, i-1, vm va >= i --> vmsgt{u}.vi vd, va, i-1, vm That is left for future optimization; this patch supports all operations but in the case of the missing mappings the immediate will be moved to a scalar register first. Since there are so many condition codes and operand cases to check, it was decided to reduce the test burden by only testing the "vscale x 8" vector types. Authored-by:Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Fraser Cormack <fraser@codeplay.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94168
-
Fraser Cormack authored
This improves llvm::isConstOrConstSplat by allowing it to analyze ISD::SPLAT_VECTOR nodes, in order to allow more constant-folding of operations using scalable vector types. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94168
-
Lewuathe authored
mlir-opt supports many more test cases. All available dialects supported by latest mlir-opt should be coverted in the test case. Reviewed By: aartbik, stephenneuendorffer, mehdi_amini Differential Revision: https://reviews.llvm.org/D93821
-
Shoaib Meenai authored
CodeGen/thinlto_embed_bitcode.ll relies on it.
-
Mircea Trofin authored
Also fixed remaining tests that featured unused prefixes. Differential Revision: https://reviews.llvm.org/D94330
-
Aart Bik authored
This change makes the scatter/gather syntax more consistent with the syntax of all the other memory operations in the Vector dialect (order of types, use of [] for index, etc.). This will make the MLIR code easier to read. In addition, the pass_thru parameter of the gather has been made mandatory (there is very little benefit in using the implicit "undefined" values). Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D94352
-