summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* More OpenBSD fixesVitaly Buka2018-03-221-8/+26
| | | | | | | | | | | | | | | | | | Summary: - Use internal_syscall_ptr in internal_readlink - use sigcontext on OpenBSD Patch by David CARLIER Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44713 llvm-svn: 328239
* Set dso_local on vtables.Rafael Espindola2018-03-222-2/+5
| | | | llvm-svn: 328238
* [CodeGen] Add a new pass for PostRA sinkJun Bum Lim2018-03-2218-58/+662
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This pass sinks COPY instructions into a successor block, if the COPY is not used in the current block and the COPY is live-in to a single successor (i.e., doesn't require the COPY to be duplicated). This avoids executing the the copy on paths where their results aren't needed. This also exposes additional opportunites for dead copy elimination and shrink wrapping. These copies were either not handled by or are inserted after the MachineSink pass. As an example of the former case, the MachineSink pass cannot sink COPY instructions with allocatable source registers; for AArch64 these type of copy instructions are frequently used to move function parameters (PhyReg) into virtual registers in the entry block.. For the machine IR below, this pass will sink %w19 in the entry into its successor (%bb.1) because %w19 is only live-in in %bb.1. ``` %bb.0: %wzr = SUBSWri %w1, 1 %w19 = COPY %w0 Bcc 11, %bb.2 %bb.1: Live Ins: %w19 BL @fun %w0 = ADDWrr %w0, %w19 RET %w0 %bb.2: %w0 = COPY %wzr RET %w0 ``` As we sink %w19 (CSR in AArch64) into %bb.1, the shrink-wrapping pass will be able to see %bb.0 as a candidate. With this change I observed 12% more shrink-wrapping candidate and 13% more dead copies deleted in spec2000/2006/2017 on AArch64. Reviewers: qcolombet, MatzeB, thegameg, mcrosier, gberry, hfinkel, john.brawn, twoh, RKSimon, sebpop, kparzysz Reviewed By: sebpop Subscribers: evandro, sebpop, sfertile, aemerson, mgorny, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D41463 llvm-svn: 328237
* Document optforfuzzing attribute created in r328214.Matt Morehouse2018-03-222-0/+4
| | | | llvm-svn: 328236
* [DWARF] Replace assert with diagnostic. PR36868.Paul Robinson2018-03-222-2/+46
| | | | llvm-svn: 328235
* Move the initialization of the Meta Renamer pass over to IPO along with the ↵David Blaikie2018-03-222-1/+1
| | | | | | rest of it that was moved in r328209 llvm-svn: 328234
* [DAG, X86] Fix ISel-time node insertion idsNirav Dave2018-03-225-11/+98
| | | | | | | | | | | | | | | | As in SystemZ backend, correctly propagate node ids when inserting new unselected nodes into the DAG during instruction Seleciton for X86 target. Fixes PR36865. Reviewers: jyknight, craig.topper Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D44797 llvm-svn: 328233
* [SymbolFilePDB] Use section contributions as another way to determine the ↵Aaron Smith2018-03-221-16/+19
| | | | | | | | | compiland Some PDB Symbols don't have line information. Use the section contributions to determine their compiland. This is useful to determine the parent compiland for PDBSymbolTypeData, i.e. variables. llvm-svn: 328232
* [X86] Correct the scheduling data for some of the 32 and 64 bit multiplies ↵Craig Topper2018-03-227-86/+53
| | | | | | to as best as I understand how they are implemented. llvm-svn: 328231
* [SymbolFilePDB] Ignore compiler generated functions when creating the LLDB ↵Aaron Smith2018-03-222-4/+7
| | | | | | type from a PDB llvm-svn: 328230
* Un-XFAIL a test under new GCC version; the GCC bug has been fixedEric Fiselier2018-03-221-1/+1
| | | | llvm-svn: 328229
* Fixed __kmpc_get_target_offload() to call library initialization.Andrey Churbanov2018-03-221-1/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D44793 llvm-svn: 328228
* [InstCombineCalls] Update deprecated API usage (NFC)Daniel Neilson2018-03-221-1/+1
| | | | | | | | Summary: Just updating a call to MemSetInst::getAlignment() to MemSetInst::getDestAlignment(). The former has been deprecated. llvm-svn: 328227
* [X86][Btver2] Conversion, MaskedLoad/MaskedStore and NTStores all are ↵Simon Pilgrim2018-03-225-289/+291
| | | | | | scheduled through the JFPU1 pipe llvm-svn: 328226
* Fix improperly failing test - and the code it was testing. Thanks to Stephan ↵Marshall Clow2018-03-222-6/+5
| | | | | | Lavavej for the catch. llvm-svn: 328225
* Set dso_local on builtin functions.Rafael Espindola2018-03-222-10/+4
| | | | | | | | | | The difference between CreateRuntimeFunction and CreateBuiltinFunction is that CreateBuiltinFunction would not set dllimport or dso_local. To keep the current semantics, just forward to CreateRuntimeFunction with Local=true so it doesn't add dllimport. llvm-svn: 328224
* Fix Address Size in test.Rafael Espindola2018-03-221-1/+1
| | | | | | This is an i386 test, so it should be 4. llvm-svn: 328223
* [X86][Btver2] FCMP (inc FMAX/FMIN) instructions use the JFPA functional pipeSimon Pilgrim2018-03-224-83/+83
| | | | | | The ymm instructions are double pumped as well. llvm-svn: 328222
* [Codeview/PDB] Rename some methods for clarity.Zachary Turner2018-03-227-16/+43
| | | | | | | | | NFC, this just renames some methods to better express what they do, and also adds a few helper methods to add some symmetry to the API in a few places (for example there was a getStringFromId but not a getIdFromString method in the string table). llvm-svn: 328221
* [clang-format] Fix ObjC style guesser to also iterate over child linesBen Hamilton2018-03-222-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When I wrote `ObjCHeaderStyleGuesser`, I incorrectly assumed the correct way to iterate over all tokens in `AnnotatedLine` was to iterate over the linked list tokens starting with `AnnotatedLine::First`. However, `AnnotatedLine` also contains a vector `AnnotedLine::Children` with child `AnnotedLine`s which have their own tokens which we need to iterate over. Because I didn't iterate over the tokens in the children lines, the ObjC style guesser would fail on syntax like: #define FOO ({ NSString *s = ... }) as the statement(s) inside { ... } are child lines. This fixes the bug and adds a test. I confirmed the test failed before the fix, and passed after the fix. Test Plan: New tests added. Ran tests with: % make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: djasper, jolesiak, Wizard Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D44790 llvm-svn: 328220
* [OpenMP][Clang] Add call to global data sharing stack initialization on the ↵Gheorghe-Teodor Bercea2018-03-222-0/+10
| | | | | | | | | | | | | | | | workers side Summary: The workers also need to initialize the global stack. The call to the initialization function needs to happen after the kernel_init() function is called by the master. This ensures that the per-team data structures of the runtime have been initialized. Reviewers: ABataev, grokos, carlo.bertolli, caomhin Reviewed By: ABataev Subscribers: jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D44749 llvm-svn: 328219
* [GISel]: Fix incorrect IRTranslation while translating null pointer typesAditya Nandakumar2018-03-226-8/+18
| | | | | | | | | | | | | | | https://reviews.llvm.org/D44762 Currently IRTranslator produces %vreg17<def>(p0) = G_CONSTANT 0; instead we should build %vreg16(s64) = G_CONSTANT 0 %vreg17(p0) = G_INTTOPTR %vreg16 reviewed by @aemerson. llvm-svn: 328218
* [X86][Btver2] FMUL ymm instructions are double pumped on the JFPM functional ↵Simon Pilgrim2018-03-223-267/+267
| | | | | | pipe llvm-svn: 328217
* [ARM] Enable the full InstRW overlap check for ARMScheduleR52.tdCraig Topper2018-03-221-8/+3
| | | | | | | | This fixes a few issues with the R52 instregexs to enable the full overlap checking Differential Revision: https://reviews.llvm.org/D44767 llvm-svn: 328216
* Make the debug info in some tests more realistic.Rafael Espindola2018-03-224-0/+84
| | | | | | | | | | | | | | | | | | | Currently lld just parses the .debug_line section assuming that there is only one compile unit. That assumption is false (PR36793). I have a patch that changes lld to iterate over the compile units and parse the portions of the .debug_line they point to (which fixes PR36793). A problem is that we will then need a compiler unit pointing to .debug_line for lld to see it. It seems like bfd has the same restriction. This patch updates existing tests to add a minimal compile unit so that they still work with PR36793 fixed. llvm-svn: 328215
* [SimplifyCFG] Create attribute for fuzzing-specific optimizations.Matt Morehouse2018-03-2213-0/+76
| | | | | | | | | | | | | | | | | | | | | | Summary: When building with libFuzzer, converting control flow to selects or obscuring the original operands of CMPs reduces the effectiveness of libFuzzer's heuristics. This patch provides an attribute to disable or modify certain optimizations for optimal fuzzing signal. Provides a less aggressive alternative to https://reviews.llvm.org/D44057. Reviewers: vitalybuka, davide, arsenm, hfinkel Reviewed By: vitalybuka Subscribers: junbuml, mehdi_amini, wdng, javed.absar, hiraditya, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D44232 llvm-svn: 328214
* [CUDA] add REQUIRES fields for CUDA variants of LTO tests.Artem Belevich2018-03-222-4/+12
| | | | | | | Also relax checking for nvptx triple. This should avoid test failure if the test is executed on 32-bit platform. llvm-svn: 328213
* [DWARF] Add EmitDwarfOffset function, NFC.Alexey Bataev2018-03-222-0/+7
| | | | | | Added EmitDwarfOffset function after discussion with Eric Christofer. llvm-svn: 328212
* vim: rename `singlethread` to `syncscope`Saleem Abdulrasool2018-03-221-1/+1
| | | | | | | SVN r307722 renamed the keyword from `singlethread` to `syncscope`. Update the syntax file accordingly. llvm-svn: 328211
* [LoopPredication] Add profitability check based on BPIAnna Thomas2018-03-222-3/+212
| | | | | | | | | | | | | | | | | | | | | | | | Summary: LoopPredication is not profitable when the loop is known to always exit through some block other than the latch block. A coarse grained latch check can cause loop predication to predicate the loop, and unconditionally deoptimize. However, without predicating the loop, the guard may never fail within the loop during the dynamic execution because the non-latch loop termination condition exits the loop before the latch condition causes the loop to exit. We teach LP about this using BranchProfileInfo pass. Reviewers: apilipenko, skatkov, mkazantsev, reames Reviewed by: skatkov Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44667 llvm-svn: 328210
* Move MetaRenamer from Transforms/UTils to Transforms/IPO since it implements ↵David Blaikie2018-03-223-1/+1
| | | | | | part of IPO.h llvm-svn: 328209
* [DWARF] Fix mixing assembler -g with DWARF .file directives.Paul Robinson2018-03-222-17/+33
| | | | | | | | | | | We were effectively overriding an explicit '.file' directive with info for the assembler source. That shouldn't happen. Fixes PR36636, really, even for .s files emitted by Clang. Differential Revision: https://reviews.llvm.org/D44265 llvm-svn: 328208
* Revert "[InstrProf] Support for external functions in text format."Benjamin Kramer2018-03-227-104/+30
| | | | | | | This reverts commit r328132. Breaks FDO selfhost. I'm seeing error: /tmp/profraw: Invalid instrumentation profile data (bad magic) llvm-svn: 328207
* [CallSiteSplitting] Preserve DominatorTreeAnalysis.Florian Hahn2018-03-221-13/+21
| | | | | | | | | | | | | | The dominator tree analysis can be preserved easily. Some other kinds of analysis can probably be preserved too. Reviewers: junbuml, dberlin Reviewed By: dberlin Differential Revision: https://reviews.llvm.org/D43173 llvm-svn: 328206
* [MC] fix documentation comments; NFCSanjay Patel2018-03-222-32/+13
| | | | llvm-svn: 328205
* [sanitizer] Split coverage into separate RT in sanitizer_commonKostya Kortchinsky2018-03-2211-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: `sanitizer_common`'s coverage support is fairly well separated, and libcdep by default. Several sanitizers don't make use of coverage, and as far as I can tell do no benefit from the extra dependencies pulled in by the coverage public interface functions. The following sanitizers call `InitializeCoverage` explicitely: MSan, ASan, LSan, HWAsan, UBSan. On top of this, any sanitizer bundling RTUBSan should add the coverage RT as well: ASan, Scudo, UBSan, CFI (diag), TSan, MSan, HWAsan. So in the end the following have no need: DFSan, ESan, CFI, SafeStack (nolibc anyway), XRay, and the upcoming Scudo minimal runtime. I tested this with all the sanitizers check-* with gcc & clang, and in standalone on Linux & Android, and there was no issue. I couldn't test this on Mac, Fuchsia, BSDs, & Windows for lack of an environment, so adding a bunch of people for additional scrunity. I couldn't test HWAsan either. Reviewers: eugenis, vitalybuka, alekseyshl, flowerhack, kubamracek, dberris, rnk, krytarowski Reviewed By: vitalybuka, alekseyshl, flowerhack, dberris Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D44701 llvm-svn: 328204
* [X86][SSE42] Use the default PCMPEST/PCMPIST scheduler classes directly. NFCI.Simon Pilgrim2018-03-225-284/+131
| | | | | | Models were completely overriding all SSE42 strins instructions when the default classes could be used for exactly the same coverage. llvm-svn: 328203
* DWARFVerifier: verify debug_names abbreviation tablePavel Labath2018-03-225-3/+190
| | | | | | | | | | | | | | | | | Summary: This commit adds checks of the abbreviation table in a DWARF v5 Name Index. The most interesting/useful check is the one which checks that each index attributes is encoded using the correct form class, but it also checks for the more obvious errors like unknown forms/tags/attributes and duplicated attributes. Reviewers: JDevlieghere, aprantl, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44736 llvm-svn: 328202
* clang-format: Narrow down raw string literal line break exception.Daniel Jasper2018-03-222-4/+7
| | | | | | | | | | | | For multiline raw string literals, we generally want to respect the author's choice of linebreak before the 'R"(' as the rest of the raw string might be aligned to it and we cannot (commonly) modify the content. For single-line raw string literals, this doesn't make any sense and so we should just treat them as regular string literals in this regard. llvm-svn: 328201
* clang-format: Fix SpacesInParentheses with fully qualified names.Daniel Jasper2018-03-222-1/+3
| | | | | | | | | | | When SpacesInParentheses is set to true clang-format does not add a space before fully qualified names. For example: do_something(::globalVar ); Fix by Darby Payne. Thank you! llvm-svn: 328200
* clang-tidy, modularize: return non-zero exit code on errorsAlexander Kornienko2018-03-224-5/+5
| | | | | | | When no inputs given, the tools should not only produce the help message, but also return a non-zero exit code. Fixed tests accordingly. llvm-svn: 328199
* [llvm-mca] Minor refactoring. NFCIAndrea Di Biagio2018-03-225-28/+31
| | | | | | Also, removed a couple of unused methods from class Instruction. llvm-svn: 328198
* [InstCombine] add folds for xor-of-icmp signbit tests (PR36682)Sanjay Patel2018-03-223-25/+84
| | | | | | | | | | | | | | | | | | This is a retry of r328119 which was reverted at r328145 because it could crash by trying to combine icmps with different operand types. This version has a check for that and additional tests. Original commit message: This is part of solving: https://bugs.llvm.org/show_bug.cgi?id=36682 There's also a leftover improvement from the long-ago-closed: https://bugs.llvm.org/show_bug.cgi?id=5438 https://rise4fun.com/Alive/dC1 llvm-svn: 328197
* [CodeGen] Emit DWARF "constructor" calling conventionJonas Devlieghere2018-03-222-3/+131
| | | | | | | | | | | Now that LLVM has support for emitting calling conventions in DWARF (see r328191) have clang emit them. Patch by: Adrien Guinet Differential revision: https://reviews.llvm.org/D42351 llvm-svn: 328196
* [ELF] - Apply clang-format. NFC.George Rimar2018-03-221-10/+10
| | | | llvm-svn: 328195
* [X86][CLMUL] Use the default CLMUL scheduler classes directly. NFCI.Simon Pilgrim2018-03-224-63/+23
| | | | | | Models were completely overriding all CLMUL instructions when the WriteCLMUL default classes could be used for exactly the same coverage. llvm-svn: 328194
* [X86][CLMUL] Fix/add missing itinerary tags to (V)PCLMULQDQ instructionsSimon Pilgrim2018-03-221-4/+4
| | | | | | | | PCLMULQDQrm was using the rr itinerary. Difference in itineraries between PCLMULQDQ/VPCLMULQDQ variants was causing an unnecessary duplication of scheduler class entries. llvm-svn: 328193
* [X86] Use the default AES scheduler classes directly. NFCI.Simon Pilgrim2018-03-225-276/+84
| | | | | | | | | Models were completely overriding all AES instructions when the WriteAES default classes could be used for exactly the same coverage. Removes 6 unnecessary scheduler classes from every model. Note: Still looking for a way for tblgen to warn when this is happening - often the override is more complete than the default. llvm-svn: 328192
* Add vendor specific calling convention to DWARFJonas Devlieghere2018-03-221-0/+17
| | | | | | | | | | | This patch adds LLVM's and GCC's calling conventions so they can be emitted in the DWARF debug info. Patch by: Adrien Guinet Differential revision: https://reviews.llvm.org/D42350 llvm-svn: 328191
* [llvm-mca] Simplify (and better standardize) the Instruction interface.Andrea Di Biagio2018-03-226-31/+29
| | | | llvm-svn: 328190
OpenPOWER on IntegriCloud