- Feb 12, 2020
-
-
Kelvin Li authored
Change the string from "Intel(R) OMP" to "LLVM OMP" in libomp.so Differential Revision: https://reviews.llvm.org/D74462
-
Ehud Katz authored
Fixes a memory leak of allocating `LoopInfoWrapperPass` and `DominatorTreeWrapperPass`.
-
Roman Lebedev authored
function_ref is non-owning, so if we get it as a parameter in constructor, our reference goes out-of-scope as soon as constructor returns. Instead, let's just take it as a parameter to the actual `generate()` call
-
Erik Pilkington authored
This reverts commit fafc6e4f. Should fix ppc stage2 failure: http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/23546 Conflicts: clang/lib/CodeGen/CGCall.cpp
-
Nicolas Vasilache authored
This revision prepares the ground for declaratively defining Linalg "named" ops. Such named ops form the backbone of operations that are ubiquitous in the ML application domain. This revision closely related to the definition of a "Tensor Computation Primitives Dialect" and demonstrates that ops can be expressed as declarative configurations of the `linalg.generic` op. Differential Revision: https://reviews.llvm.org/D74491
-
Jonas Devlieghere authored
Move the logic for initialization and termination for SymbolFileDWARFDebugMap into SymbolFileDWARF so that there's one initializer for the SymbolFileDWARF plugin.
-
Vedant Kumar authored
Differential Revision: https://reviews.llvm.org/D74018
-
Vedant Kumar authored
This patch fixes a few related out-of-bounds read bugs in the string data formatters. These issues have to do with mishandling of un- initialized strings. These manifest as ASan exceptions when debugging a clang binary. The first issue was that the std::string formatter treated strings in "short mode" with length greater than the size of the inline buffer as valid. The second issue was that the StringPrinter facility did not check that a full utf8 codepoint sequence can be read from the buffer (i.e. there are some missing range checks). I took the opportunity here to delete some untested code that was meant to deal with invalid input and replace it with fail-on-invalid logic ([1][2][3]). This means we'll give up on formatting an invalid string instead of guessing our way through it. The third issue is that StringPrinter did not check that a utf8 sequence could actually be fully read from the string payload. This one is especially tricky as we may overflow the buffer pointer while reading the sequence. I also noticed that the std::string formatter would spew the raw version of the underlying ValueObject when garbage is detected. I've changed this to just print "Summary Unavailable" instead, as we do elsewhere. I've added regression tests for these issues to test/functionalities/data-formatter/data-formatter-stl/libcxx/string. [1] http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/DataFormatters/StringPrinter.cpp.html#L136 [2] http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/DataFormatters/StringPrinter.cpp.html#L163 [3] http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/DataFormatters/StringPrinter.cpp.html#L357 rdar://59080026 Differential Revision: https://reviews.llvm.org/D73860
-
Vedant Kumar authored
This fixes a UBSan error seen while debugging clang: Member call on null pointer of type 'clang::TypeSourceInfo' rdar://58783517 Differential Revision: https://reviews.llvm.org/D73808
-
Vedant Kumar authored
Various parts of the LLVM code generator assume that the address argument of a dbg.declare is not a `ptrtoint`-of-alloca. ASan breaks this assumption, and this results in local variables sometimes being unavailable at -O0. GlobalISel, SelectionDAG, and FastISel all do not appear to expect dbg.declares to have a `ptrtoint` as an operand. This means that they do not place entry block allocas in the usual side table reserved for local variables available in the whole function scope. This isn't always a problem, as LLVM can try to lower the dbg.declare to a DBG_VALUE, but those DBG_VALUEs can get dropped for all the usual reasons DBG_VALUEs get dropped. In the ObjC test case I'm looking at, the cause happens to be that `replaceDbgDeclare` has hoisted dbg.declares into the entry block, causing LiveDebugValues to "kill" the DBG_VALUEs because the lexical dominance check fails. To address this, I propose: 1) Have ASan (always) pass an alloca to dbg.declares (this patch). This is a narrow bugfix for -O0 debugging. 2) Make replaceDbgDeclare not move dbg.declares around. This should be a generic improvement for optimized debug info, as it would prevent the lexical dominance check in LiveDebugValues from killing as many variables. This means reverting llvm/r227544, which fixed an assertion failure (llvm.org/PR22386) but no longer seems to be necessary. I was able to complete a stage2 build with the revert in place. rdar://54688991 Differential Revision: https://reviews.llvm.org/D74369
-
Jay Foad authored
Summary: This was a very odd API, where you had to pass a flag into a zext function to say whether the extended bits really were zero or not. All callers passed in a literal true or false. I think it's much clearer to make the function name reflect the operation being performed on the value we're tracking (rather than on the KnownBits Zero and One fields), so zext means the value is being zero extended and new function anyext means the value is being extended with unknown bits. NFC. Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74482
-
Nicolas Vasilache authored
Summary: This revision allows model builder to create a linalg_matmul whose body is a vector.contract. This shows the abstractions compose nicely. Differential Revision: https://reviews.llvm.org/D74457
-
LLVM GN Syncbot authored
-
Roman Lebedev authored
Summary: Currently, we only have nice exploration for LEA instruction, while for the rest, we rely on `randomizeUnsetVariables()` to sometimes generate something interesting. While that works, it isn't very reliable in coverage :) Here, i'm making an assumption that while we may want to explore multi-instruction configs, we are most interested in the characteristics of the main instruction we were asked about. Which we can do, by taking the existing `randomizeMCOperand()`, and turning it on it's head - instead of relying on it to randomly fill one of the interesting values, let's pregenerate all the possible interesting values for the variable, and then generate as much `InstructionTemplate` combinations of these possible values for variables as needed/possible. Of course, that requires invasive changes to no longer pass just the naked `Instruction`, but sometimes partially filled `InstructionTemplate`. As it can be seen from the test, this allows us to explore `X86::OperandType::OPERAND_COND_CODE` for instructions that take such an operand. I'm hoping this will greatly simplify exploration. Reviewers: courbet, gchatelet Reviewed By: gchatelet Subscribers: orodley, mgorny, sdardis, tschuett, jrtc27, atanasyan, mstojanovic, andreadb, RKSimon, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74156
-
Matt Arsenault authored
No behavior is going to make sense here until the default is IEEE.
-
Huihui Zhang authored
Summary: Bail out early for scalable vectors. As global variables are not expected to be scalable. Use explicit call of getFixedSize() to assert on places where scalable size doesn't make sense. Reviewers: sdesmalen, efriedma, apazos, huntergr, willlovett Reviewed By: sdesmalen Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74424
-
Matt Arsenault authored
We're still in the awkward state where IEEE is not the default denormal mode.
-
Nicolás Alvarez authored
Replace some #includes in ARCMigrate source files with more specific includes and forward declarations. This reduces the number of files that need to be rebuilt when a header changes (and saves like 1 second of build time). For example, several files no longer need to be rebuilt when the list of static analyzer checkers(!) changes. Differential Revision: https://reviews.llvm.org/D74385
-
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
-
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
-