- Jul 24, 2020
-
-
Fangrui Song authored
See https://lists.llvm.org/pipermail/llvm-dev/2020-July/143373.html "[llvm-dev] Multiple documents in one test file" for some discussions. `extract part filename` splits the input file into multiple parts separated by regex `^(.|//)--- ` and extract the specified part to stdout or the output file (if specified). Use case A (organizing input of different formats (e.g. linker script+assembly) in one file). ``` // RUN: extract lds %s -o %t.lds // RUN: extract asm %s -o %t.s // RUN: llvm-mc %t.s -o %t.o // RUN: ld.lld -T %t.lds %t.o -o %t This is sometimes better than the %S/Inputs/ approach because the user can see the auxiliary files immediately and don't have to open another file. ``` Use case B (for utilities which don't have built-in input splitting feature): ``` // RUN: extract case1 %s | llc | FileCheck %s --check-prefix=CASE1 // RUN: extract case2 %s | llc | FileCheck %s --check-prefix=CASE2 Combing tests prudently can improve readability. This is sometimes better than having multiple test files. ``` Since this is a new utility, there is no git history concerns for UpperCase variable names. I use lowerCase variable names like mlir/lld. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D83834
-
Craig Topper authored
[LegalizeTypes] Teach DAGTypeLegalizer::GenWidenVectorLoads to pad with undef if needed when concatenating small or loads to match a larger load In the included test case the align 16 allowed the v23f32 load to handled as load v16f32, load v4f32, and load v4f32(one element not used). These loads all need to be concatenated together into a final vector. In this case we tried to concatenate the two v4f32 loads to match the type of the v16f32 load so we could do a second concat_vectors, but those loads alone only add up to v8f32. So we need to two v4f32 undefs to pad it. It appears we've tried to hack around a similar issue in this code before by adding undef padding to loads in one of the earlier loops in this function. Originally in r147964 by padding all loads narrower than previous loads to the same size. Later modifed to only the last load in r293088. This patch removes that earlier code and just handles it on demand where we know we need it. Fixes PR46820 Differential Revision: https://reviews.llvm.org/D84463
-
Matt Arsenault authored
Widen or narrow a type to a type with the same scalar size as another. This can be used to force G_PTR_ADD/G_PTRMASK's scalar operand to match the bitwidth of the pointer type. Use this to disallow narrower types for G_PTRMASK.
-
Matt Arsenault authored
It is not useful to report WidenScalar for a pointer value, so always report a scalar value with the target size. This allows using this to clamp the scalar operand to the pointer size in operations like G_PTR_ADD or G_PTRMASK.
-
Matt Arsenault authored
The std::function itself was tested, not the result of the actual query. It seems like there should be a warning for this. Inline the check to avoid this.
-
Fangrui Song authored
Revert D84264 "[SCCP] Directly remove non-feasible edges" & 5db5b4bc It breaks stage-2 build. Clang crashed when compiling llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp llvm/Support/GenericDomTree.h eraseNode: Node is not a leaf node
-
Tim Keith authored
The result of a statement function may require an implicit conversion to match its result type. Add that to the expression that represents the statement function body in SubprogramDetails. Extract the analysis of that expression into a separate function. Dump the statement function expression as part of the dump of SubprogramDetails. Differential Revision: https://reviews.llvm.org/D84452
-
Mitch Phillips authored
This reverts commit 22a376e7.
-
Dokyung Song authored
Summary: FuzzerInterceptors.cpp includes <sanitizer/common_interface_defs.h>, and this patch adds a missing include_directories to make sure the included file is found. Reviewers: morehouse, hctim, dmajor Subscribers: mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D84474
-
Eli Friedman authored
It's sort of tricky to hit this in practice, but not impossible. I have a synthetic C testcase if anyone is interested. The implementation is identical to the equivalent NEON register copies. Differential Revision: https://reviews.llvm.org/D84373
-
Lang Hames authored
This patch makes ownership of the JITLinkMemoryManager by ObjectLinkingLayer optional: the layer can still own the memory manager but no longer has to. Evevntually we want to move to a state where ObjectLinkingLayer never owns its memory manager. For now allowing optional ownership makes it easier to develop classes that can dynamically use either RTDyldObjectLinkingLayer, which owns its memory managers, or ObjectLinkingLayer (e.g. LLJIT).
-
Craig Topper authored
-
Thomas Lively authored
These tests were previously duplicates of the unfolded_gep_negative_offset tests, and this change updates them to test what they were meant to test. Differential Revision: https://reviews.llvm.org/D84365
-
Roman Lebedev authored
-
Amy Kwan authored
This patch aims to implement the low order vector multiply, divide and modulo instructions available on Power10. The patch involves legalizing the ISD nodes MUL, UDIV, SDIV, UREM and SREM for v2i64 and v4i32 vector types in order to utilize the following instructions: - Vector Multiply Low Doubleword: vmulld - Vector Modulus Word/Doubleword: vmodsw, vmoduw, vmodsd, vmodud - Vector Divide Word/Doubleword: vdivsw, vdivsd, vdivuw, vdivud Differential Revision: https://reviews.llvm.org/D82510
-
Petr Hosek authored
This reverts commit 1d09ecf3 since it breaks sanitizer bots.
-
Peter Collingbourne authored
This guarantees that we will detect a buffer overflow or underflow that overwrites an adjacent block. This spatial guarantee is similar to the temporal guarantee that we provide for immediate use-after-free. Enabling odd/even tags involves a tradeoff between use-after-free detection and buffer overflow detection. Odd/even tags make it more likely for buffer overflows to be detected by increasing the size of the guaranteed "red zone" around the allocation, but on the other hand use-after-free is less likely to be detected because the tag space for any particular chunk is cut in half. Therefore we introduce a tuning setting to control whether odd/even tags are enabled. Differential Revision: https://reviews.llvm.org/D84361
-
Eric Christopher authored
level loops.
-
Petr Hosek authored
Rather than handling zlib handling manually, use find_package from CMake to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB, HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is set to YES, which requires the distributor to explicitly select whether zlib is enabled or not. This simplifies the CMake handling and usage in the rest of the tooling. This is a reland of abb00753 with all followup changes and fixes that should address issues that were reported in PR44780. Differential Revision: https://reviews.llvm.org/D79219
-
Matt Morehouse authored
Support fast16labels in `dfsan_has_label`, and print an error for all other API functions. For `dfsan_dump_labels` we return silently rather than crashing since it is also called from the atexit handler where it is undefined behavior to call exit() again. Reviewed By: kcc Differential Revision: https://reviews.llvm.org/D84215
-
Amara Emerson authored
-
Tobias Hieta authored
Differential Revision: https://reviews.llvm.org/D81385
-
Sidharth Baveja authored
This patch adds the ability to peel off iterations of the first loop in loop fusion. This can allow for both loops to have the same trip count, making it legal for them to be fused together. Here is a simple scenario peeling can be used in loop fusion: for (i = 0; i < 10; ++i) a[i] = a[i] + 3; for (j = 1; j < 10; ++j) b[j] = b[j] + 5; Here is we can make use of peeling, and then fuse the two loops together. We can peel off the 0th iteration of the loop i, and then combine loop i and j for i = 1 to 10. a[0] = a[0] +3; for (i = 1; i < 10; ++i) { a[i] = a[i] + 3; b[i] = b[i] + 5; } Currently peeling with loop fusion is only supported for loops with constant trip counts and a single exit point. Both unguarded and guarded loops are supported. Reviewed By: bmahjour (Bardia Mahjour), MaskRay (Fangrui Song) Differential Revision: https://reviews.llvm.org/D82927 -
David Green authored
Similar to 8fa824d7 but this time for MLA patterns, this selects predicated vmlav/vmlava/vmlalv/vmlava instructions from vecreduce.add(select(p, mul(x, y), 0)) nodes. Differential Revision: https://reviews.llvm.org/D84102
-
Jonas Devlieghere authored
ConstString is essentially trivially copyable yet it has a user defined copy constructor that copies its one member pointer. Remove it so it qualifies as trivial in the eyes of the compiler. This also fixes two unused variable warnings now that the compiler knows that the constructor has no side-effects. Differential revision: https://reviews.llvm.org/D84440
-
Steven Wu authored
Summary: The upgrading path from old ModuleFlag based linker options to the new NamedMetadata based linker option in in materializeMetadata() which gets called once for the module and once for every GV. The linker options are getting dup'ed every time and it can create massive amount of the linker options in the object file that gets created from old bitcode. Fix the problem by checking if the new option exists or not before upgrade again. rdar://64543389 Reviewers: pcc, t.p.northover, dexonsmith, arphaman Reviewed By: arphaman Subscribers: hiraditya, jkorous, ributzka, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83688
-
Nikita Popov authored
-
Tarindu Jayatilaka authored
Added LoadInstCount, StoreInstCount, MaxLoopDepth, LoopCount Reviewed By: jdoerfert, mtrofin Differential Revision: https://reviews.llvm.org/D82283
-
Matt Arsenault authored
If the operand index exceeded the limit of unsigned char, it wrapped and would point to the wrong operand. Increase the size of the operand index field to avoid this, and also don't bother trying to fold into implicit operands.
-
Tue Ly authored
-
Tue Ly authored
Summary: Add implementations of fmax, fmaxf, and fmaxl. Reviewers: sivachandra Subscribers: mgorny, tschuett, libc-commits, ecnelises Tags: #libc-project Differential Revision: https://reviews.llvm.org/D84385
-
Peter Collingbourne authored
Differential Revision: https://reviews.llvm.org/D84454
-
Mitch Phillips authored
Summary: Allows other-language libFuzzer derivatives to invoke the driver. Patch By: Ian Eldred Pudney <ipudney@google.com> Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D84425
-
Amara Emerson authored
On AArch64 we generate redundant G_SEXTs or G_SEXT_INREGs because of this. Differential Revision: https://reviews.llvm.org/D81993
-
Nikita Popov authored
Forgot to actually use the return value of the function.
-
Tarindu Jayatilaka authored
A printer pass and a lit test case was added. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D82523
-
Nikita Popov authored
This adds the llvm.abs(), llvm.umin(), llvm.umax(), llvm.smin(), and llvm.smax() intrinsics specified in D81829. For SelectionDAG, the ISD opcodes and all the legalization and lowering already exist, so this just wires them up to the intrinsic in the SDAG builder and adds rudimentary tests. For GlobalISel only the min/max intrinsics are wired up, as llvm.abs() will require the addition of a G_ABS op, and corresponding legalization support. Differential Revision: https://reviews.llvm.org/D84125
-
Roman Lebedev authored
Add LangRef specification for the llvm.abs, llvm.umin, llvm.umax, llvm.smin, and llvm.smax integer intrinsics. Link to RFC: https://lists.llvm.org/pipermail/llvm-dev/2020-June/142257.html Proposed alive2 implementation: https://github.com/AliveToolkit/alive2/pull/353 Differential Revision: https://reviews.llvm.org/D81829
-
Tarindu Jayatilaka authored
this separates `analyze` logic from `FunctionPropertiesAnalysis` Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D82521
-
Matt Arsenault authored
-