- Jun 22, 2020
-
-
Sanjay Patel authored
This saves creating/destroying a builder every time we perform some transform. The tests show instruction ordering diffs resulting from always inserting at the root instruction now, but those should be benign.
-
Jay Foad authored
This fixes various assertion failures that would otherwise be triggered by a later patch to move SIWholeQuadMode later in the pass pipeline. Differential Revision: https://reviews.llvm.org/D82190
-
Georgii Rymar authored
We have a division by zero crash currently when the sh_entzize of the dynamic symbol table is 0. Differential revision: https://reviews.llvm.org/D82180
-
Yaxun (Sam) Liu authored
-
Sanjay Patel authored
The tests are regenerated to show the diffs, but there should be no functional change from this patch.
-
Tim Corringham authored
Ran clang-format just to ease future reviews. No functional changes.
-
Georgii Rymar authored
It is possible to trigger a crash when a dynamic symbol has a broken (too large) st_name and the DT_STRSZ is also broken. We have the following code in the `Elf_Sym_Impl<ELFT>::getName`: ``` template <class ELFT> Expected<StringRef> Elf_Sym_Impl<ELFT>::getName(StringRef StrTab) const { uint32_t Offset = this->st_name; if (Offset >= StrTab.size()) return createStringError(object_error::parse_failed, "st_name (0x%" PRIx32 ") is past the end of the string table" " of size 0x%zx", Offset, StrTab.size()); ... ``` The problem is that `StrTab` here is a `ELFDumper::DynamicStringTab` member which is not validated properly on initialization. So it is possible to bypass the `if` even when the `st_name` is huge. This patch fixes the issue. Differential revision: https://reviews.llvm.org/D82201 -
Anton Korobeynikov authored
-
Simon Pilgrim authored
For little endian targets, if we only need the lowest element and none of the extended bits then we can just use the (bitcasted) source vector directly. We already do this in SimplifyDemandedBits, this adds the SimplifyMultipleUseDemandedBits equivalent.
-
Simon Pilgrim authored
-
Jakub Lichman authored
Example of Matmul implementation in linalg.generic operation contained few mistakes that can puzzle new startes when trying to run the example. Differential Revision: https://reviews.llvm.org/D82289
-
Denys Petrov authored
Fix for test due to build-bot complains.
-
Loïc Joly authored
Summary: In ASTMatcher, when we have `has(...)` and `hasParent(...)` called with the same internal matcher on the same node, the memoization process will mix-up the two calls because the direction of the traversal is not part of the memoization key. This patch adds this information. Reviewers: klimek Reviewed By: klimek Subscribers: Godin, njames93, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80025
-
Serguei Katkov authored
This reverts commit 29b2c1ca. The patch causes the DT verifier failure like: DominatorTree is different than a freshly computed one! Not sure the patch itself it wrong but revert to investigate the failure.
-
Vitaly Buka authored
We can't consider variable safe if out-of-lifetime access is possible. So if StackLifetime can't prove that the instruction always uses the variable when it's still alive, we consider it unsafe.
-
Vitaly Buka authored
Usually DominatorTree provides this info, but here we use StackLifetime. The reason is that in the next patch StackLifetime will be used for actual lifetime checks and we can avoid forwarding the DominatorTree into this code.
-
Denys Petrov authored
Summary: Handle `\l` separately because a string literal can be in code like "string\\literal" with the `\l` inside. Also on Windows macros __FILE__ produces specific delimiters `\` and a directory or file may starts with the letter `l`. Fix: Use regex for replacing all `\l` (like `,\l`, `}\l`, `[\l`) except `\\l`, because a literal as a rule contains multiple `\` before `\l`. Differential Revision: https://reviews.llvm.org/D82092
-
Anton Korobeynikov authored
This reverts commit 8f6620f6.
-
David Zarzycki authored
Summary: CMake's `find_package` outputs to the console on success, which confuses the smart console mode of the `ninja` build system. Let's quiet the success message and manually warn instead. Reviewers: tstellar, phosek, mehdi_amini Reviewed By: mehdi_amini Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82276
-
Anatoly Trosinenko authored
When writing a unit test on replacing standard epilogue sequences with `BR __mspabi_func_epilog_<N>`, by manually asm-clobbering `rN` - `r10` for N = 4..10, everything worked well except for seeming inability to clobber r4. The problem was that MSP430 code generator of LLVM used an obsolete name FP for that register. Things were worse because when `llc` read an unknown register name, it silently ignored it. Differential Revision: https://reviews.llvm.org/D82184
-
Momchil Velikov authored
Fixes an issue with missing nul-terminators and saves us some string copying, compared to a version which would insert nul-terminators. Differential Revision: https://reviews.llvm.org/D82033
-
Anatoly Trosinenko authored
This commit technically permits LLVM to emit the debug information for ELF files for MSP430 architecture. Aside from this, it only defines the register numbers as defined by part 10.1 of MSP430 EABI specification (assuming the 1-byte subregisters share the register numbers with corresponding full-size registers). This commit was basically tested by me with TI-provided GCC 8.3.1 toolchain by compiling an example program with `clang` (please note manual linking may be required due to upstream `clang` not yet handling the `-msim` option necessary to run binaries on the GDB-provided simulator) and then running it and single-stepping with `msp430-elf-gdb` like this: ``` $sysroot/bin/msp430-elf-gdb ./test -ex "target sim" -ex "load ./test" (gdb) ... traditional GDB commands follow ... ``` While this implementation is most probably far from completeness and is considered experimental, it can already help with debugging MSP430 programs as well as finding issues in LLVM debug info support for MSP430 itself. One of the use cases includes trying to find a point where UBSan check in a trap-on-error mode was triggered. The expected debug information format is described in the [MSP430 Embedded Application Binary Interface](http://www.ti.com/lit/an/slaa534/slaa534.pdf) specification, part 10. Differential Revision: https://reviews.llvm.org/D81488
-
Anatoly Trosinenko authored
Current LLVM implementation uses `MCAsmInfo::CodePointerSize` as addr_size when emitting the DWARF data. llvm-dwarfdump, on the other hand, handles `addr_size`s of 4 and 8 properly and considers all other sizes as an error. This works for most of mainline targets except for MSP430 and AVR. msp430-gcc v8.3.1 emits DWARF32 with addr_size = 4 (DWARF32 does not imply addr_size = 4, 32 refers to internal offset width of 4 bytes) that is handled by llvm-dwarfdump already. Still, emitting 2-byte target pointers on MSP430 seems correct as well (but not for MSP430X that is supported by msp430-gcc but not by LLVM and has 20-bit address space). This patch make it possible for MSP430 debug info support to be tested with llvm-dwarfdump. Differential Revision: https://reviews.llvm.org/D82055
-
Nathan James authored
- Added `FixItHint` comments to Check files for the script to mark those checks as offering fix-its when the fix-its are generated in another file. - Case insensitive file searching when looking for the file a checker code resides in. Also regenerated the list, sphinx had no issue generating the docs after this. Reviewed By: sylvestre.ledru Differential Revision: https://reviews.llvm.org/D81932
-
Florian Hahn authored
-
Nathan James authored
-
Tobias Gysi authored
The patch makes the index type lowering of the GPU to NVVM/ROCDL conversion configurable. It introduces a pass option that controls the bitwidth used when lowering index computations. Differential Revision: https://reviews.llvm.org/D80285
-
Balázs Kéri authored
Summary: Bug reports of resource leak are now improved. If there are multiple resource leak paths for the same stream, only one wil be reported. Reviewers: Szelethus, xazax.hun, baloghadamsoftware, NoQ Reviewed By: Szelethus, NoQ Subscribers: NoQ, rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81407
-
Djordje Todorovic authored
When describing parameter value loaded by a COPY instruction, consider case where needed Reg value is a sub- or super- register of the COPY instruction's destination register. Without this patch, compile process will crash with the assertion "TargetInstrInfo::describeLoadedValue can't describe super- or sub-regs for copy instructions". Patch by Nikola Tesic Differential revision: https://reviews.llvm.org/D82000
-
David Spickett authored
Summary: As seen in: https://bugs.llvm.org/show_bug.cgi?id=45693 When clang looks for a tool it has a set of possible names for it, in priority order. Previously it would look for these names in the program path. Then look for all the names in the PATH. This means that aarch64-none-elf-gcc on the PATH would lose to gcc in the program path. (which was /usr/bin in the bug's case) This changes that logic to search each name in both possible locations, then move to the next name. Which is more what you would expect to happen when using a non default triple. (-B prefixes maybe should follow this logic too, but are not changed in this patch) Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79988
-
Stephan Herhut authored
Summary: We already had a parallel loop specialization pass that is used to enable unrolling and consecutive vectorization by rewriting loops whose bound is defined as a min of a constant and a dynamic value into a loop with static bound (the constant) and the minimum as bound, wrapped into a conditional to dispatch between the two. This adds the same rewriting for for loops. Differential Revision: https://reviews.llvm.org/D82189
-
Vassil Vassilev authored
This allows clients to use the idiom: if (GlobalIndex->lookupIdentifier(Name, FoundModules)) { // work on the FoundModules } This is also a minor performance improvent for clang. Differential Revision: https://reviews.llvm.org/D81077 -
Serguei Katkov authored
Currently we allow peeling of the loops if there is a exiting latch block and all other exits are blocks ending with deopt. Actually we want that exit would end up with deopt unconditionally but it is not required that exit itself ends with deopt. Reviewers: reames, ashlykov, fhahn, apilipenko, fedor.sergeev Reviewed By: apilipenko Subscribers: hiraditya, zzheng, dantrushin, llvm-commits Differential Revision: https://reviews.llvm.org/D81140
-
sameeran joshi authored
Summary: Fix individual check tests with lit when building out-of-tree `ninja check-flang-<folder>` was not working. The CMakeLists.txt was looking for the lit tests in the source directory instead of the build directory. This commit extends @CarolineConcatto previous patch[D81002] Reviewers: DavidTruby, sscalpone, tskeith, CarolineConcatto, jdoerfert Reviewed By: DavidTruby Subscribers: flang-commits, llvm-commits, CarolineConcatto Tags: #flang, #llvm Differential Revision: https://reviews.llvm.org/D82120
-
Craig Topper authored
[X86] Add an AVX check prefix to bitcast-vector-bool.ll to combine checks where AVX1/2/512 are all the same. NFC
-
Craig Topper authored
Must have forgotten to git add the file.
-
Michael Liao authored
Summary: - The offset should be treated as a signed one. Reviewers: rampitec, arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82234
-
Jez Ng authored
Summary: There were a few issues with the previous setup: 1. The section sorting comparator used a declarative map of section names to determine the correct order, but it turns out we need to match on more than just names -- in particular, an upcoming diff will sort based on whether the S_ZERO_FILL flag is set. This diff changes the sorter to a more imperative but flexible form. 2. We were sorting OutputSections stored in a MapVector, which left the MapVector in an inconsistent state -- the wrong keys map to the wrong values! In practice, we weren't doing key lookups (only container iteration) after the sort, so this was fine, but it was still a dubious state of affairs. This diff copies the OutputSections to a vector before sorting them. 3. We were adding unneeded OutputSections to OutputSegments and then filtering them out later, which meant that we had to remember whether an OutputSegment was in a pre- or post-filtered state. This diff only adds the sections to the segments if they are needed. In addition to those major changes, two minor ones worth noting: 1. I renamed all OutputSection variable names to `osec`, to parallel `isec`. Previously we were using some inconsistent combination of `osec`, `os`, and `section`. 2. I added a check (and a test) for InputSections with names that clashed with those of our synthetic OutputSections. Reviewers: #lld-macho Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81887
-
Craig Topper authored
I forgot to do this when I added then to _cpu_indicator_init.
-