summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-pdbutil] Add -type-ref-stats to help find unused type infoReid Kleckner2019-03-2111-21/+898
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This considers module symbol streams and the global symbol stream to be roots. Most types that this considers "unreferenced" are referenced by LF_UDT_MOD_SRC_LINE id records, which VC seems to always include. Essentially, they are types that the user can only find in the debugger if they call them by name, they cannot be found by traversing a symbol. In practice, around 80% of type information in a PDB is referenced by a symbol. That seems like a reasonable number. I don't really plan to do anything with this tool. It mostly just exists for informational purposes, and to confirm that we probably don't need to implement type reference tracking in LLD. We can continue to merge all types as we do today without wasting space. Reviewers: zturner, aganea Subscribers: mgorny, hiraditya, arphaman, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59620 llvm-svn: 356692
* [x86] add tests with movmsk potential (PR39665); NFCSanjay Patel2019-03-211-0/+421
| | | | llvm-svn: 356691
* [InstCombine] Don't transform ((C1 OP zext(X)) & C2) -> zext((C1 OP X) & C2) ↵Craig Topper2019-03-215-20/+17
| | | | | | | | | | | | | | if either zext or OP has another use. If they have other users we'll just end up increasing the instruction count. We might be able to weaken this to only one of them having a single use if we can prove that the and will be removed. Fixes PR41164. Differential Revision: https://reviews.llvm.org/D59630 llvm-svn: 356690
* [X86] Add __popcntd and __popcntq to ia32intrin.h to match gcc and icc. ↵Craig Topper2019-03-213-40/+65
| | | | | | | | | | Remove popcnt feature flag from _popcnt32/_popcnt64 and move to ia32intrin.h to match gcc gcc and icc both implement popcntd and popcntq which we did not. gcc doesn't seem to require a feature flag for the _popcnt32/_popcnt64 spelling and will use a libcall if its not supported. Differential Revision: https://reviews.llvm.org/D59567 llvm-svn: 356689
* [X86] Don't avoid folding multiple use sign extended 8-bit immediate into ↵Craig Topper2019-03-215-25/+10
| | | | | | | | | | | | instructions under optsize. Under optsize we try to avoid folding immediates into instructions under optsize. But if the immediate is 16-bits or 32 bits, but can be encoded as an 8-bit immediate we don't save enough from disabling the folding unless the immediate has enough uses to make up for the size of the move which is either 3 bytes or 5 bytes since there are no sign extended 8-bit moves. We would also save something if the immediate was a live out of the basic block and thus a move was unavoidable, but that would require a more advanced heuristic than just counting uses. Note we only avoid folding multiple use immediates into the patterns that use X86ISD::ADD/SUB/XOR/OR/AND/CMP/ADC/SBB nodes and not the more common ISD::ADD/SUB/XOR/OR/AND nodes. Differential Revision: https://reviews.llvm.org/D59522 llvm-svn: 356688
* [ScalarizeMaskedMemIntrin] Add support for scalarizing expandload and ↵Craig Topper2019-03-2110-5/+470
| | | | | | | | | | | | | | compressstore intrinsics. This adds support for scalarizing these intrinsics as well the X86TargetTransformInfo support to avoid scalarizing them in the cases X86 can handle. I've omitted handling special cases for constant masks for this first pass. Though CodeGenPrepare can constant fold the branch conditions and remove some of the control flow anyway. Fixes PR40994 and is covers most of PR3666. Might want to implement constant masks to close that. Differential Revision: https://reviews.llvm.org/D59180 llvm-svn: 356687
* [X86] Use the CPUKind enum from PROC_ALIAS to directly get the CPUKind in ↵Craig Topper2019-03-211-3/+2
| | | | | | | | fillValidCPUList. We were using getCPUKind which translates the string to the enum also using PROC_ALIAS. This just cuts out the string compares. llvm-svn: 356686
* [ValueTracking] Use ConstantRange based overflow check for signed subNikita Popov2019-03-212-12/+7
| | | | | | | | | | | | | | This is D59450, but for signed sub. This case is not NFC, because the overflow logic in ConstantRange is more powerful than the existing check. This resolves the TODO in the function. I've added two tests to show that this indeed catches more cases than the previous logic, but the main correctness test coverage here is in the existing ConstantRange unit tests. Differential Revision: https://reviews.llvm.org/D59617 llvm-svn: 356685
* [ELF][ARM] Revert Redesign of .ARM.exidx handling to use a SyntheticSectionPeter Smith2019-03-2111-391/+175
| | | | | | | | | There is a reproducible buildbot failure (segfault) on the 2 stage clang-cmake-armv8-lld bot. Reverting while I investigate. Differential Revision: https://reviews.llvm.org/D59216 llvm-svn: 356684
* Add more rotate tests, including ORs of rotatesKrzysztof Parzyszek2019-03-213-0/+244
| | | | | | This is a part of https://reviews.llvm.org/D47735. llvm-svn: 356683
* Move the rest of the sections over to DWARFContext.Zachary Turner2019-03-2117-270/+327
| | | | | | | | | This is mostly mechanical, and just moves the remaining non-DWO related sections over to DWARFContext. Differential Revision: https://reviews.llvm.org/D59611 llvm-svn: 356682
* [libc++] Re-document how to use <filesystem> with various versions of libc++Louis Dionne2019-03-211-0/+10
| | | | | | | | | This documentation was removed when we added <filesystem> to the dylib in r356518, but it really should have been updated to reflect the new state of things. Keeping documentation around doesn't hurt and users will have an easier time migrating. llvm-svn: 356681
* Add relational benchmark against a string constant.Samuel Benzaquen2019-03-211-4/+44
| | | | | | | | | | | | | | | | | Summary: Add relational benchmark against a string constant. These can potentially trigger inlining of the operations. We want to benchmark that. Reviewers: EricWF Subscribers: christof, jdoerfert, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D59512 llvm-svn: 356680
* [AST] OMPStructuredBlockTest: two matchers were promoted into ASTMatchers.hRoman Lebedev2019-03-211-6/+1
| | | | llvm-svn: 356679
* [libc++] Mark bad_any_cast tests as unsupported when the dylib doesn't ↵Louis Dionne2019-03-213-12/+3
| | | | | | | | | support bad_any_cast With the latest compiler fix to availability, some availability failures that didn't trigger before now trigger. llvm-svn: 356678
* [ASTMatcher] Add clang-query disclaimer to two more matchers that take enumRoman Lebedev2019-03-212-0/+12
| | | | | | | | | | | As we have figured out in https://reviews.llvm.org/D57112 and https://bugs.llvm.org/show_bug.cgi?id=41176 this kind-of works, but needs special care. llvm-svn: 356677
* [ASTMatchers][OpenMP] OpenMP Structured-block-related matchersRoman Lebedev2019-03-214-0/+165
| | | | | | | | | | | | | | | | | Summary: Exposes to the for ASTMatchers the interface/modelling of OpenMP structured-block. Reviewers: gribozavr, aaron.ballman, JonasToth, george.karpenkov Reviewed By: gribozavr, aaron.ballman Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang, #openmp Differential Revision: https://reviews.llvm.org/D59463 llvm-svn: 356676
* [ASTTypeTraits][ASTMatchers][OpenMP] OMPClause handlingRoman Lebedev2019-03-219-0/+424
| | | | | | | | | | | | | | | | | | | Summary: `OMPClause` is the base class, it is not descendant from **any** other class, therefore for it to work with e.g. `VariadicDynCastAllOfMatcher<>`, it needs to be handled here. Reviewers: sbenza, bkramer, pcc, klimek, hokein, gribozavr, aaron.ballman, george.karpenkov Reviewed By: gribozavr, aaron.ballman Subscribers: guansong, jdoerfert, alexfh, ABataev, cfe-commits Tags: #openmp, #clang Differential Revision: https://reviews.llvm.org/D57112 llvm-svn: 356675
* [ASTMatchers][OpenMP] Add base ompExecutableDirective() matcher.Roman Lebedev2019-03-217-4/+78
| | | | | | | | | | | | | | | | | | Summary: A simple matcher for `OMPExecutableDirective` Stmt type. Split off from D57113. Reviewers: gribozavr, aaron.ballman, JonasToth, george.karpenkov Reviewed By: gribozavr, aaron.ballman Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59453 llvm-svn: 356674
* Workaround items/iteritems difference between Python2 and Python3Serge Guelton2019-03-211-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59588 llvm-svn: 356673
* Workaround Python's map difference between Python2/3Serge Guelton2019-03-211-2/+4
| | | | | | | | | When the output of map is not used, using a list comprehension or an explicit call to list looks awkward. Differential Revision: https://reviews.llvm.org/D59587 llvm-svn: 356672
* Portable int/long conversion across Python 2 / Python 3Serge Guelton2019-03-211-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59585 llvm-svn: 356671
* Portable exception value access across Python 2 / Python 3Serge Guelton2019-03-211-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59583 llvm-svn: 356670
* Fixup opt-remarks.ll gold plugin test. NFCDavid Green2019-03-211-1/+1
| | | | | | | Now that rL356594 has added a TailCallElim pass to LTO, the call gets marked as tail. llvm-svn: 356669
* [DAGCombiner] Use getTokenFactor in a few more cases.Florian Hahn2019-03-211-4/+4
| | | | | | | | | | | | | | | SDNodes can only have 64k operands and for some inputs (e.g. large number of stores), we can reach this limit when creating TokenFactor nodes. This patch is a follow up to D56740 and updates a few more places that potentially can create TokenFactors with too many operands. Reviewers: efriedma, craig.topper, aemerson, RKSimon Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D59156 llvm-svn: 356668
* [DAGCombine] SimplifySelectCC - call FoldSetCC with the setcc result typeSimon Pilgrim2019-03-212-2/+19
| | | | | | | | We were calling FoldSetCC with the compare operand type instead of the result type. Found by OSS-Fuzz #13838 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13838) llvm-svn: 356667
* [ELF][ARM] Redesign of .ARM.exidx handling to use a SyntheticSectionPeter Smith2019-03-2111-175/+391
| | | | | | | | | | | | | | | | | Instead of creating extra Synthetic .ARM.exidx sections to account for gaps in the table, create a single .ARM.exidx SyntheticSection that can derive the contents of the gaps from a sorted list of the executable InputSections. This has the benefit of moving the ARM specific code for SyntheticSections in SHF_LINK_ORDER processing and the table merging code into the ARM specific SyntheticSection. This also makes it easier to create EXIDX_CANTUNWIND table entries for executable InputSections that don't have an associated .ARM.exidx section. Fixes pr40277 Differential Revision: https://reviews.llvm.org/D59216 llvm-svn: 356666
* [CodeGenPrepare] limit formation of overflow intrinsics (PR41129)Sanjay Patel2019-03-214-36/+41
| | | | | | | | | | | | | | | | | | This is probably a bigger limitation than necessary, but since we don't have any evidence yet that this transform led to real-world perf improvements rather than regressions, I'm making a quick, blunt fix. In the motivating x86 example from: https://bugs.llvm.org/show_bug.cgi?id=41129 ...and shown in the regression test, we want to avoid an extra instruction in the dominating block because that could be costly. The x86 LSR test diff is reversing the changes from D57789. There's no evidence that 1 version is any better than the other yet. Differential Revision: https://reviews.llvm.org/D59602 llvm-svn: 356665
* [llvm-readobj] Format codes. NFC.Xing GUO2019-03-211-8/+8
| | | | llvm-svn: 356664
* Permit redeclarations of a builtin to specify calling convention.Erich Keane2019-03-2115-72/+92
| | | | | | | | | | | | | | | | | | | | After https://reviews.llvm.org/rL355317 we noticed that quite a decent amount of code redeclares builtins (memcpy in particular, I believe reduced from an MSVC header) with a calling convention specified. This gets particularly troublesome when the user specifies a new 'default' calling convention on the command line. When looking to add a diagnostic for this case, it was noticed that we had 3 other diagnostics that differed only slightly. This patch ALSO unifies those under a 'select'. Unfortunately, the order of words in ONE of these diagnostics was reversed ("'thiscall' calling convention" vs "calling convention 'thiscall'"), so this patch also standardizes on the former. Differential Revision: https://reviews.llvm.org/D59560 Change-Id: I79f99fe7c2301640755ffdd774b46eb44526bb22 llvm-svn: 356663
* [clang-format] Add basic support for formatting C# filesPaul Hoad2019-03-2115-19/+559
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This revision adds basic support for formatting C# files with clang-format, I know the barrier to entry is high here so I'm sending this revision in to test the water as to whether this might be something we'd consider landing. Tracking in Bugzilla as: https://bugs.llvm.org/show_bug.cgi?id=40850 Justification: C# code just looks ugly in comparison to the C++ code in our source tree which is clang-formatted. I've struggled with Visual Studio reformatting to get a clean and consistent style, I want to format our C# code on saving like I do now for C++ and i want it to have the same style as defined in our .clang-format file, so it consistent as it can be with C++. (Braces/Breaking/Spaces/Indent etc..) Using clang format without this patch leaves the code in a bad state, sometimes when the BreakStringLiterals is set, it fails to compile. Mostly the C# is similar to Java, except instead of JavaAnnotations I try to reuse the TT_AttributeSquare. Almost the most valuable portion is to have a new Language in order to partition the configuration for C# within a common .clang-format file, with the auto detection on the .cs extension. But there are other C# specific styles that could be added later if this is accepted. in particular how `{ set;get }` is formatted. Reviewers: djasper, klimek, krasimir, benhamilton, JonasToth Reviewed By: klimek Subscribers: llvm-commits, mgorny, jdoerfert, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D58404 llvm-svn: 356662
* [Thumb] Fix infinite loop in ABS expansion (PR41160)Simon Pilgrim2019-03-212-1/+24
| | | | | | Don't expand ISD::ABS node if its legal. llvm-svn: 356661
* [AMDGPU] Support for v3i32/v3f32Tim Renouf2019-03-2131-163/+663
| | | | | | | | | | | | | | | Added support for dwordx3 for most load/store types, but not DS, and not intrinsics yet. SI (gfx6) does not have dwordx3 instructions, so they are not enabled there. Some of this patch is from Matt Arsenault, also of AMD. Differential Revision: https://reviews.llvm.org/D58902 Change-Id: I913ef54f1433a7149da8d72f4af54dbb13436bd9 llvm-svn: 356659
* Fix -Wmisleading-indentation gcc7 warning. NFCI.Simon Pilgrim2019-03-211-6/+6
| | | | llvm-svn: 356658
* [AArch64] Allow -mattr=tpidr-el[1|2|3]Oliver Stannard2019-03-214-0/+30
| | | | | | | | | | | Added subtarget features for AArch64 to use TPIDR_EL[1|2|3] as the TLS base register, rather than the default TPIDR_EL0. Patch by Philip Derrin! Differential revision: https://reviews.llvm.org/D54685 llvm-svn: 356657
* [SelectionDAG] Add scalarization of ABS node (PR41149)Simon Pilgrim2019-03-212-0/+28
| | | | | | | | Patch by: @ikulagin (Ivan Kulagin) Differential Revision: https://reviews.llvm.org/D59577 llvm-svn: 356656
* Fix two more issues with r356652Pavel Labath2019-03-212-134/+130
| | | | | | | | | | | | The first problem was a use-after-free in the tests (detected by asan bots). The temporary array created for the "create" call is guaranteed to live only until the end of the statement. The fix there is to store the test data in a local variable to ensure it has the right lifetime The second issue is broken BUILD_SHARED_LIBS build, which I fix by adding the appropriate BinaryFormat dependency to the Object unit tests. llvm-svn: 356655
* [RISCV][NFC] Remove old CHECK lines from linker-relaxation.s testAlex Bradbury2019-03-211-6/+0
| | | | | | The RELOC: check lines are no longer used. llvm-svn: 356654
* Attempt to fix modules build for r356652Pavel Labath2019-03-211-0/+1
| | | | | | | The commit added a new .def file. This adds it to the list of textual headers. llvm-svn: 356653
* [Object] Add basic minidump supportPavel Labath2019-03-2115-2/+741
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds basic support for reading minidump files. It contains the definitions of various important minidump data structures (header, stream directory), and of one minidump stream (SystemInfo). The ability to read other streams will be added in follow-up patches. However, all streams can be read even now as raw data, which means lldb's minidump support (where this code is taken from) can be immediately rebased on top of this patch as soon as it lands. As we don't have any support for generating minidump files (yet), this tests the code via unit tests with some small handcrafted binaries in the form of c char arrays. Reviewers: Bigcheese, jhenderson, zturner Subscribers: srhines, dschuff, mgorny, fedor.sergeev, lemo, clayborg, JDevlieghere, aprantl, lldb-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59291 llvm-svn: 356652
* [BasicAA] Use DenseMap::try_emplace after D59151. NFCFangrui Song2019-03-211-5/+5
| | | | llvm-svn: 356651
* Reland r356547 after fixing the YAML module missing issue.Zinovy Nis2019-03-211-29/+153
| | | | | | | | | | | | | [clang-tidy] Parallelize clang-tidy-diff.py This patch has 2 rationales: - large patches lead to long command lines and often cause max command line length restrictions imposed by OS; - clang-tidy runs on modified files are independent and can be done in parallel, the same as done for run-clang-tidy. Differential Revision: https://reviews.llvm.org/D5766 llvm-svn: 356649
* Silence warning about unused variable in builds without asserts [NFC]Mikael Holmen2019-03-211-0/+1
| | | | llvm-svn: 356648
* Use list comprehension instead of map/filter to prepare Python2/3 compatSerge Guelton2019-03-215-18/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D59579 llvm-svn: 356647
* [ScalarizeMaskedMemIntrinsics] Reverse some if conditions to reduce ↵Craig Topper2019-03-211-20/+16
| | | | | | | | indentations to remove curly braces. Pre-commit for D59180 llvm-svn: 356646
* [InstCombine] Add test case for PR41164. NFCCraig Topper2019-03-211-0/+37
| | | | llvm-svn: 356645
* [BasicAA] Reduce no of map seaches [NFCI].Alina Sbirlea2019-03-211-14/+32
| | | | | | | | | | | | | | | | | Summary: This is a refactoring patch. - Reduce the number of map searches by reusing the iterator. - Add asserts to check that the entry is in the cache, as this is something BasicAA relies on to avoid infinite recursion. Reviewers: chandlerc, aschwaighofer Subscribers: sanjoy, jlebar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59151 llvm-svn: 356644
* [Reproducers] Properly handle QEnvironment packetsJonas Devlieghere2019-03-212-1/+16
| | | | | | | | On Linux, a QEnvironment packet is sent for every environment variable. This breaks replay when the number of environment variables is different then during capture. The solution is to always reply with OK. llvm-svn: 356643
* [instcombine] Add some todos, and arrange code for readibilityPhilip Reames2019-03-212-32/+38
| | | | llvm-svn: 356642
* [MSSA] Delete move ctor; remove dynamic never-moved verificationGeorge Burgess IV2019-03-212-16/+5
| | | | | | | | | | | | | | | | Code archaeology in D59315 revealed that MSSA should never be moved. Rather than trying to check dynamically that this hasn't happened in the verify() functions of Walkers, it's likely best to just delete its move constructor. Since all these verify() functions did is check that MSSA hasn't moved, this allows us to remove these verify functions. I can readd the verification checks if someone's super concerned about us trying to `memcpy` MemorySSA or something somewhere, but I imagine we have other problems if we're trying anything like that... llvm-svn: 356641
OpenPOWER on IntegriCloud