summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [PowerPC] Fix ICE when truncating some vectorsQiu Chaofan2019-08-132-1/+126
| | | | | | | | | | | | The legalizer would hit an assertion on PowerPC platform when truncating a vector whose size is not power of 2. This patch is to add a check to prevent vectors with such odd-size elements from being custom lowered. Reviewed By: Hal Finkel Differential Revision: https://reviews.llvm.org/D65261 llvm-svn: 368654
* [AArch64][GlobalISel] Replace explicit vreg creation with implicit using ↵Amara Emerson2019-08-131-3/+4
| | | | | | SrcOp. NFC. llvm-svn: 368653
* [GlobalISel] Make the InstructionSelector instance non-const, allowing state ↵Amara Emerson2019-08-1318-68/+76
| | | | | | | | | | | | | | | | to be maintained. Currently we can't keep any state in the selector object that we get from subtarget. As a result we have to plumb through all our variables through multiple functions. This change makes it non-const and adds a virtual init() method to allow further state to be captured for each target. AArch64 makes use of this in this patch to cache a call to hasFnAttribute() which is expensive to call, and is used on each selection of G_BRCOND. Differential Revision: https://reviews.llvm.org/D65984 llvm-svn: 368652
* [ELF] Rename odd variable names "New" after r365730. NFCFangrui Song2019-08-136-38/+35
| | | | | | | | | | New -> newSym or newFlags Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D66127 llvm-svn: 368651
* Added unit tests to check supported rounding modesSerge Pavlov2019-08-132-1/+29
| | | | | | | | Also added fixed misspelled metadata name. Differential Revision: https://reviews.llvm.org/D66073 llvm-svn: 368650
* [ELF][test] Add dynamic-list-preempt2.sFangrui Song2019-08-131-0/+29
| | | | | | | | When producing a DSO, the isPreemptible property of a Defined with default or protected visibility is affected by the --dynamic-list file, but not by interposable symbols in other DSOs. llvm-svn: 368649
* [GlobalISel]: Add KnownBits for G_XORAditya Nandakumar2019-08-132-0/+29
| | | | | | https://reviews.llvm.org/D66119 llvm-svn: 368648
* Verifier: check prof branch_weightsYevgeny Rouban2019-08-131-0/+43
| | | | | | | | | | | | This patch is to check some of constraints on !pro branch_weights metadata: https://llvm.org/docs/BranchWeightMetadata.html Reviewers: asbirlea, reames, chandlerc Reviewed By: reames Differential Revision: https://reviews.llvm.org/D61179 llvm-svn: 368647
* Do not call replaceAllUsesWith to upgrade calls to ARC runtime functionsAkira Hatanaka2019-08-134-9/+92
| | | | | | | | | | | | | | | | | | | | | | to intrinsic calls This fixes a bug in r368311. It turns out that the ARC runtime functions in the IR can have pointer parameter types that are not i8* or i8**. Instead of RAUWing normal functions with intrinsics, manually bitcast the arguments before passing them to the intrinsic functions and bitcast the return value back to the type of the original call instruction. This recommits r368634, which was reverted in r368637. The loop in the patch was iterating over uses of a function and deleting function calls inside it, which caused bots to crash. rdar://problem/54125406 Differential Revision: https://reviews.llvm.org/D66047 llvm-svn: 368646
* [AMDGPU] Fix msan failure in printf loweringStanislav Mekhanoshin2019-08-131-5/+3
| | | | llvm-svn: 368645
* [lld] Remove unnecessary "class Lazy"Bob Haarman2019-08-131-1/+0
| | | | llvm-svn: 368644
* Eliminate implicit Register->unsigned conversions in VirtRegMap. NFCDaniel Sanders2019-08-1312-102/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This was mostly an experiment to assess the feasibility of completely eliminating a problematic implicit conversion case in D61321 in advance of landing that* but it also happens to align with the goal of propagating the use of Register/MCRegister instead of unsigned so I believe it makes sense to commit it. The overall process for eliminating the implicit conversions from Register/MCRegister -> unsigned was to: 1. Add an explicit conversion to support genuinely required conversions to unsigned. For example, using them as an index for IndexedMap. Sadly it's not possible to have an explicit and implicit conversion to the same type and only deprecate the implicit one so I called the explicit conversion get(). 2. Temporarily annotate the implicit conversion to unsigned with LLVM_ATTRIBUTE_DEPRECATED to make them visible 3. Eliminate implicit conversions by propagating Register/MCRegister/ explicit-conversions appropriately 4. Remove the deprecation added in 2. * My conclusion is that it isn't feasible as there's too much code to update in one go. Depends on D65678 Reviewers: arsenm Subscribers: MatzeB, wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65685 llvm-svn: 368643
* [TSan] Fix test failing on LinuxJulian Lettner2019-08-131-1/+1
| | | | llvm-svn: 368641
* clang-scan-deps: do not spawn threads when LLVM_ENABLE_THREADS is disabledAlex Lorenz2019-08-132-20/+28
| | | | llvm-svn: 368640
* [Symbol] Remove redundant includeAlex Langford2019-08-131-1/+0
| | | | llvm-svn: 368638
* Revert "Do not call replaceAllUsesWith to upgrade calls to ARC runtime ↵Akira Hatanaka2019-08-134-91/+9
| | | | | | | | functions" This reverts commit r368634 because it broke a bot. llvm-svn: 368637
* Move findBBwithCalls to the file it's used in to avoid unused functionEric Christopher2019-08-132-24/+24
| | | | | | warnings. llvm-svn: 368636
* [X86] Remove 'Server' from Tigerlake description comments.Craig Topper2019-08-131-2/+2
| | | | | | Tigerlake is a client CPU not a server CPU. llvm-svn: 368635
* Do not call replaceAllUsesWith to upgrade calls to ARC runtime functionsAkira Hatanaka2019-08-124-9/+91
| | | | | | | | | | | | | | | | to intrinsic calls This fixes a bug in r368311. It turns out that the ARC runtime functions in the IR can have pointer parameter types that are not i8* or i8**. Instead of RAUWing normal functions with intrinsics, manually bitcast the arguments before passing them to the intrinsic functions and bitcast the return value back to the type of the original call instruction. rdar://problem/54125406 llvm-svn: 368634
* [AMDGPU] removed unused functions from printf loweringStanislav Mekhanoshin2019-08-121-21/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D66117 llvm-svn: 368633
* [clang] Update isDerivedFrom to support Objective-C classes 🔍Stephane Moore2019-08-126-34/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change updates `isDerivedFrom` to support Objective-C classes by converting it to a polymorphic matcher. Notes: The matching behavior for Objective-C classes is modeled to match the behavior of `isDerivedFrom` with C++ classes. To that effect, `isDerivedFrom` matches aliased types of derived Objective-C classes, including compatibility aliases. To achieve this, the AST visitor has been updated to map compatibility aliases to their underlying Objective-C class. `isSameOrDerivedFrom` also provides similar behaviors for C++ and Objective-C classes. The behavior that `cxxRecordDecl(isSameOrDerivedFrom("X"))` does not match `class Y {}; typedef Y X;` is mirrored for Objective-C in that `objcInterfaceDecl(isSameOrDerivedFrom("X"))` does not match either `@interface Y @end typedef Y X;` or `@interface Y @end @compatibility_alias X Y;`. Test Notes: Ran clang unit tests. Reviewers: aaron.ballman, jordan_rose, rjmccall, klimek, alexfh, gribozavr Reviewed By: aaron.ballman, gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60543 llvm-svn: 368632
* [WinEH] Fix catch block parent frame pointer offsetReid Kleckner2019-08-122-3/+19
| | | | | | | | | | | | r367088 made it so that funclets store XMM registers into their local frame instead of storing them to the parent frame. However, that change forgot to update the parent frame pointer offset for catch blocks. This change does that. Fixes crashes when an exception is rethrown in a catch block that saves XMMs, as described in https://crbug.com/992860. llvm-svn: 368631
* [TextAPI] Fix & Add tests for tbd files version 3.Juergen Ributzka2019-08-124-6/+443
| | | | | | | | | | | | - There was a simple typo in TextStub code that prevented version 3 files to be read. - Included a version 3 unit test to handle the differences in the format. - Also a typo in Error.h inside the comments. https://reviews.llvm.org/D66041 This patch is from Cyndy Ishida <cyndy_ishida@apple.com>. llvm-svn: 368630
* [risc-v] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVMDaniel Sanders2019-08-126-49/+49
| | | | | | | | | | | | | | | | | | | Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast from llvm::Register and changes the type of the variable to llvm::Register (dropping the llvm:: where possible). Depends on D65919 Reviewers: lenary Subscribers: jholewinski, MatzeB, qcolombet, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, wdng, nhaehnle, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, javed.absar, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, tpr, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, Jim, s.egerton, llvm-commits Tags: #llvm Differential Revision for full review was: https://reviews.llvm.org/D65962 llvm-svn: 368629
* [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVMDaniel Sanders2019-08-1221-159/+159
| | | | | | | | | | | | | | | | | | | | | | | Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast from llvm::Register and changes the type of the variable to llvm::Register (dropping the llvm:: where possible). Manual fixups in: AArch64InstrInfo.cpp - genFusedMultiply() now takes a Register* instead of unsigned* AArch64LoadStoreOptimizer.cpp - Ternary operator was ambiguous between Register/MCRegister. Settled on Register Depends on D65919 Reviewers: aemerson Subscribers: jholewinski, MatzeB, qcolombet, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, wdng, nhaehnle, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, javed.absar, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, tpr, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, Jim, s.egerton, llvm-commits Tags: #llvm Differential Revision for full review was: https://reviews.llvm.org/D65962 llvm-svn: 368628
* [webassembly] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVMDaniel Sanders2019-08-1213-45/+45
| | | | | | | | | | | | | | | | | Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast from llvm::Register and changes the type of the variable to llvm::Register (dropping the llvm:: where possible). Reviewers: aheejin Subscribers: jholewinski, MatzeB, qcolombet, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, wdng, nhaehnle, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, javed.absar, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, tpr, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, Jim, s.egerton, llvm-commits Tags: #llvm Differential Revision for whole review: https://reviews.llvm.org/D65962 llvm-svn: 368627
* [AMDGPU] Use PredicateControl in MIMGBaseOpcode. NFC.Stanislav Mekhanoshin2019-08-121-2/+2
| | | | | | | | | | | This is infrastructural, will be needed for future work. For some reason it was only used in MIMG_NoSampler, while needed everywere we use MIMGBaseOpcode if we want to use predicates. Differential Revision: https://reviews.llvm.org/D66115 llvm-svn: 368626
* [Attributor] Use the cached data layout directlyJohannes Doerfert2019-08-122-65/+65
| | | | | | | This removes the warning by using the new DL member. It also simplifies the code. llvm-svn: 368625
* Title: Fix build warning for operator<< when using GCC 7.Whitney Tsang2019-08-121-0/+3
| | | | | | | Authored By: etiotto Differential Revision: https://reviews.llvm.org/D63459 llvm-svn: 368624
* [X86] Allow combineTruncateWithSat to use pack instructions for i16->i8 ↵Craig Topper2019-08-125-98/+30
| | | | | | | | | | | without AVX512BW. We need AVX512BW to be able to truncate an i16 vector. If we don't have that we have to extend i16->i32, then trunc, i32->i8. But we won't be able to remove the min/max if we do that. At least not without more special handling. llvm-svn: 368623
* [Attributor][NFC] Add IntegerState raw_ostream << operatorJohannes Doerfert2019-08-122-0/+6
| | | | llvm-svn: 368622
* [Attributor] Make the InformationCache an Attributor memberJohannes Doerfert2019-08-122-115/+93
| | | | | | | The functionality is not changed but the interfaces are simplified and repetition is removed. llvm-svn: 368621
* [CompilerType] Pass an ExecutionContextScope to GetTypeBitAlign.Davide Italiano2019-08-127-9/+12
| | | | llvm-svn: 368620
* [GWP-ASan] Update backtrace function signature.Mitch Phillips2019-08-126-57/+89
| | | | | | | | | | | | | | | | | | | | Summary: Updates the function signature and comments for backtracing (and printing backtraces). This update brings GWP-ASan in line with future requirements for stack frame compression, wherein the length of the trace is provided explicitly, rather than relying on nullptr-termination. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: #sanitizers, llvm-commits, morehouse Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D66099 llvm-svn: 368619
* [GISel]: Fix a bug in KnownBits where we should have been using SizeInBitsAditya Nandakumar2019-08-122-1/+17
| | | | | | | | | https://reviews.llvm.org/D66039 We were using getIndexSize instead of getIndexSizeInBits(). Added test case for G_PTRTOINT and G_INTTOPTR. llvm-svn: 368618
* [libFuzzer] Merge: print feature coverage number as well.Max Moroz2019-08-123-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: feature coverage is a useful signal that is available during the merge process, but was not printed previously. Output example: ``` $ ./fuzzer -use_value_profile=1 -merge=1 new_corpus/ seed_corpus/ INFO: Seed: 1676551929 INFO: Loaded 1 modules (2380 inline 8-bit counters): 2380 [0x90d180, 0x90dacc), INFO: Loaded 1 PC tables (2380 PCs): 2380 [0x684018,0x68d4d8), MERGE-OUTER: 180 files, 78 in the initial corpus MERGE-OUTER: attempt 1 INFO: Seed: 1676574577 INFO: Loaded 1 modules (2380 inline 8-bit counters): 2380 [0x90d180, 0x90dacc), INFO: Loaded 1 PC tables (2380 PCs): 2380 [0x684018,0x68d4d8), INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 1048576 bytes MERGE-INNER: using the control file '/tmp/libFuzzerTemp.111754.txt' MERGE-INNER: 180 total files; 0 processed earlier; will process 180 files now #1 pulse cov: 134 ft: 330 exec/s: 0 rss: 37Mb #2 pulse cov: 142 ft: 462 exec/s: 0 rss: 38Mb #4 pulse cov: 152 ft: 651 exec/s: 0 rss: 38Mb #8 pulse cov: 152 ft: 943 exec/s: 0 rss: 38Mb #16 pulse cov: 520 ft: 2783 exec/s: 0 rss: 39Mb #32 pulse cov: 552 ft: 3280 exec/s: 0 rss: 41Mb #64 pulse cov: 576 ft: 3641 exec/s: 0 rss: 50Mb #78 LOADED cov: 602 ft: 3936 exec/s: 0 rss: 88Mb #128 pulse cov: 611 ft: 3996 exec/s: 0 rss: 93Mb #180 DONE cov: 611 ft: 4016 exec/s: 0 rss: 155Mb MERGE-OUTER: succesfull in 1 attempt(s) MERGE-OUTER: the control file has 39741 bytes MERGE-OUTER: consumed 0Mb (37Mb rss) to parse the control file MERGE-OUTER: 9 new files with 80 new features added; 9 new coverage edges ``` Reviewers: hctim, morehouse Reviewed By: morehouse Subscribers: delcypher, #sanitizers, llvm-commits, kcc Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D66030 llvm-svn: 368617
* Revert "[lldb] Refactor guard variable checks in IRForTarget"Stella Stamenova2019-08-121-12/+12
| | | | | | This reverts commit 94fbbf712e906464f5f3abbeabcfcbc05d5352ec. llvm-svn: 368616
* Revert "[lldb] Fix dynamic_cast by no longer failing on variable without ↵Stella Stamenova2019-08-126-66/+7
| | | | | | | | metadata" This reverts commit b448d1bf212219febbb182d00c210bad1bd25e7f. llvm-svn: 368615
* [Symbol] GetTypeBitAlign() should return None in case of failure.Davide Italiano2019-08-127-17/+28
| | | | | | | | | | | | | | | | Summary: And not `zero`. This is the last API needed to be converted to an Optional<T>. Reviewers: xiaobai, compnerd Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66093 llvm-svn: 368614
* Fix Wnewline-eof after r368598Nico Weber2019-08-122-2/+2
| | | | llvm-svn: 368613
* Revert "Disable MachO TBD write tests for Windows."Juergen Ributzka2019-08-122-6/+0
| | | | | | The underlying issue was fixed in r357759. llvm-svn: 368611
* [Sema] Check __builtin_bit_cast operand for completeness before ↵Erik Pilkington2019-08-121-3/+4
| | | | | | | | | materializing it. This shouldn't be observable, but it doesn't make sense to materialize an incomplete type. llvm-svn: 368610
* [X86] Remove unreachable code from LowerTRUNCATE. NFCCraig Topper2019-08-121-16/+4
| | | | | | | | All three 256->128 bit cases were already handled above. Noticed while looking at the coverage report. llvm-svn: 368609
* [X86] Add a paranoia type check to the code that detects AVG patterns from ↵Craig Topper2019-08-121-5/+6
| | | | | | | | | | | | | truncating stores. If we're after type legalize, we should make sure we won't create a store with an illegal type when we separate the AVG pattern from the truncating store. I don't know of a way to fail for this today. Just noticed while I was in the vicinity. llvm-svn: 368608
* [X86] Simplify creation of saturating truncating stores.Craig Topper2019-08-121-41/+11
| | | | | | | We just need to check if the truncating store is legal instead of going through isSATValidOnAVX512Subtarget. llvm-svn: 368607
* [X86] Replace call to isTruncStoreLegalOrCustom with isTruncStoreLegal. NFCCraig Topper2019-08-121-1/+1
| | | | | | We have no custom trunc stores on X86. llvm-svn: 368606
* small follow-up to r368604Nico Weber2019-08-121-3/+3
| | | | llvm-svn: 368605
* libcxxabi: Rename .hpp files to .hNico Weber2019-08-1216-20/+20
| | | | | | | | LLVM uses .h as its extension for header files. Differential Revision: https://reviews.llvm.org/D65981 llvm-svn: 368604
* [asan_symbolize] Fix bug where the frame counter was not incremented.Dan Liew2019-08-123-4/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This bug occurred when a plug-in requested that a binary not be symbolized while the script is trying to symbolize a stack frame. In this case `self.frame_no` would not be incremented. This would cause subsequent stack frames that are symbolized to be incorrectly numbered. To fix this `get_symbolized_lines()` has been modified to take an argument that indicates whether the stack frame counter should incremented. In `process_line_posix()` `get_symbolized_lines(None, ...)` is now used in in the case where we don't want to symbolize a line so that we can keep the frame counter increment in a single function. A test case is included. The test uses a dummy plugin that always asks `asan_symbolize.py` script to not symbolize the first binary that the script asks about. Prior to the patch this would cause the output to script to look something like ``` #0 0x0 #0 0x0 in do_access #1 0x0 in main ``` This is the second attempt at landing this patch. The first (r368373) failed due to failing some android bots and so was reverted in r368472. The new test is now disabled for Android. It turns out that the patch also fails for iOS too so it is also disabled for that family of platforms too. rdar://problem/49476995 Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka Subscribers: #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65495 llvm-svn: 368603
* [clang-doc] Generate HTML links for children namespaces/recordsDiego Astiazaran2019-08-128-63/+117
| | | | | | | | | | | | | | | | Path is now stored in the references to the child while serializing, then this path is used to generate the relative path in the HTML generator. Now some references have paths and some don't so in the reducing phase, references are now properly merged checking for empty attributes. Tests added for HTML and YAML generators, merging and serializing. computeRelativePath function had a bug when the filepath is part of the given directory; it returned a path that starts with a separator. This has been fixed. Differential Revision: https://reviews.llvm.org/D65987 llvm-svn: 368602
OpenPOWER on IntegriCloud