summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ADT] Drop llvm::Optional clang-specific optmization for trivially copyable ↵Tom Stellard2018-11-151-18/+0
| | | | | | | | | | | | | | | | | | types Summary: This fixes libLLVM.so ABI mismatches between llvm compiled with clang and llvm compiled with gcc (PR39427). Reviewers: bkramer, sylvestre.ledru, mgorny, hans Reviewed By: bkramer, hans Subscribers: dexonsmith, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D54540 llvm-svn: 346985
* Upgrade Google Benchmark library to ToTEric Fiselier2018-11-1557-863/+2966
| | | | llvm-svn: 346984
* [X86] Minor cleanup to getExtendInVec. NFCICraig Topper2018-11-151-4/+7
| | | | | | | | | | Use unsigned to calculate the subvector index to avoid a cast. Remove an unnecessary condition and replace it with a stronger assert. Use the InVT variable we updated when we extracted instead of grabbing it from the In SDValue. llvm-svn: 346983
* [InstCombine] adjust rotate direction in tests; NFCSanjay Patel2018-11-151-12/+12
| | | | | | Copy/paste errors - all of the changed tests rotated left before. llvm-svn: 346982
* Port the Darwin universal binary testcase to x86_64.Adrian Prantl2018-11-152-61/+57
| | | | | | | | | Xcode 10 doesn't ship with an i386 SDK any more. This patch ports the testcase from an i386/x86_64 -> x86_64/x86_64h universal binary. rdar://problem/46099343 llvm-svn: 346981
* [X86] Add -x86-experimental-vector-widening support to reduceVMULWidth and ↵Craig Topper2018-11-152-44/+48
| | | | | | | | | | | | combineMulToPMADDWD In reduceVMULWidth, we no longer need to worry about extending the vector to 128 bits first. Regular widening of extends, muls and shuffles will take care of that for us. In combineMulToPMADDWD, we can handle v2i32 multiplies and allow the VPMADDWD to be widened to v4i32 during type legalization by adding custom widening like we do have for AVG/ADDUS/SUBUS. I had to modify that code a little to allow different and output VTs. Differential Revision: https://reviews.llvm.org/D54512 llvm-svn: 346980
* [WebAssembly] Fix return type of nextByteThomas Lively2018-11-151-2/+2
| | | | | | | | | | | | | | Summary: The old return type did not allow for correct error reporting and was causing a compiler warning. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54586 llvm-svn: 346979
* [BinaryFormat] Add MsgPackTypesScott Linder2018-11-155-0/+865
| | | | | | | | | Add data structure to represent MessagePack "documents" and convert to/from both MessagePack and YAML encodings. Differential Revision: https://reviews.llvm.org/D48175 llvm-svn: 346978
* [InstCombine] add tests for funnel shift (rotate) canonicalization; NFCSanjay Patel2018-11-151-1/+342
| | | | llvm-svn: 346975
* [WebAssembly] Import the stack pointer when building shared librariesSam Clegg2018-11-156-66/+92
| | | | | | Differential Revision: https://reviews.llvm.org/D54558 llvm-svn: 346974
* [X86] Guess that a CPU is Icelake it if reports support for AVX512VBMI2.Craig Topper2018-11-151-0/+6
| | | | llvm-svn: 346973
* [WebAssembly] Refactor config setting and checking. NFC.Sam Clegg2018-11-152-53/+66
| | | | | | | | This matches the way the ELF backend does it. Differential Revision: https://reviews.llvm.org/D54559 llvm-svn: 346972
* [LTO] Load sample profile in LTO link step.Xin Tong2018-11-153-0/+59
| | | | | | | | | | | | | | Summary: Load sample profile in LTO link step. ThinLTO calls populateModulePassManager to load the profile Reviewers: tejohnson, davidxl, danielcdh Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D54564 llvm-svn: 346971
* [TTI] Reduction costs only need to include a single extract element costSimon Pilgrim2018-11-1515-1334/+1186
| | | | | | | | | | | | We were adding the entire scalarization extraction cost for reductions, which returns the total cost of extracting every element of a vector type. For reductions we don't need to do this - we just need to extract the 0'th element after the reduction pattern has completed. Fixes PR37731 Differential Revision: https://reviews.llvm.org/D54585 llvm-svn: 346970
* [AST] Store the string data in StringLiteral in a trailing array of charsBruno Ricci2018-11-155-154/+237
| | | | | | | | | | | | | | | | | | | | | | | | | Use the newly available space in the bit-fields of Stmt and store the string data in a trailing array of chars after the trailing array of SourceLocation. This cuts the size of StringLiteral by 2 pointers. Also refactor slightly StringLiteral::Create and StringLiteral::CreateEmpty so that StringLiteral::Create is just responsible for the allocation, and the constructor is responsible for doing all the initialization. This match what is done for the other classes in general. This patch should have no other functional changes apart from this. A concern was raised during review about the interaction between this patch and serialization abbreviations. I believe however that there is currently no abbreviation defined for StringLiteral. The only statements/expressions which have abbreviations are currently DeclRefExpr, IntegerLiteral, CharacterLiteral and ImplicitCastExpr. Differential Revision: https://reviews.llvm.org/D54166 Reviewed By: dblaikie, rjmccall llvm-svn: 346969
* [InstCombine] fix rotate narrowing bug for non-pow-2 typesSanjay Patel2018-11-152-18/+23
| | | | llvm-svn: 346968
* [AST][NFC] Various NFCs in StringLiteralBruno Ricci2018-11-152-41/+35
| | | | | | | | | | | | | Factored out of D54166 ([AST] Store the string data in StringLiteral in a trailing array of chars): * For-range loops in containsNonAscii and containsNonAsciiOrNull. * Comments and style fixes. * int -> unsigned in mapCharByteWidth since TargetInfo::getCharWidth and friends return an unsigned, and StringLiteral manipulates and stores CharByteWidth as an unsigned. llvm-svn: 346967
* [InstCombine] add rotate narrowing tests with odd types; NFCSanjay Patel2018-11-151-0/+46
| | | | | | | | | There's a potential miscompile here. It's unlikely in the real world because this transform is guarded with shouldChangeType(), but this test file doesn't include a standard data-layout for some reason (despite including a custom 1), so we can see the bug. llvm-svn: 346966
* [SLPVectorizer][X86] Regenerate reduction minmax tests and cleanup check ↵Simon Pilgrim2018-11-151-659/+272
| | | | | | prefixes llvm-svn: 346965
* [SLPVectorizer][X86] Regenerate reduction tests and add PR37731 testSimon Pilgrim2018-11-151-210/+196
| | | | | | Cleanup check prefixes llvm-svn: 346964
* [ELF] - Renamed few more AArch64 specific relocation expressions. NFC.George Rimar2018-11-154-17/+18
| | | | | | They are AArch64 only, so have to have AARCH64_* prefix. llvm-svn: 346963
* [X86] Fix MCNullStreamer support for modules with a CodeView flag Simon Pilgrim2018-11-152-10/+10
| | | | | | | | | | | | This fixes -filetype=null support when compiling for a Win32 target and the module has a CodeView flag. The only places changed are the uses of getTargetStreamer function - this patch guards both of them with null checks. Committed on behalf of @eush (Eugene Sharygin) Differential Revision: https://reviews.llvm.org/D54008 llvm-svn: 346962
* [clang-tidy] Update checks to play nicely with limited traversal scope added ↵Sam McCall2018-11-155-10/+20
| | | | | | | | | | | | | | in r346847 Summary: (See D54204 for original review) Reviewers: hokein Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D54579 llvm-svn: 346961
* [InstSimplify] delete shift-of-zero guard ops around funnel shiftsSanjay Patel2018-11-152-36/+56
| | | | | | | | | | | | | | | | | | | | | | | | This is a problem seen in common rotate idioms as noted in: https://bugs.llvm.org/show_bug.cgi?id=34924 Note that we are not canonicalizing standard IR (shifts and logic) to the intrinsics yet. (Although I've written this before...) I think this is the last step before we enable that transform. Ie, we could regress code by doing that transform without this simplification in place. In PR34924, I questioned whether this is a valid transform for target-independent IR, but I convinced myself this is ok. If we're speculating a funnel shift by turning cmp+br into select, then SimplifyCFG has already determined that the transform is justified. It's possible that SimplifyCFG is not taking into account profile or other metadata, but if that's true, then it's a bug independent of funnel shifts. Also, we do have CGP code to restore a guard like this around an intrinsic if it can't be lowered cheaply. But that isn't necessary for funnel shift because the default expansion in SelectionDAGBuilder includes this same cmp+select. Differential Revision: https://reviews.llvm.org/D54552 llvm-svn: 346960
* [RISCV] Mark C.EBREAK instruction as having side effectsAlex Bradbury2018-11-151-1/+1
| | | | | | | | | | | | | | | C.EBREAK was defined with hasSideEffects = 0, which is incorrect and inconsistent with the non-compressed instruction form. This patch corrects this oversight. This wouldn't cause codegen issues, as compressed instructions are only ever generated by converting the non-compressed form as an MCInst. But having correct flags is still worthwhile. Differential Revision: https://reviews.llvm.org/D54256 Patch by Luís Marques. llvm-svn: 346959
* [RISCV] Mark FREM as ExpandAlex Bradbury2018-11-153-1/+33
| | | | | | | | | | | | Mark the FREM SelectionDAG node as Expand, which is necessary in order to support the frem IR instruction on RISC-V. This is expanded into a library call. Adds the corresponding test. Previously, this would have triggered an assertion at instruction selection time. Differential Revision: https://reviews.llvm.org/D54159 Patch by Luís Marques. llvm-svn: 346958
* [AST][NFC] Re-add comment in BinaryOperator which was removed by r346954Bruno Ricci2018-11-151-0/+3
| | | | llvm-svn: 346957
* Start adding the supporting code to perform out-of-process allocatorDan Liew2018-11-154-9/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enumeration. Summary: This patch introduces the local portion (`LocalAddressSpaceView`) of the `AddressSpaceView` abstraction and modifies the secondary allocator so that the `ForEachChunk()` method (and its callees) would work in the out-of-process case when `AddressSpaceView` is `RemoteAddressSpaceView`. The `AddressSpaceView` abstraction simply maps pointers from a target process to a pointer in the local process (via its `Load()` method). For the local (in-process) case this is a no-op. For the remote (out-of-process) case this is not a no-op. The implementation of the out-of-process `RemoteAddressSpaceView` is not included in this patch and will be introduced later. This patch is considerably simpler than the `ObjectView` abstraction used in previous patches but lacks the type safety and stricter memory management of the `ObjectView` abstraction. This patch does not introduce any tests because with `LocalAddressSpaceView` it should be a non functional change and unit tests already cover the secondary allocator. When `RemoteAddressSpaceView` is landed tests will be added to ensure that it functions as expected. rdar://problem/45284065 Reviewers: kcc, kubamracek, dvyukov, vitalybuka, cryptoad, george.karpenkov, morehouse Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D53975 llvm-svn: 346956
* [clangd] global-symbol-builder => clangd-indexerHaojian Wu2018-11-151-1/+1
| | | | llvm-svn: 346955
* [AST] Pack BinaryOperatorBruno Ricci2018-11-152-32/+49
| | | | | | | | | | | Use the newly available space in the bit-fields of Stmt. This saves 8 bytes per BinaryOperator. Differential Revision: https://reviews.llvm.org/D54526 Reviewed By: dblaikie llvm-svn: 346954
* [AST] Pack MemberExprBruno Ricci2018-11-154-47/+71
| | | | | | | | | | | | Use the newly available space in the bit-fields of Stmt to store some data from MemberExpr. This saves one pointer per MemberExpr. Differential Revision: https://reviews.llvm.org/D54525 Reviewed By: dblaikie llvm-svn: 346953
* [AST][NFC] Move the friend decls to the top of MemberExprBruno Ricci2018-11-151-4/+4
| | | | | | | The norm is to have them at the top, and having them at the bottom is painful for the reader. llvm-svn: 346952
* [AST] Pack UnaryOperatorBruno Ricci2018-11-152-18/+33
| | | | | | | | | | | | Use the newly available space in the bit-fields of Stmt to store some data from UnaryOperator. This saves 8 bytes per UnaryOperator. Differential Revision: https://reviews.llvm.org/D54524 Reviewed By: dblaikie llvm-svn: 346951
* Fix warning about unused variable [NFC]Mikael Holmen2018-11-151-2/+2
| | | | llvm-svn: 346950
* Add missed files from prev. commitAnton Korobeynikov2018-11-1512-0/+1588
| | | | llvm-svn: 346949
* [MSP430] Add MC layerAnton Korobeynikov2018-11-1561-1309/+1740
| | | | | | | | | | | | | | Reapply r346374 with the fixes for modules build. Original summary: This change implements assembler parser, code emitter, ELF object writer and disassembler for the MSP430 ISA. Also, more instruction forms are added to the target description. Patch by Michael Skvortsov! llvm-svn: 346948
* [clangd] Fix no results returned for global symbols in dexpHaojian Wu2018-11-151-0/+4
| | | | | | | | | | | | | | Summary: For symbols in global namespace (without any scope), we need to add global scope "" to the fuzzy request. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54519 llvm-svn: 346947
* [llvm-objdump] Use `auto` declaration in typecastingXing GUO2018-11-151-16/+8
| | | | | | | | | | | | | | | | Summary: According to `MaskRay`, use `auto` for type inference, according to coding standards. Delete some comments, because these comments can be easily inferred from codes. Reviewers: jhenderson, MaskRay Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54573 llvm-svn: 346946
* Revert "Introduce shard storage to auto-index."Kadir Cetinkaya2018-11-153-233/+25
| | | | | | This reverts commit 6dd1f24aead10a8d375d0311001987198d26e900. llvm-svn: 346945
* Revert "clang-format"Kadir Cetinkaya2018-11-152-4/+4
| | | | | | This reverts commit 0a37e9c3d88a2e21863657df2f7735fb7e5f746e. llvm-svn: 346944
* Revert "Address comments"Kadir Cetinkaya2018-11-153-179/+142
| | | | | | This reverts commit 19a39b14eab2b5339325e276262b177357d6b412. llvm-svn: 346943
* Revert "Address comments."Kadir Cetinkaya2018-11-153-82/+148
| | | | | | This reverts commit b43c4d1c731e07172a382567f3146b3c461c5b69. llvm-svn: 346942
* Address comments.Kadir Cetinkaya2018-11-153-148/+82
| | | | llvm-svn: 346941
* Address commentsKadir Cetinkaya2018-11-153-142/+179
| | | | llvm-svn: 346940
* clang-formatKadir Cetinkaya2018-11-152-4/+4
| | | | llvm-svn: 346939
* Introduce shard storage to auto-index.Kadir Cetinkaya2018-11-153-25/+233
| | | | | | | | | | Reviewers: sammccall, ioeric Subscribers: ilya-biryukov, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54269 llvm-svn: 346938
* [RISCV] Introduce the RISCVMatInt::generateInstSeq helperAlex Bradbury2018-11-156-89/+149
| | | | | | | | | | | | | | | | | | | | | Logic to load 32-bit and 64-bit immediates is currently present in RISCVAsmParser::emitLoadImm in order to support the li pseudoinstruction. With the introduction of RV64 codegen, there is a greater benefit of sharing immediate materialisation logic between the MC layer and codegen. The generateInstSeq helper allows this by producing a vector of simple structs representing the chosen instructions. This can then be consumed in the MC layer to produce MCInsts or at instruction selection time to produce appropriate SelectionDAG node. Sharing this logic means that both the li pseudoinstruction and codegen can benefit from future optimisations, and that this logic can be used for materialising constants during RV64 codegen. This patch does contain a behaviour change: addi will now be produced on RV64 when no lui is necessary to materialise the constant. In that case addiw takes x0 as the source register, so is semantically identical to addi. Differential Revision: https://reviews.llvm.org/D52961 llvm-svn: 346937
* [X86] Add some custom type legalization rules for truncate with ↵Craig Topper2018-11-159-772/+388
| | | | | | | | -x86-experimental-vector-widening-legalization. This avoids some nasty shuffles when we have avx512. It will also prevent using zmm truncate instructions when a ymm instruction that zeroes part of an xmm register will do. Also avoid using avx512 truncate instructions when the input is 128 bits or less. These instructions are 2 uops on skx so we can probably find a better single uop shuffle like pshufb. llvm-svn: 346936
* [X86] Add -x86-experimental-vector-widening-legalization versions of ↵Craig Topper2018-11-153-0/+2787
| | | | | | shuffle-vs-trunc tests. llvm-svn: 346935
* [ELF] Fix compilation with GCC 5Martin Storsjo2018-11-151-1/+1
| | | | | | | | | | | | | | | | | | Remove the default initializer for TrapInstr; all subclasses overwrite the defaults in their constructors anyway. This fixes compilation errors like these, with GCC 5.4 on Ubuntu 16.04, present since SVN r346893: In file included from ../tools/lld/ELF/Arch/AArch64.cpp:12:0: ../tools/lld/ELF/Target.h:125:49: error: array must be initialized with a brace-enclosed initializer std::array<uint8_t, 4> TrapInstr = {0, 0, 0, 0}; ^ ../tools/lld/ELF/Target.h:125:49: error: too many initializers for ‘std::array<unsigned char, 4ul>’ Differential Revision: https://reviews.llvm.org/D54569 llvm-svn: 346934
OpenPOWER on IntegriCloud