- Aug 24, 2021
-
-
Wang, Pengfei authored
Enable FP16 FMA instructions. Ref.: https://software.intel.com/content/www/us/en/develop/download/intel-avx512-fp16-architecture-specification.html Reviewed By: LuoYuanke Differential Revision: https://reviews.llvm.org/D105268
-
Philip Reames authored
-
Jessica Paquette authored
This is pretty similar to the ST2 selection code in `AArch64InstructionSelector::selectIntrinsicWithSideEffects`. This is a GISel equivalent of the ld2 case in `AArch64DAGToDAGISel::Select`. There's some weirdness there that appears here too (e.g. using ld1 for scalar cases, which are 1-element vectors in SDAG.) It's a little gross that we have to create the copy and then select it right after, but I think we'd need to refactor the existing copy selection code quite a bit to do better. This was falling back while building llvm-project with GISel for AArch64. Differential Revision: https://reviews.llvm.org/D108590
-
Haowei Wu authored
This change adds the option --resultdb-output=path allow llvm-lit generating LuCI ResultDB JSON output for the test results, which can be better integrated with certain CI/CQ framework. Differential Revision: https://reviews.llvm.org/D108238
-
MaheshRavishankar authored
Differential Revision: https://reviews.llvm.org/D108565
-
Reid Kleckner authored
Fixes https://bugs.llvm.org/show_bug.cgi?id=51414. Differential Revision: https://reviews.llvm.org/D108021
-
Greg Clayton authored
DWARFDie::getDeclFile(...) previously only supported getting the DW_AT_decl_file if the DIE itself contained the DW_AT_decl_file attribute, or if the DIE had a DW_AT_abstract_origin that pointed to another DIE that had a DW_AT_decl_file. This patch allows the function to get the right attribute value if there is a DW_AT_specification that points to another DIE. We also test that if a DW_AT_abtract_origin or DW_AT_specification points to a DIE in another CU with a DW_FORM_ref_addr, that the right line table is used to extract the file index. Full tests were added for the following cases: - DIE has a DW_AT_decl_file attribute - DIE has a DW_AT_abtract_origin that points to another die in the same CU - DIE has a DW_AT_abtract_origin that points to another die in another CU - DIE has a DW_AT_specification that points to another die in the same CU - DIE has a DW_AT_specification that points to another die in another CU Differential Revision: https://reviews.llvm.org/D108480
-
Jon Chesterfield authored
Compiled nvptx devicertl as freestanding, breaking the dependency on host glibc and gcc-multilibs. Thus build it by default. Comes at the cost of #defining out printf. Tried mapping it onto __builtin_printf but that gets transformed back to printf instead of hitting the cuda/openmp lowering transform. Printf could be preserved by one of: - dropping all the standard headers and ffreestanding - providing a header only printf implementation - changing the compiler handling of printf Reviewed By: grokos Differential Revision: https://reviews.llvm.org/D108349
-
Mircea Trofin authored
When using final reward (which is now the default), we were skipping logging decisions that were leading to callee deletion. This fixes that. Differential Revision: https://reviews.llvm.org/D108587
-
Azharuddin Mohammed authored
This was already the case, but the recent change (95733438) altered the behavior on some of our bots where __unw_add_dynamic_fde is not found. This restores the prior behavior on Darwin while also retaining the new behavior from that change.
-
Aart Bik authored
Rationale: Passing in a pointer to the memref data in order to implement the dense to sparse conversion was a bit too low-level. This revision improves upon that approach with a cleaner solution of generating a loop nest in MLIR code itself that prepares the COO object before passing it to our "swiss army knife" setup. This is much more intuitive *and* now also allows for dynamic shapes. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D108491
-
Michael Jones authored
Adds atoi, atol, atoll, strtol, strtoll, strtoul, and strtoull to the list of entrypoints for Windows and aarch64 linux, as well as moving them out of the LLVM_LIBC_FULL_BUILD condition for x86_64 linux. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D108477
-
Sanjay Patel authored
This is a re-try of 3aa009cc which was reverted at 9577fac0 because it caused an infinite loop. For the extra test case, either re-ordering the transforms or adding the extra clause to avoid sub-of-sub is enough to prevent the infinite compile, but I'm doing both to be safer. Original commit message: The motivation was to get min/max intrinsics to parity with cmp+select idioms, but this unlocks a few more folds because isFreeToInvert recognizes add/sub with constants too. In the min/max example, we have too many extra uses for smaller folds to improve things, but this fold is able to eliminate uses even though we can't reduce the number of instructions.
-
Fangrui Song authored
[TargetMachine] Move COFF special case for ExternalSymbolSDNode from shouldAssumeDSOLocal to X86Subtarget Intended to be NFC. ARM/AArch64 don't appear to need adjustment. TargetMachine::shouldAssumeDSOLocal is expected to be very simple, ideally matching isDSOLocal(). The IR producers are expected to set dso_local correctly. (While some may think this function can make producers' work easier, the function is really not in a good position to set dso_local. See the various special cases we duplicate from clang CodeGenModule.cpp.) Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D108514
-
Artem Belevich authored
-
River Riddle authored
This revision adds native ODS support for VariadicOfVariadic operand groups. An example of this is the SwitchOp, which has a variadic number of nested operand ranges for each of the case statements, where the number of case statements is variadic. Builtin ODS support allows for generating proper accessors for the nested operand ranges, builder support, and declarative format support. VariadicOfVariadic operands are supported by providing a segment attribute to use to store the operand groups, mapping similarly to the AttrSizedOperand trait (but with a user defined attribute name). `build` methods for VariadicOfVariadic operand expect inputs of the form `ArrayRef<ValueRange>`. Accessors for the variadic ranges return a new `OperandRangeRange` type, which represents a contiguous range of `OperandRange`. In the declarative assembly format, VariadicOfVariadic operands and types are by default formatted as a comma delimited list of value lists: `(<value>, <value>), (), (<value>)`. Differential Revision: https://reviews.llvm.org/D107774
-
Artem Belevich authored
This should reduce the amount of noise issued by clang for the recent-ish CUDA versions. Clang still does not support all the features offered by NVCC, but is expected to handle CUDA headers and produce binaries for all GPUs supported by NVCC. Differential Revision: https://reviews.llvm.org/D108248
-
Artem Belevich authored
Always use cuda.h to detect CUDA version. It's a more universal approach compared to version.txt which is no longer present in recent CUDA versions. Split the 'unknown CUDA version' warning in two: * when detected CUDA version is partially supported by clang. It's expected to work in general, at the feature parity with the latest supported CUDA version. and may be missing support for the new features/instructions/GPU variants. Clang will issue a warning. * when detected version is new. Recent CUDA versions have been working with clang reasonably well, and will likely to work similarly to the partially supported ones above. Or it may not work at all. Clang will issue a warning and proceed as if the latest known CUDA version was detected. Differential Revision: https://reviews.llvm.org/D108247
-
Artem Belevich authored
Differential Revision: https://reviews.llvm.org/D108239
-
Artem Belevich authored
It's the oldest GPU architecture currently supported by all CUDA versions clang can use. Differential Revision: https://reviews.llvm.org/D108235
-
Simon Pilgrim authored
Revert rG1c9bec72 : [InstCombine] Fold (gep (oneuse(gep Ptr, Idx0)), Idx1) -> (gep Ptr, (add Idx0, Idx1)) (PR51069) Reverted (manually due to merge conflicts) while regressions reported on PR51540 are investigated As noticed on D106352, after we've folded "(select C, (gep Ptr, Idx), Ptr) -> (gep Ptr, (select C, Idx, 0))" if the inner Ptr was also a (now one use) gep we could then merge the geps, using the sum of the indices instead. I've limited this to basic 2-op geps - a more general case further down InstCombinerImpl.visitGetElementPtrInst doesn't have the one-use limitation but only creates the add if it can be created via SimplifyAddInst. https://alive2.llvm.org/ce/z/f8pLfD (Thanks Roman!) Differential Revision: https://reviews.llvm.org/D106450
-
David Green authored
It appears that the Read operand for stores was being placed on the first operand (the stored value) not the address base. This adds a ReadST for the stored value operand, allowing the ReadAdrBase to correctly act upon the address. Differential Revision: https://reviews.llvm.org/D108287
-
David Green authored
-
MaheshRavishankar authored
Differential Revision: https://reviews.llvm.org/D108338
-
Nikita Popov authored
This is a followup to D106591. MergeICmps currently only allows sinking the loads past either instructions that don't write to memory at all, or simple loads/stores that don't modify the memory the loads access. The "simple loads/stores" part of this check doesn't seem necessary to me -- AA isModRef() already accurately models any operation that may clobber the memory. For example, in the adjusted test case the transform is still fine if the call to @foo() isn't readonly, but inaccessiblememonly -- in both cases, the call cannot modify the loaded memory. Differential Revision: https://reviews.llvm.org/D108517
-
River Riddle authored
This allows for inlining into an empty block or to the beginning of a block. NFC as the existing implementations now foward to this overload. Differential Revision: https://reviews.llvm.org/D108572
-
Alina Sbirlea authored
Aiming to address the regression discussed in https://reviews.llvm.org/D103009. Differential Revision: https://reviews.llvm.org/D108485
-
Louis Dionne authored
-
Andrei Elovikov authored
...instead of redeclaring them in clang's own X86Target.def. They were already required to be in sync (IIUC), so no reason to maintain two identical lists. Reviewed By: erichkeane, craig.topper Differential Revision: https://reviews.llvm.org/D108151
-
Jon Chesterfield authored
Add include path to the cmakefiles and set the target_impl enums from the llvm constants instead of copying the values. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D108391
-
Stanislav Mekhanoshin authored
D106408 enables rematerialization of instructions with virtual register uses. That has uncovered the bug in the allUsesAvailableAt implementation: https://bugs.llvm.org/show_bug.cgi?id=51516. In the majority of cases canRematerializeAt() called to check if an instruction can be rematerialized before the given UseIdx. However, SplitEditor::enterIntvAtEnd() calls it to rematerialize an instruction at the end of a block passing LIS.getMBBEndIdx() into the check. In the testcase from the bug it has attempted to rematerialize ADDXri after STRXui in bb.17. The use operand %55 of the ADD is killed by the STRX but that is undetected by the check because it adjusts passed UseIdx to the reg slot, before the kill. The value is dead at the index passed to the check however. This change uses a later of passed UseIdx and its reg slot. This shall be correct because if are checking an availability of operands before an instruction that instruction cannot be the one defining these operands. If we are checking for late rematerialization we are really interested if operands live past the instruction. The bug is not exploitable without D106408 but needed to reland reverted D106408. Differential Revision: https://reviews.llvm.org/D108475
-
Zarko Todorovski authored
[PowerPC][AIX] Set the HasAlloca flag in the AIX Traceback Table only if R31 is used as a frame pointer After c0639464 usage of R31 doesn't necessarily mean that alloca is used. The `TracebackTable::IsAllocaUsedMask` flag should be set only when R31 is used as a frame pointer. On AIX the `function calls alloca' bit seems to be set whenever R31 is set up as a frame pointer, even when there is no alloca call. Reviewed By: lkail Differential Revision: https://reviews.llvm.org/D108141
-
Sanjay Patel authored
This is NFC-intended when viewed from outside the pass. I was trying to make sure that we don't infinite loop in subtract combines and noticed that we handle the non-canonical forms of add/sub here, but it should not be necessary. Coding it this way seems slightly clearer than mixing all 4 patterns as before.
-
River Riddle authored
This revision fixes a bug where an operation would get replaced with a pre-existing constant that didn't dominate it. This can occur when a pattern inserts operations to be folded at the beginning of the constants insertion block. This revision fixes the bug by moving the existing constant before the replaced operation in such cases. This is fine because if a constant didn't already exist, a new one would have been inserted before this operation anyways. Differential Revision: https://reviews.llvm.org/D108498
-
Alex Langford authored
-
Krzysztof Drewniak authored
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D108135
-
Alfonso Gregory authored
Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106902
-
Greg Clayton authored
When a function has no line table, but does have debug info (DW_TAG_subprogram), we fall back to creating a line table with a single line entry that has the start address of the function and the source file and line of the function declaration. The bug in this code was that we might have a DW_TAG_subprogram that uses a DW_AT_specification or DW_AT_abstract_origin that points to another DIE, and that DIE might be in another compile unit. The bug was we were grabbing the file index value from the DIE, and that index could be from the other DIE in another compile unit that has its own and compleltely different file table, so we might be using a file index from one compile unit with the file table from another. This was causing a crash in llvm-gsymuil when run against dSYM files. dsymutil, the Apple DWARF linker, will often unique types and can end up with more absolute references across different compile units. The fix is to use the DWARFDie::getDeclFile(...) accessor as it does fetch this information correctly. Differential Revision: https://reviews.llvm.org/D108497
-
Jessica Paquette authored
Same as G_LROUND: destination should always be a GPR, source should always be a FPR. Differential Revision: https://reviews.llvm.org/D108566
-
Chris Bieneman authored
This patch adds `#pragma clang restrict_expansion ` to enable flagging macros as unsafe for header use. This is to allow macros that may have ABI implications to be avoided in headers that have ABI stability promises. Using macros in headers (particularly public headers) can cause a variety of issues relating to ABI and modules. This new pragma logs warnings when using annotated macros outside the main source file. This warning is added under a new diagnostics group -Wpedantic-macros Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D107095
-