- May 15, 2020
-
-
Eli Friedman authored
This is D77454, except for stores. All the infrastructure work was done for loads, so the remaining changes necessary are relatively small. Differential Revision: https://reviews.llvm.org/D79968
-
Scott Linder authored
This has been duplicated since before 2372a193, but that commit has it appearing twice in the space of 10 lines of the same function body. It could also be hoisted up to the point just after where the last special-case is considered, but I want to keep the intent of the original authors. Committed as obvious without a review.
-
Thomas Lively authored
Summary: This new custom DAG combine fixes a codegen issue with the wasm_simd128.h intrinsics. Clang lowers the return (v128_t)(__f32x4){__a, __a, __a, __a}; body of f32x4_splat to a splat shuffle of a bitcasted vector, as seen in the new simd-shuffle-bitcast.ll test. The bitcast interfered with the target-independent DAG combine that combines splat shuffles into BUILD_VECTOR nodes, so this patch introduces a new custom DAG combine to hoist the bitcast out of the shuffle, allowing the target-independent combine to work as intended. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80021
-
Eli Friedman authored
This unifies SETCC operations along the lines of other operations. Differential Revision: https://reviews.llvm.org/D79975
-
Christopher Tetreault authored
Reviewers: deadalnix, efriedma, rengolin, jyknight, joerg Reviewed By: joerg Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79915
-
Thomas Lively authored
Summary: Move instructions that have recently been implemented in V8 from the `unimplemented-simd128` target feature to the `simd128` target feature. The updated instructions match the update at https://github.com/WebAssembly/simd/pull/223. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D79973
-
Wouter van Oortmerssen authored
BuildMI requires this debug loc to be from the same sub program as the variable metadata passed in. Differential Revision: https://reviews.llvm.org/D80019
-
Nikita Popov authored
The "null-pointer-is-valid" attribute needs to be checked by many pointer-related combines. To make the check more efficient, convert it from a string into an enum attribute. In the future, this attribute may be replaced with data layout properties. Differential Revision: https://reviews.llvm.org/D78862
-
Simon Pilgrim authored
Avoid repeated isa<> and cast<> by just performing a dyn_cast<ConstantSDNode>
-
Jay Foad authored
Remove Use::setPrev. It provided no value because it had the same accessibility as the underlying field Prev, and there was no corresponding setNext anyway. Simplify Use::removeFromList.
-
Craig Topper authored
It makes more sense to turn these into real instructions a little earlier in the pipeline. I've made sure to adjust the memoperand so the spill/reload comments are printed correctly.
-
Alexey Lapshin authored
Summary: Apply clang-format to X86ISelLowering.h Reviewed by: aeubanks Differential Revision: https://reviews.llvm.org/D80005
-
Simon Pilgrim authored
Avoid raw cast<ConstantSDNode> calls.
-
Simon Pilgrim authored
-
Anna Welker authored
Adds support to build pre-incrementing scatters. If the increment (i.e., add instruction) that is merged into the scatter is the loop increment, an incrementing write-back scatter can be built, which then assumes the role of the loop increment. Differential Revision: https://reviews.llvm.org/D79859
-
Anna Thomas authored
Summary: This change exposes the vector name mangling with LLVM ISA (used as part of vector-function-abi-variant) as a utility. This can then be used by front-ends that add this attribute. Note that all parameters passed in to the function will be mangled with the "v" token to identify that they are of of vector type. So, it is the responsibility of the caller to confirm that all parameters in the vectorized variant is of vector type. Added unit test to show vector name mangling. Reviewed-By: fpetrogalli, simoll Differential Revision: https://reviews.llvm.org/D79867
-
Yvan Roux authored
Use smart pointer instead of new/delete.
-
Yonghong Song authored
The builtin function u32 btf_type_id = __builtin_btf_type_id(param, 0) can help preserve type info for the following use case: extern void foo(..., void *data, int size); int test(...) { struct t { int a; int b; int c; } d; d.a = ...; d.b = ...; d.c = ...; foo(..., &d, sizeof(d)); } The function "foo" in the above only see raw data and does not know what type of the data is. In certain cases, e.g., logging, the additional type information will help pretty print. This patch handles the builtin in BPF backend. It includes an IR pass to translate the IR intrinsic to a load of a global variable which carries the metadata, and an MI pass to remove the intermediate load of the global variable. Finally, in AsmPrinter pass, proper instruction are generated. In the above example, the second argument for __builtin_btf_type_id() is 0, which means a relocation for local adjustment, i.e., w.r.t. bpf program BTF change, will be generated. The value 1 for the second argument means a relocation for remote adjustment, e.g., against vmlinux. Differential Revision: https://reviews.llvm.org/D74572
-
Jay Foad authored
This new pass failed an assertion whenever there were s_nops after the end of clause. Differential Revision: https://reviews.llvm.org/D80007
-
Alexandre Ganea authored
Before this patch, S_[L|G][THREAD32|DATA32] records were emitted with a simple name, not the fully qualified name (namespace + class scope). Differential Revision: https://reviews.llvm.org/D79447
-
Dmitry Vyukov authored
Add -tsan-instrument-read-before-write which allows instrumenting reads of reads-before-writes. This is required for KCSAN [1], where under certain configurations plain writes behave differently (e.g. aligned writes up to word size may be treated as atomic). In order to avoid missing potential data races due to plain RMW operations ("x++" etc.), we will require instrumenting reads of reads-before-writes. [1] https://github.com/google/ktsan/wiki/KCSAN Author: melver (Marco Elver) Reviewed-in: https://reviews.llvm.org/D79983
-
David Sherwood authored
For now I have changed FoldConstantVectorArithmetic to return early if we encounter a scalable vector, since the subsequent code assumes you can perform lane-wise constant folds. However, in future work we should be able to extend this to look at splats of a constant value and fold those if possible. I have also added the same code to FoldConstantArithmetic, since that deals with vectors too. The warnings I fixed in this patch were being generated by this existing test: CodeGen/AArch64/sve-int-arith.ll Differential Revision: https://reviews.llvm.org/D79421
-
Ties Stuij authored
Summary: The BFloat IR type is introduced to provide support for, initially, the BFloat16 datatype introduced with the Armv8.6 architecture (optional from Armv8.2 onwards). It has an 8-bit exponent and a 7-bit mantissa and behaves like an IEEE 754 floating point IR type. This is part of a patch series upstreaming Armv8.6 features. Subsequent patches will upstream intrinsics support and C-lang support for BFloat. Reviewers: SjoerdMeijer, rjmccall, rsmith, liutianle, RKSimon, craig.topper, jfb, LukeGeeson, sdesmalen, deadalnix, ctetreau Subscribers: hiraditya, llvm-commits, danielkiss, arphaman, kristof.beyls, dexonsmith Tags: #llvm Differential Revision: https://reviews.llvm.org/D78190
-
Simon Pilgrim authored
Now that D79814 has landed, we can assume that subvector ops use constant, in-range indices.
-
Konstantin Schwarz authored
Summary: D78319 introduced basic support for inline asm input operands in GlobalISel. However, that patch did not handle the case where a memory input operand still needs to be indirectified. Later code asserts that the memory operand is already indirect. This patch adds an early return false to trigger the SelectionDAG fallback for now. Reviewers: arsenm, paquette Reviewed By: arsenm Subscribers: thakis, wdng, rovka, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79955
-
Simon Pilgrim authored
Now that D79814 has landed, we can assume that subvector ops use constant, in-range indices.
-
Georgii Rymar authored
Imagine we have a broken .eh_frame. Below is a possible sample output of llvm-readelf: ``` ... entry 2 { initial_location: 0x10f5 address: 0x2080 } } } .eh_frame section at offset 0x2028 address 0x2028: LLVM ERROR: Parsing entry instructions at 0 failed PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/umb/LLVM/LLVM/llvm-project/build/bin/llvm-readelf -a 1 #0 0x000055f4a2ff5a1a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/umb/LLVM/LLVM/llvm-project/build/bin/llvm-readelf+0x2b9a1a) ... #15 0x00007fdae5dc209b __libc_start_main /build/glibc-B9XfQf/glibc-2.28/csu/../csu/libc-start.c:342:3 #16 0x000055f4a2db746a _start (/home/umb/LLVM/LLVM/llvm-project/build/bin/llvm-readelf+0x7b46a) Aborted ``` I.e. it calls abort(), suggests to submit a bug report and exits with the code 134. This patch changes the logic to propagate errors to callers. This fixes the behavior for llvm-dwarfdump, llvm-readobj and other possible tools. Differential revision: https://reviews.llvm.org/D79165
-
Georgii Rymar authored
Currently there is no good way to set a physical offset for a section: * We have the `ShOffset` that allows to override the `sh_offset`, but it does not affect the real data written. * We can use a `Filler` to create an artificial gap, but it is more like a hack rather than a proper solution for this problem. This patch adds the `Offset` property which allows setting physical offsets for sections. It also generalizes the code, so that we set sh_offset field in one place Differential revision: https://reviews.llvm.org/D78927
-
Djordje Todorovic authored
Debug entry values functionality provides debug information about call sites and function parameters values at the call entry spot. Condition for generating this type of information is compiling with -g option and optimization level higher than zero(-O0). In ISEL phase, while lowering call instructions, collect info about registers that forward arguments into following function frame. We store such info into MachineFunction of the caller function. This is used very late, when dumping DWARF info about call site parameters. The call site info is visible at MIR level, as callSites attribute of MachineFunction. Also, when using unmodified parameter value inside callee it could be described as DW_OP_entry_value expression. To deal with callSites attribute, we should pass -emit-call-site-info option to llc. This patch enables functionality in clang frontend and adds call site info generation support for MIPS targets (mips, mipsel, mips64, mips64el). Patch by Nikola Tesic Differential Revision: https://reviews.llvm.org/D78105
-
David Sherwood authored
I have changed the ScalableVecArgument case in matchIntrinsicType to create a new FixedVectorType. This means that the next case we hit (Vector) will not assert when calling getNumElements(), since we know that it's always a FixedVectorType. This is a temporary measure for now, and it will be fixed properly in another patch that refactors this code. The changes are covered by this existing test: CodeGen/AArch64/sve-intrinsics-fp-converts.ll In addition, I have added a new test to ensure that we correctly reject SVE intrinsics when called with fixed length vector types. Differential Revision: https://reviews.llvm.org/D79416
-
Li Rong Yi authored
Summary: This patch adds the intrinsic llvm.ppc.popcntb for the HW instruction POPCNTB Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D79703
-
Yvan Roux authored
Enables Machine Outlining for ARM and Thumb2 modes. This is the first patch of the series which adds all the basic logic for the support, and only handles tail-calls and thunks. The outliner can be turned on by using clang -moutline option or -mllvm -enable-machine-outliner one (like AArch64). Differential Revision: https://reviews.llvm.org/D76066
-
David Sherwood authored
I've created a new variant of CreateStackTemporary that takes TypeSize and Align arguments, and made the older instances of CreateStackTemporary call this new function. This refactoring is in preparation for more patches in this area related to scalable vectors and improving the alignment calculations. Differential Revision: https://reviews.llvm.org/D79933
-
Alok Kumar Sharma authored
This patch adds support for DWARF attribute DW_AT_data_location. Summary: Dynamic arrays in fortran are described by array descriptor and data allocation address. Former is mapped to DW_AT_location and later is mapped to DW_AT_data_location. Testing: unit test cases added (hand-written) check llvm check debug-info Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D79592
-
Alok Kumar Sharma authored
llvm rejects DWARF operator DW_OP_push_object_address.This DWARF operator is needed for Flang to support allocatable array. Summary: Currently llvm rejects DWARF operator DW_OP_push_object_address. below error is produced when llvm finds this operator. [..] invalid expression !DIExpression(151) warning: ignoring invalid debug info in pushobj.ll [..] There are some parts missing in support of this operator, need to be completed. Testing -added a unit testcase -check-debuginfo -check-llvm Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D79306
-
Mircea Trofin authored
This reverts commit 767db5be.
-
Mircea Trofin authored
Summary: Replacing uses of std::function pointers or refs, or Optional, to function_ref, since the usage pattern allows that. If the function is optional, using a default parameter value (nullptr). This led to a few parameter reshufles, to push all optionals to the end of the parameter list. Reviewers: davidxl, dblaikie Subscribers: arsenm, jvesely, nhaehnle, eraman, hiraditya, haicheng, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79917
-
Kang Zhang authored
Summary: In the patch D78849, it uses llvm::any_of to instead of for loop to simplify the function addRequired(). It's obvious that above code is not a NFC conversion. Because any_of will return if any addRequired(Reg) is true immediately, but we want every element to call addRequired(Reg). This patch uses for_range loop to fix above any_of bug. Reviewed By: MaskRay, nickdesaulniers Differential Revision: https://reviews.llvm.org/D79872
-
Eric Christopher authored
as it's causing asan failures in clangd. Followed up offline with repro instructions. This reverts commit 29560a89.
-