- Feb 13, 2020
-
-
Florian Hahn authored
This version includes a fix for a set of crashes caused by marking values depending on a yet unknown & tracked call as overdefined. In some cases, we would later discover that the call has a constant result and try to mark a user of it as constant, although it was already marked as overdefined. Most instruction handlers bail out early if the instruction is already overdefined. But that is not necessary for CastInsts for example. By skipping values that depend on skipped calls, we resolve the crashes and also improve the precision in some cases (see resolvedundefsin-tracked-fn.ll). Note that we may not skip PHI nodes that may depend on a skipped call, but they can be safely marked as overdefined, as we bail out early if the PHI node is overdefined. This reverts the revert commit a74b31a3e9cd844c7ce2087978568e3f5ec8519.
-
David Green authored
-
Anh Tuyen Tran authored
Summary: This refactor patch removes some header files which are not needed and also add some to meet IWYU principles. Reviewers: rnk (Reid Kleckner), Meinersbur (Michael Kruse), dmgreen (Dave Green) Reviewed By: dmgreen (Dave Green), rnk (Reid Kleckner), Meinersbur (Michael Kruse) Subscribers: dmgreen (Dave Green), Whitney (Whitney Tsang), hiraditya (Aditya Kumar), zzheng (Z. Zheng), llvm-commits, LLVM Tag: LLVM Differential Revision: https://reviews.llvm.org/D73498
-
River Riddle authored
Summary: This was a missed case when ValueRange was originally added, and allows for constructing a ValueRange from the arguments of a block. Differential Revision: https://reviews.llvm.org/D74363
-
Shoaib Meenai authored
This will create e.g. a compiler-rt target that'll build compiler-rt for all configured targets, similar to how the runtimes umbrella target builds all the runtimes for all configured targets. Differential Revision: https://reviews.llvm.org/D74458
-
Michael Liao authored
-
Jessica Paquette authored
When we have to widen to a 64-bit register, we have to emit a SUBREG_TO_REG. Add a general-purpose widening helpe which emits the correct SUBREG_TO_REG instruction based off of a desired size and add a testcase. Also remove some asserts which are technically incorrect in `emitTestBit`. - p0 doesn't count as a scalar type, so we need to check `!Ty.isVector()` instead - Whenever we have a s1, the Size/Bit checks are too conservative, so just remove them Replace these asserts with less conservative ones where applicable. Differential Revision: https://reviews.llvm.org/D74427
-
Alina Sbirlea authored
Summary: Passes ORE, BPI, BFI are not being preserved by Loop passes, hence it is incorrect to retrieve these passes as cached. This patch makes the loop passes in question compute a new instance. In some of these cases, however, it may be beneficial to change the Loop pass to a Function pass instead, similar to the change for LoopUnrollAndJam. Reviewers: chandlerc, dmgreen, jdoerfert, reames Subscribers: mehdi_amini, hiraditya, zzheng, steven_wu, dexonsmith, Whitney, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72891
-
Matt Arsenault authored
This is to avoid performance regressions when the default attribute behavior is fixed to assume ieee. I tested the default on x86_64 ubuntu, which seems to default to FTZ/DAZ, but am guessing for x86 and PS4.
-
Sanjay Patel authored
-
Justin Lebar authored
Summary: As far as I can tell, the SFINAE was broken; there is no such thing as std::is_trivially_constructible<T>::type. Subscribers: dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74380
-
Justin Lebar authored
In a previous patch I changed `std::decay<T>::type` to `std::decay<T>` rather than `std::decay_t<T>`. This seems to have broken the build *only for clang-cl*. I don't know why. Submitting with post-commit review because this is an obvious fix for a build breakage and we've verified that it fixes the breakage.
-
Fangrui Song authored
D43468+D44380 added INSERT [AFTER|BEFORE] for non-orphan sections. This patch makes INSERT work for orphan sections as well. `SECTIONS {...} INSERT [AFTER|BEFORE] .foo` does not set `hasSectionCommands`, so the result will be similar to a regular link without a linker script. The differences when `hasSectionCommands` is set include: * image base is different * -z noseparate-code/-z noseparate-loadable-segments are unavailable * some special symbols such as `_end _etext _edata` are not defined The behavior is similar to GNU ld: INSERT is not considered an external linker script. This feature makes the section layout more flexible. It can be used to: * Place .nv_fatbin before other readonly SHT_PROGBITS sections to mitigate relocation overflows. * Disturb the layout to expose address sensitive application bugs. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D74375 -
Fangrui Song authored
GNU ld has a counterintuitive lang_propagate_lma_regions rule. ``` // .foo's LMA region is propagated to .bar because their VMA region is the same, // and .bar does not have an explicit output section address (addr_tree). .foo : { *(.foo) } >RAM AT> FLASH .bar : { *(.bar) } >RAM // An explicit output section address disables propagation. .foo : { *(.foo) } >RAM AT> FLASH .bar . : { *(.bar) } >RAM ``` In both cases, lld thinks .foo's LMA region is propagated and places .bar in the same PT_LOAD, so lld diverges from GNU ld w.r.t. the second case (lma-align.test). This patch changes Writer<ELFT>::createPhdrs to disable propagation (start a new PT_LOAD). A user of the first case can make linker scripts portable by explicitly specifying `AT>`. By contrast, there was no workaround for the old behavior. This change uncovers another LMA related bug in assignOffsets() where `ctx->lmaOffset = 0;` was omitted. It caused a spurious "load address range overlaps" error for at2.test The new PT_LOAD rule is complex. For convenience, I listed the origins of some subexpressions: * rL323449: `sec->memRegion == load->firstSec->memRegion`; linkerscript/at3.test * D43284: `load->lastSec == Out::programHeaders` (don't start a new PT_LOAD after program headers); linkerscript/at4.test * D58892: `sec != relroEnd` (start a new PT_LOAD after PT_GNU_RELRO) Reviewed By: psmith Differential Revision: https://reviews.llvm.org/D74297 -
Fangrui Song authored
When lmaRegion is non-null, respect `sec->alignment` This rule is analogous to `switchTo(sec)` which advances sh_addr (VMA). This fixes the p_paddr misalignment issue as reported by https://android-review.googlesource.com/c/trusty/external/trusted-firmware-a/+/1230058 Note, `sec->alignment` is the maximum of ALIGN and input section alignments. We may overalign LMA than GNU ld. linkerscript/align-lma.s has a FIXME that demonstrates another bug: `.bss ... >RAM` should be placed in a different PT_LOAD (GNU ld behavior) because its lmaRegion (nullptr) is different from the previous section's lmaRegion (ROM). Reviewed By: psmith Differential Revision: https://reviews.llvm.org/D74286
-
Jordan Rupprecht authored
Summary: GNU objdump prints the file format in lowercase, e.g. `elf64-x86-64`. llvm-objdump prints `ELF64-x86-64` right now, even though piping that into llvm-objcopy refuses that as a valid arch to use. As an example of a problem this causes, see: https://github.com/ClangBuiltLinux/linux/issues/779 Reviewers: MaskRay, jhenderson, alexshap Reviewed By: MaskRay Subscribers: tpimh, sbc100, grimar, jvesely, nhaehnle, kerbowa, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D74433
-
Simon Pilgrim authored
This has a really interesting side effect in that it improves some UMAX/UMIN reduction code which had redundant XOR(SHUFFLE(XOR(X,SIGNMASK)),SIGNMASK) patterns - the getNegatibleCost recognises it as FNEG(SHUFFLE(FNEG(X))).... We have a lot of FNEG patterns bitcasted to the integer domain for XOR signbit twiddling which is similar to what we do to allow UMAX/UMIN to be lowered using SMAX/SMIN. Differential Revision: https://reviews.llvm.org/D74231
-
- Feb 12, 2020
-
-
Sven van Haastregt authored
-
Haojian Wu authored
Reviewers: gribozavr2 Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74468
-
Anh Tuyen Tran authored
Summary: A number of testcases in TSAN are designed to deal with intermittent problems not exist in all executions of the tested program. A script called deflake.bash runs the executable up to 10 times to deal with the intermittent nature of the tests. The purpose of this patch is to parameterize the hard-coded threshold above via --cmake_variables=-DTSAN_TEST_DEFLAKE_THRESHOLD=SomeIntegerValue When this cmake var is not set, the default value of 10 will be used. Reviewer: dvyukov (Dmitry Vyukov), eugenis (Evgenii Stepanov), rnk (Reid Kleckner), hubert.reinterpretcast (Hubert Tong), vitalybuka (Vitaly Buka) Reviewed By: vitalybuka (Vitaly Buka) Subscribers: mgorny (Michal Gorny), jfb (JF Bastien), steven.zhang (qshanz), llvm-commits (Mailing List llvm-commits), Sanitizers Tag: LLVM, Sanitizers Differential Revision: https://reviews.llvm.org/D73707
-
Louis Dionne authored
Summary: In D27429, we switched the Apple implementation of steady_clock::now() from clock_gettime(CLOCK_MONOTONIC) to clock_gettime(CLOCK_UPTIME_RAW). The purpose was to get nanosecond precision, and also to improve the performance of the implementation. However, it appears that CLOCK_UPTIME_RAW does not satisfy the requirements of the Standard, since it is not strictly speaking monotonic. Indeed, the clock does not increment while the system is asleep, which had been mentioned in D27429 but somehow not addressed. This patch switches to CLOCK_MONOTONIC_RAW, which is monotonic, increased during sleep, and also has nanosecond precision. https://llvm.org/PR44773 Reviewers: bruno, howard.hinnant, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF Tags: #libc Differential Revision: https://reviews.llvm.org/D74341
-
Danilo Carvalho Grael authored
Summary: Add intrinsics for the following instructions: - adclb, adclt, sbclb, sbclt Reviewers: kmclaughlin, c-rhodes, sdesmalen, efriedma, rengolin Reviewed By: kmclaughlin Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74328
-
Melanie Blower authored
This reverts commit 99c5bcbc. Change clang option -ffp-model=precise to select ffp-contract=on Including some small touch-ups to the original commit Reviewers: rjmccall, Andy Kaylor Differential Revision: https://reviews.llvm.org/D74436
-
Victor Huang authored
An option is added for PowerPC to disable use of non-volatile CR register fields and avoid CR spilling in the prologue. Differential Revision: https://reviews.llvm.org/D69835
-
Louis Dionne authored
The calculation _Offset + _Count <= size() may overflow, so use _Count <= size() - _Offset instead. Note that this is safe due to the previous constraint that _Offset <= size(). Patch by Michael Schellenberger Costa. Differential Revision: https://reviews.llvm.org/D71998
-
Anil Mahmud authored
Add support for the intrinsic llvm.ppc.eieio to emit the instruction eieio. Differential Revision: https://reviews.llvm.org/D69066
-
Anil Mahmud authored
Added support for the intrinsic llvm.ppc.dcbfl and llvm.ppc.dcbflp. These will be used for emitting cache control instructions dcbfl and dcbflp which are actually mnemonics for using dcbf instruction with different immediate arguments. dcbfl ra, rb -> dcbf ra, rb, 1 dcbflp, ra, rb -> dcbf ra, rb, 3 Differential Revision: https://reviews.llvm.org/D68411
-
Matt Arsenault authored
These are only legal on CI+. The test would fail in a debug build, but not a release due to the partial selection since the pre-selection legality assert only happens in a debug build.
-
James Henderson authored
-
James Henderson authored
The DWARFv2-4 specification for the line table header states that the include directories and file name tables both end with a single null byte. Prior to this change, the parser did not detect if this byte was missing, because it also stopped reading the tables once it reached the prologue end, as claimed by the header_length field. This change adds a check that the terminator has been seen at the end of each table. Reviewed by: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D74413
-
James Henderson authored
The number of standard opcodes is defined to be opcode_base - 1, so a value of 0 for the opcode_base caused a crash as an attempt was made to reserve many entries in a vector. This change fixes the crash, by issuing a warning and skipping reading of standard opcode lengths in the event of an opcode_base of 0. Reviewed by: dblaikie Differential Revision: https://reviews.llvm.org/D74309
-
James Henderson authored
Also remove some test duplication and add a test case that shows the maximum version is rejected (this also shows that the value in the error message is actually in decimal, and not just missing an 0x prefix). Reviewed by: dblaikie Differential Revision: https://reviews.llvm.org/D74403
-
Matt Arsenault authored
Load extra bits if suitably aligned. This allows using widened 3-vector loads on SI, and fixes legalization for <9 x s32> (which LSV apparently forms frequently on lowered kernel argument lists). Fix incorrectly treating these as legal on SI. This should emit a 64-bit store and a 32-bit store. I think all of the load and store rules are just about complete, but due for a rewrite.
-
Saar Raz authored
If an error had occurred when annotating a scope spec during the tentative parse for a type-requirement, we would not revert nor commit the tentative parse, triggerring an assertion failure. Commit the TPA in this case and then do error recovery.
-
Florian Hahn authored
This includes a fix for the santizier failures. This reverts the revert commit 42f8b915.
-
Alex Zinenko authored
They are currently not supported and we should not attempt fusing them.
-
Pierre Oechsel authored
A memref_cast casting to a memref with a non identity map can't be lowered to llvm. Take the following case: ``` func @invalid_memref_cast(%arg0: memref<?x?xf64>) { %c1 = constant 1 : index %c0 = constant 0 : index %5 = memref_cast %arg0 : memref<?x?xf64> to memref<?x?xf64, #map1> %25 = std.subview %5[%c0, %c0][%c1, %c1][] : memref<?x?xf64, #map1> to memref<?x?xf64, #map1> return } ``` When lowering the subview mlir was assuming `%5` to have an llvm type (which is not the case as mlir failed to lower the memref_cast). Differential Revision: https://reviews.llvm.org/D74466 -
Hans Wennborg authored
-
Stephan Herhut authored
Summary: This was broken recently when moving from dialect registration via static initializers to explicit intialization. Differential Revision: https://reviews.llvm.org/D74480
-