summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* docs: Fix section header committed in r264575Tobias Grosser2016-03-281-1/+1
| | | | | | | | | | | Ensure the length of the header underline matches the length of the header. This prevents SPHINX from erroring on this file and consequently not updating the documentation. Also, make this its own point not belonging to the 'increased applicability' section. llvm-svn: 264592
* [llvm-size] Implement --common optionHemant Kulkarni2016-03-282-0/+54
| | | | | | Differential Revision: http://reviews.llvm.org/D16820 llvm-svn: 264591
* Revert "[PGO] Fix name encoding for ObjC-like functions"Vedant Kumar2016-03-283-7/+4
| | | | | | | | | This reverts commit r264587. Reverting to investigate 6 unexpected failures on the ppc bot: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2822 llvm-svn: 264590
* AMDGPU/SI: Limit load clustering to 16 bytes instead of 4 instructionsTom Stellard2016-03-284-16/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This helps prevent load clustering from drastically increasing register pressure by trying to cluster 4 SMRDx8 loads together. The limit of 16 bytes was chosen, because it seems like that was the original intent of setting the limit to 4 instructions, but more analysis could show that a different limit is better. This fixes yields small decreases in register usage with shader-db, but also helps avoid a large increase in register usage when lane mask tracking is enabled in the machine scheduler, because lane mask tracking enables more opportunities for load clustering. shader-db stats: 2379 shaders in 477 tests Totals: SGPRS: 49744 -> 48600 (-2.30 %) VGPRS: 34120 -> 34076 (-0.13 %) Code Size: 1282888 -> 1283184 (0.02 %) bytes LDS: 28 -> 28 (0.00 %) blocks Scratch: 495616 -> 492544 (-0.62 %) bytes per wave Max Waves: 6843 -> 6853 (0.15 %) Wait states: 0 -> 0 (0.00 %) Reviewers: nhaehnle, arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18451 llvm-svn: 264589
* [SimplifyLibCalls] Transform printf("%s", "a") -> putchar('a').Davide Italiano2016-03-282-0/+30
| | | | llvm-svn: 264588
* [PGO] Fix name encoding for ObjC-like functionsVedant Kumar2016-03-283-4/+7
| | | | | | | | | | | | | | Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and update a test. I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded). Differential Revision: http://reviews.llvm.org/D18516 llvm-svn: 264587
* [Coverage] Strip <unknown> from PGO names if no filenames are availableVedant Kumar2016-03-284-7/+12
| | | | | | Patch suggested by David Li! llvm-svn: 264586
* [LTO] Internalize symbols.Davide Italiano2016-03-284-1/+49
| | | | | | | | | | | IPO doesn't work very well across symbols referenced by others TUs. The linker here tries to evaluate which symbols are safe to internalize and switches their linkage. Differential Revision: http://reviews.llvm.org/D18415 llvm-svn: 264585
* [Hexagon] Improve handling of unaligned vector loads and storesKrzysztof Parzyszek2016-03-286-56/+187
| | | | llvm-svn: 264584
* NFC: skip FenceInst up-front in AtomicExpandPass.James Y Knight2016-03-281-5/+5
| | | | llvm-svn: 264583
* Reduce size of DefinitionData from 120 to 96 bytes on Windows.Nico Weber2016-03-281-37/+37
| | | | | | | | | | In the Microsoft ABI, only bitfields with identical types get packed together, so use unsigned consistently instead of a bool / unsigned mix. No intended behavior change. llvm-svn: 264582
* [Hexagon] Only use restore functions for single register at -OzKrzysztof Parzyszek2016-03-282-0/+53
| | | | llvm-svn: 264581
* [Hexagon] Speed up frame lowering when no optimizations are enabledKrzysztof Parzyszek2016-03-282-24/+35
| | | | | | | | - Do not optimize stack slots in optnone functions. - Get aligned-base register from HexagonMachineFunctionInfo instead of looking for ALIGNA instruction in the function's body. llvm-svn: 264580
* Sparc: silently ignore .proc assembler directiveDouglas Katzman2016-03-282-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D18463 llvm-svn: 264579
* [lanai] Add Lanai backend.Jacques Pienaar2016-03-2887-8/+12430
| | | | | | | | | | Add the Lanai backend to lib/Target. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html). Differential Revision: http://reviews.llvm.org/D17011 llvm-svn: 264578
* Revert "[OPENMP] Allow runtime insert its own code inside OpenMP regions."Alexey Bataev2016-03-2810-601/+506
| | | | | | Reverting because of failed tests. llvm-svn: 264577
* [OPENMP] Allow runtime insert its own code inside OpenMP regions.Alexey Bataev2016-03-2810-506/+601
| | | | | | | | | | Solution unifies interface of RegionCodeGenTy type to allow insert runtime-specific code before/after main codegen action defined in CGStmtOpenMP.cpp file. Runtime should not define its own RegionCodeGenTy for general OpenMP directives, but must be allowed to insert its own (required) code to support target specific codegen. llvm-svn: 264576
* Add fine-grain dependences analysis to release notes.Hongbin Zheng2016-03-286-10/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D17905 llvm-svn: 264575
* [CLANG][avx512][BUILTIN] Adding fixupimm{pd|ps|sd|ss}Michael Zuckerman2016-03-289-0/+1234
| | | | | | | | | getexp{sd|ss} getmant{sd|ss} kunpck{di|si} loada{pd|ps} loaddqu{di|hi|qi|si} max{sd|ss} min{sd|ss} kmov16 builtins to clang Differential Revision: http://reviews.llvm.org/D18215 llvm-svn: 264574
* [SROA] Fix typo in commentHal Finkel2016-03-281-1/+1
| | | | llvm-svn: 264573
* C++11 is required, remove some preprocessor checks for itHal Finkel2016-03-282-4/+4
| | | | | | | We require C++11 to build, so remove a few remaining preprocessor checks for '__cplusplus >= 201103L'. This should always be true. llvm-svn: 264572
* Fix-up for OS X test failure after r264451 ("Add memset, memmove, and memcpy ↵Kuba Brecka2016-03-281-1/+1
| | | | | | to the common interceptors") llvm-svn: 264571
* Revert "[OPENMP] Allow runtime insert its own code inside OpenMP regions."Alexey Bataev2016-03-2810-538/+456
| | | | | | This reverts commit 3ee791165100607178073f14531a0dc90c622b36. llvm-svn: 264570
* [OPENMP] Allow runtime insert its own code inside OpenMP regions.Alexey Bataev2016-03-2810-456/+538
| | | | | | | | | | Solution unifies interface of RegionCodeGenTy type to allow insert runtime-specific code before/after main codegen action defined in CGStmtOpenMP.cpp file. Runtime should not define its own RegionCodeGenTy for general OpenMP directives, but must be allowed to insert its own (required) code to support target specific codegen. llvm-svn: 264569
* [Power9] Implement new altivec instructions: bcd* seriesChuang-Yu Cheng2016-03-285-0/+212
| | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the following altivec instructions: - Decimal Convert From/to National/Zoned/Signed-QWord: bcdcfn. bcdcfz. bcdctn. bcdctz. bcdcfsq. bcdctsq. - Decimal Copy-Sign/Set-Sign: bcdcpsgn. bcdsetsgn. - Decimal Shift/Unsigned-Shift/Shift-and-Round: bcds. bcdus. bcdsr. - Decimal (Unsigned) Truncate: bcdtrunc. bcdutrunc. Total 13 instructions Thanks Amehsan's advice! Thanks Kit's great help! Reviewers: hal, nemanja, kbarton, tjablin, amehsan http://reviews.llvm.org/D17838 llvm-svn: 264568
* [Power9] Implement new vsx instructions: insert, extract, test data class, ↵Chuang-Yu Cheng2016-03-289-0/+555
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | min/max, reverse, permute, splat This change implements the following vsx instructions: - Scalar Insert/Extract xsiexpdp xsiexpqp xsxexpdp xsxsigdp xsxexpqp xsxsigqp - Vector Insert/Extract xviexpdp xviexpsp xvxexpdp xvxexpsp xvxsigdp xvxsigsp xxextractuw xxinsertw - Scalar/Vector Test Data Class xststdcdp xststdcsp xststdcqp xvtstdcdp xvtstdcsp - Maximum/Minimum xsmaxcdp xsmaxjdp xsmincdp xsminjdp - Vector Byte-Reverse/Permute/Splat xxbrd xxbrh xxbrq xxbrw xxperm xxpermr xxspltib 30 instructions Thanks Nemanja for invaluable discussion! Thanks Kit's great help! Reviewers: hal, nemanja, kbarton, tjablin, amehsan http://reviews.llvm.org/D16842 llvm-svn: 264567
* AVX-512: Fixed ICMP instruction selection for i1 operandsElena Demikhovsky2016-03-282-26/+120
| | | | | | | | | | ICMP instruction selection fails on SKX and KNL for i1 operand. I use XOR to resolve: (A == B) is equivalent to (A xor B) == 0 Differential Revision: http://reviews.llvm.org/D18511 llvm-svn: 264566
* [Power9] Implement new vsx instructions: quad-precision move, fp-arithmeticChuang-Yu Cheng2016-03-284-0/+311
| | | | | | | | | | | | | | | | | | | | This change implements the following vsx instructions: - quad-precision move xscpsgnqp, xsabsqp, xsnegqp, xsnabsqp - quad-precision fp-arithmetic xsaddqp(o) xsdivqp(o) xsmulqp(o) xssqrtqp(o) xssubqp(o) xsmaddqp(o) xsmsubqp(o) xsnmaddqp(o) xsnmsubqp(o) 22 instructions Thanks Nemanja and Kit for careful review and invaluable discussion! Reviewers: hal, nemanja, kbarton, tjablin, amehsan http://reviews.llvm.org/D16110 llvm-svn: 264565
* P0138R2: Allow direct-list-initialization of an enumeration from an integralRichard Smith2016-03-284-16/+192
| | | | | | value that can convert to the enum's underlying type. llvm-svn: 264564
* clang-tidy: Fix broken buildbotRichard Thomson2016-03-281-4/+6
| | | | | | VS 2013 does not support char16_t or char32_t llvm-svn: 264563
* Fix serialization/deserialization for __uuidofDavid Majnemer2016-03-288-19/+30
| | | | | | | | I broke this back in r264529 because I forgot to serialize the UuidAttr member. Fix this by replacing the UuidAttr with a StringRef which is properly serialized and deserialized. llvm-svn: 264562
* llvm/test/Transforms/FunctionImport/funcimport.ll: -stats REQUIRES +Asserts.NAKAMURA Takumi2016-03-281-0/+2
| | | | llvm-svn: 264561
* R_AARCH64_PREL64 is relative.Rafael Espindola2016-03-282-1/+2
| | | | llvm-svn: 264560
* [Coverage] Fix the way we load "<unknown>:func" recordsVedant Kumar2016-03-282-1/+16
| | | | | | | | | When emitting coverage mappings for functions with local linkage and an unknown filename, we use "<unknown>:func" for the PGO function name. The problem is that we don't strip "<unknown>" from the name when loading coverage data, like we do for other file names. Fix that and add a test. llvm-svn: 264559
* BitcodeWriter: Replace dead code with an assertion, NFCDuncan P. N. Exon Smith2016-03-281-7/+1
| | | | | | | The caller of ValueEnumerator::EnumerateOperandType never sends in metadata. Assert that, and remove the unnecessary logic. llvm-svn: 264558
* BitcodeWriter: Reuse writeMetadataRecords, NFCDuncan P. N. Exon Smith2016-03-271-5/+2
| | | | | | | | Change writeFunctionMetadata to call writeMetadataRecords. For now there's no functionality change, but makes it easy to serialize other types of metadata in the function block in the future. llvm-svn: 264557
* BitcodeWriter: Rename some functions for consistency, NFCDuncan P. N. Exon Smith2016-03-271-35/+34
| | | | | | | | | | | | | | | | To match writeMetadataRecords, writeNamedMetadata and writeMetadataStrings, change: WriteModuleMetadata => writeModuleMetadata WriteFunctionLocalMetadata => writeFunctionMetadata Write##CLASS => write##CLASS The only major change is "FunctionLocal" => "Function". The point is to be less specific, in preparation for emitting normal metadata records inside function metadata blocks (currently we only emit `LocalAsMetadata` there). llvm-svn: 264556
* BitcodeWriter: Split out writeMetadataRecords, NFCDuncan P. N. Exon Smith2016-03-271-9/+17
| | | | | | | Besides being a nice cleanup, this is preparation for reusing the code in function metadata blocks. llvm-svn: 264555
* BitcodeWriter: Restructure WriteFunctionLocalMetadata, NFCDuncan P. N. Exon Smith2016-03-271-11/+9
| | | | | | Use an early return to simplify logic. llvm-svn: 264554
* Bitcode: Fix MSVC bot failure from r264549Duncan P. N. Exon Smith2016-03-271-2/+3
| | | | | | make_unique => llvm::make_unique llvm-svn: 264553
* BitcodeWriter: Simplify tracking of function-local metadata, NFCDuncan P. N. Exon Smith2016-03-273-12/+5
| | | | | | | | We don't really need a separate vector here; instead, point at a range inside the main MDs array. This matches how r264551 references the ranges of strings and non-strings. llvm-svn: 264552
* Reapply ~"Bitcode: Collect all MDString records into a single blob"Duncan P. N. Exon Smith2016-03-277-36/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spiritually reapply commit r264409 (reverted in r264410), albeit with a bit of a redesign. Firstly, avoid splitting the big blob into multiple chunks of strings. r264409 imposed an arbitrary limit to avoid a massive allocation on the shared 'Record' SmallVector. The bug with that commit only reproduced when there were more than "chunk-size" strings. A test for this would have been useless long-term, since we're liable to adjust the chunk-size in the future. Thus, eliminate the motivation for chunk-ing by storing the string sizes in the blob. Here's the layout: vbr6: # of strings vbr6: offset-to-blob blob: [vbr6]: string lengths [char]: concatenated strings Secondly, make the output of llvm-bcanalyzer readable. I noticed when debugging r264409 that llvm-bcanalyzer was outputting a massive blob all in one line. Past a small number, the strings were impossible to split in my head, and the lines were way too long. This version adds support in llvm-bcanalyzer for pretty-printing. <STRINGS abbrevid=4 op0=3 op1=9/> num-strings = 3 { 'abc' 'def' 'ghi' } From the original commit: Inspired by Mehdi's similar patch, http://reviews.llvm.org/D18342, this should (a) slightly reduce bitcode size, since there is less record overhead, and (b) greatly improve reading speed, since blobs are super cheap to deserialize. llvm-svn: 264551
* BitcodeWriter: Simplify and test writing blobs, NFCDuncan P. N. Exon Smith2016-03-273-23/+88
| | | | | | | | | Split helper out of EmitRecordWithAbbrevImpl called emitBlob to reduce code duplication, and add a few tests for it. No functionality change intended. llvm-svn: 264550
* Support: Implement StreamingMemoryObject::getPointerDuncan P. N. Exon Smith2016-03-277-17/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation is fairly obvious. This is preparation for using some blobs in bitcode. For clarity (and perhaps future-proofing?), I moved the call to JumpToBit in BitstreamCursor::readRecord ahead of calling MemoryObject::getPointer, since JumpToBit can theoretically (a) read bytes, which (b) invalidates the blob pointer. This isn't strictly necessary the two memory objects we have: - The return of RawMemoryObject::getPointer is valid until the memory object is destroyed. - StreamingMemoryObject::getPointer is valid until the next chunk is read from the stream. Since the JumpToBit call is only going ahead to a word boundary, we'll never load another chunk. However, reordering makes it clear by inspection that the blob returned by BitstreamCursor::readRecord will be valid. I added some tests for StreamingMemoryObject::getPointer and BitstreamCursor::readRecord. llvm-svn: 264549
* Support: Move StreamingMemoryObject{,Test}.cpp, NFCDuncan P. N. Exon Smith2016-03-272-10/+13
| | | | | | | | Change the filename to indicate this is a test, rename the tests, move them into an anonymous namespace, and rename some variables. All to match our usual style before making further changes. llvm-svn: 264548
* Bitcode: Add SimpleBitstreamCursor::setArtificialByteLimitDuncan P. N. Exon Smith2016-03-272-1/+92
| | | | | | | | | Allow users of SimpleBitstreamCursor to limit the number of bytes available to the cursor. This is preparation for instantiating a cursor that isn't allowed to load more bytes from a StreamingMemoryObject (just move around the ones already-loaded). llvm-svn: 264547
* Bitcode: Add SimpleBitstreamCursor::getPointerToByte, etc.Duncan P. N. Exon Smith2016-03-273-3/+79
| | | | | | | | | | | | | | | Add API to SimpleBitstreamCursor to allow users to translate between byte addresses and pointers. - jumpToPointer: move the bit position to a particular pointer. - getPointerToByte: get the pointer for a particular byte. - getPointerToBit: get the pointer for the byte of the current bit. - getCurrentByteNo: convenience function for assertions and tests. Mainly adds unit tests (getPointerToBit/Byte already has a use), but also preparation for eventually using jumpToPointer. llvm-svn: 264546
* Bitcode: Split out SimpleBitstreamCursorDuncan P. N. Exon Smith2016-03-272-144/+165
| | | | | | | | | | | Split out SimpleBitstreamCursor from BitstreamCursor, which is a lower-level cursor with no knowledge of bitcode blocks, abbreviations, or records. It just knows how to read bits and navigate the stream. This is mainly organizational, to separate the API for manipulating raw bits from that for bitcode concepts like Record and Block. llvm-svn: 264545
* Revert "isPodLike: more precise"JF Bastien2016-03-271-13/+9
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit c45f2afac5d6855a4804456a0f718563dc47ada0. Looks like it may be causing a failure, I'll revert for now. from lib/CodeGen/AsmPrinter/DwarfDebug.cpp:14: /usr/include/c++/4.9.2/bits/stl_pair.h: In instantiation of 'std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) [with _T1 = std::unique_ptr<llvm::DwarfTypeUnit>; _T2 = const llvm::DICompositeType*]': /usr/include/c++/4.9.2/bits/stl_pair.h:160:8: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = llvm::DwarfTypeUnit; _Dp = std::default_delete<llvm::DwarfTypeUnit>]' first = __p.first; ^ llvm-svn: 264544
* workaround for an IR variable named %.Sanjay Patel2016-03-271-0/+2
| | | | | | (which SimplifyCFG can produce...) llvm-svn: 264543
OpenPOWER on IntegriCloud