summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Split Writer::createSections().Rui Ueyama2015-12-251-21/+26
| | | | | | | | This function was longer than 250 lines, which is way too long in my own standard. This patch reduces the size. It is still too long, but this patch should be toward the right direction. llvm-svn: 256411
* Move a function to a file where it is used.Rui Ueyama2015-12-253-12/+10
| | | | llvm-svn: 256410
* Add comments.Rui Ueyama2015-12-251-0/+8
| | | | llvm-svn: 256409
* Factor out static members from DefinedRegular.Rui Ueyama2015-12-255-47/+43
| | | | | | | | This patch moves statically-allocated Elf_Sym objects out of DefinedRegular class, so that the class definition becomes smaller. llvm-svn: 256408
* Include IR/DerivedTypes.h instead of IR/Type.h so to match llvm change r256406.Craig Topper2015-12-251-1/+1
| | | | llvm-svn: 256407
* [IR] Mark the Type subclass helper methods 'inline' and move their ↵Craig Topper2015-12-253-60/+55
| | | | | | definitions to DerivedTypes.h so they can be inlined by the compiler. llvm-svn: 256406
* [Transforms] Use asserts instead of ifs around llvm_unreachable. NFCCraig Topper2015-12-251-34/+20
| | | | llvm-svn: 256405
* Simplify. NFC.Rafael Espindola2015-12-251-2/+1
| | | | llvm-svn: 256404
* Revert r256399 "[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC"Craig Topper2015-12-257-23/+26
| | | | | | It broke lldb build. llvm-svn: 256403
* [WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.Dan Gohman2015-12-256-67/+111
| | | | | | | | | | | | | Move RegStackify after coalescing and teach it to use LiveIntervals instead of depending on SSA form. This avoids a problem where a register in a COPY instruction is stackified and then subsequently coalesced with a register that is not stackified. This also puts it after the scheduler, which allows us to simplify the EXPR_STACK constraint, as we no longer have instructions being reordered after stackification and before coloring. llvm-svn: 256402
* [Sema] ArrayRef-ize SubstExprs. NFCCraig Topper2015-12-243-6/+7
| | | | llvm-svn: 256401
* [Sema] ArrayRef-ize ActOnTemplateParameterList. NFCCraig Topper2015-12-245-14/+12
| | | | llvm-svn: 256400
* [Sema] ArrayRef-ize ActOnBaseSpecifiers. NFCCraig Topper2015-12-247-26/+23
| | | | llvm-svn: 256399
* [Sema] ArrayRef-ize BuildObjCDictionaryLiteral. NFCCraig Topper2015-12-244-23/+19
| | | | llvm-svn: 256398
* [Sema] ArrayRef-ize ParseObjCStringLiteral and ↵Craig Topper2015-12-244-25/+17
| | | | | | CodeCompleteObjCProtocolReferences. NFC llvm-svn: 256397
* Some minor correction based on David Blaikie post-commit code review for ↵Ekaterina Romanova2015-12-242-4/+3
| | | | | | r255281. llvm-svn: 256396
* fix test that depends on LLVM optimizationsSanjay Patel2015-12-241-1/+4
| | | | llvm-svn: 256395
* [InstCombine] transform more extract/insert pairs into shuffles (PR2109)Sanjay Patel2015-12-242-19/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an extension of the shuffle combining from r203229: http://reviews.llvm.org/rL203229 The idea is to widen a short input vector with undef elements so the existing shuffle transform for extract/insert can kick in. The motivation is to finally solve PR2109: https://llvm.org/bugs/show_bug.cgi?id=2109 For that example, the IR becomes: %1 = bitcast <2 x i32>* %P to <2 x float>* %ld1 = load <2 x float>, <2 x float>* %1, align 8 %2 = shufflevector <2 x float> %ld1, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> %i2 = shufflevector <4 x float> %A, <4 x float> %2, <4 x i32> <i32 0, i32 1, i32 4, i32 5> ret <4 x float> %i2 And x86 SSE output improves from: movq (%rdi), %xmm1 ## xmm1 = mem[0],zero movdqa %xmm1, %xmm2 shufps $229, %xmm2, %xmm2 ## xmm2 = xmm2[1,1,2,3] shufps $48, %xmm0, %xmm1 ## xmm1 = xmm1[0,0],xmm0[3,0] shufps $132, %xmm1, %xmm0 ## xmm0 = xmm0[0,1],xmm1[0,2] shufps $32, %xmm0, %xmm2 ## xmm2 = xmm2[0,0],xmm0[2,0] shufps $36, %xmm2, %xmm0 ## xmm0 = xmm0[0,1],xmm2[2,0] retq To the almost optimal: movhpd (%rdi), %xmm0 Note: There's a tension in the existing transform related to generating arbitrary shufflevector masks. We avoid that in other places in InstCombine because we're scared that codegen can't handle strange masks, but it looks like we're ok with producing those here. I purposely chose weird insert/extract indexes for the regression tests to see the effect in these cases. For PowerPC+Altivec, AArch64, and X86+SSE/AVX, I think the codegen is equal or better for these examples. Differential Revision: http://reviews.llvm.org/D15096 llvm-svn: 256394
* use auto for obvious type; NFCSanjay Patel2015-12-241-1/+1
| | | | llvm-svn: 256393
* Update the recorded CIE length when aligning.Rafael Espindola2015-12-242-7/+71
| | | | | | We cannot just pad with 0s as that would be a terminator mark. llvm-svn: 256392
* [power] Fix test case target checksBill Seurer2015-12-241-1/+1
| | | | | | | Several test cases that used to fail on both power LE and BE now run correctly on LE. llvm-svn: 256391
* Fix signed/unsigned warning in Line.h.Dave Bartolomeo2015-12-241-2/+2
| | | | llvm-svn: 256390
* Remove unused constants from TypeTableBuilder.cpp.Dave Bartolomeo2015-12-241-4/+0
| | | | llvm-svn: 256389
* Fix case of path nameBill Seurer2015-12-241-1/+1
| | | | llvm-svn: 256388
* Fix CodeView library name and non-CMake buildsDave Bartolomeo2015-12-243-4/+21
| | | | llvm-svn: 256387
* Fix initializer order warning in TypeRecord.hDave Bartolomeo2015-12-241-2/+2
| | | | llvm-svn: 256386
* LLVM CodeView libraryDave Bartolomeo2015-12-2425-2/+2080
| | | | | | | | | | | | | | | | | | Summary: This diff is the initial implementation of the LLVM CodeView library. There is much more work to be done, namely a CodeView dumper and tests. This patch should help others make progress on the LLVM->CodeView debug info emission while I continue with the implementation of the dumper and tests. This library implements support for emitting debug info in the CodeView format. This phase of the implementation only includes support for CodeView type records. Clients that need to emit type records will use a class derived from TypeTableBuilder. TypeTableBuilder provides member functions for writing each kind of type record; each of these functions eventually calls the writeRecord virtual function to emit the actual bits of the record. Derived classes override writeRecord to implement the folding of duplicate records and the actual emission to the appropriate destination. LLVMCodeView provides MemoryTypeTableBuilder, which creates the table in memory. In the future, other classes derived from TypeTableBuilder will write to other destinations, such as the type stream in a PDB. The rest of the types in LLVMCodeView define the actual CodeView type records and all of the supporting enums and other types used in the type records. The TypeIndex class is of particular interest, because it is used by clients as a handle to a type in the type table. The library provides a relatively low-level interface based on the actual on-disk format of CodeView. For example, type records refer to other type records by TypeIndex, rather than by an actual pointer to the referent record. This allows clients to emit type records one at a time, rather than having to keep the entire transitive closure of type records in memory until everything has been emitted. At some point, having a higher-level interface layered on top of this one may be useful for debuggers and other tools that want a more holistic view of the debug info. The lower-level interface should be sufficient for compilers and linkers to do the debug info manipulation that they need to do efficiently. Reviewers: rnk, majnemer Subscribers: silvas, rnk, jevinskie, llvm-commits Differential Revision: http://reviews.llvm.org/D14961 llvm-svn: 256385
* Make it possible to create common symbols from bitcode.Rafael Espindola2015-12-245-29/+35
| | | | | | | Since the only missing bit was the size, I just replaced the Elf_Sym with the size. llvm-svn: 256384
* Delete DefinedAbsolute.Rafael Espindola2015-12-249-82/+69
| | | | | | | | | | | | | | | | | | | | There are 3 symbol types that a .bc can provide during lto: defined, undefined, common. Defined and undefined symbols have already been refactored. I was working on common and noticed that absolute symbols would become an oddity: They would be the only symbol type present in a .o but not in a.bc. Looking a bit more, other than the special section number they were only used for special rules for computing values. In that way they are similar to TLS, and we don't have a DefinedTLS. This patch deletes it. With it we have a reasonable rule of the thumb for having a symbol kind: It exists if it has special resolution semantics. llvm-svn: 256383
* [X86][ms-inline asm] Test case for adding support for memory operands that ↵Marina Yatsina2015-12-241-0/+32
| | | | | | | | | | include structs Test case for commit 256381 Differential Revision: http://reviews.llvm.org/D15749 llvm-svn: 256382
* [X86][ms-inline asm] Add support for memory operands that include structsMarina Yatsina2015-12-241-1/+5
| | | | | | | | | Add ability to reference struct symbols in memory operands. Test case will be added on the clang side (review http://reviews.llvm.org/D15749) Differential Revision: http://reviews.llvm.org/D15748 llvm-svn: 256381
* Add comments.Rui Ueyama2015-12-241-0/+3
| | | | llvm-svn: 256380
* Remove `continue` to make the code a bit shorter. NFC.Rui Ueyama2015-12-241-8/+5
| | | | llvm-svn: 256379
* Mark .eh_frame sections as live by default. NFC.Rui Ueyama2015-12-242-5/+6
| | | | | | | This change eliminates a string comparison from the garbage collector. llvm-svn: 256378
* Replace llvm::utostr calls in Twine context with Twines. NFC.Benjamin Kramer2015-12-242-3/+3
| | | | llvm-svn: 256377
* [README] Update to reflect the new world order.Davide Italiano2015-12-241-1/+2
| | | | llvm-svn: 256376
* [ProfileData] Make helper function static.Benjamin Kramer2015-12-241-1/+1
| | | | | | No functional change. llvm-svn: 256375
* [FunctionImport] Move pass into anonymous namespace.Benjamin Kramer2015-12-241-0/+2
| | | | | | No functional change. llvm-svn: 256374
* [ELF] Don't reclaim .ctors/.dtors sections.Davide Italiano2015-12-242-1/+14
| | | | | | | | | | | | | | | | | | In FreeBSD, rtld expects .ctors containing -1 (0xffffffff), and a .ctors section containing the correct bits is provided to the linker as input (/usr/lib/crtbegin.o). Contents of section .ctors: 0000 ffffffff ffffffff ........ This section is not stripped even if not referenced or empty, also in gold or ld.bfd. It would be nice to strip it when not needed but since existing object files rely on that we can't do better to keep it around. Differential Revision: http://reviews.llvm.org/D15767 llvm-svn: 256373
* Add a comment.Rui Ueyama2015-12-241-0/+3
| | | | llvm-svn: 256372
* Add a missing const qualifier on the context instruction. This somehowChandler Carruth2015-12-242-2/+2
| | | | | | has always been missing. =/ llvm-svn: 256371
* Remove unnecessary explicit instantiation.Rui Ueyama2015-12-241-1/+1
| | | | llvm-svn: 256370
* Split functions and add comments. NFC.Rui Ueyama2015-12-243-19/+37
| | | | llvm-svn: 256369
* Make a member function non-member. NFC.Rui Ueyama2015-12-241-14/+13
| | | | llvm-svn: 256368
* Return early and remove a redundant error check. NFC.Rui Ueyama2015-12-241-9/+6
| | | | llvm-svn: 256367
* [X86][PKU] Add {RD,WR}PKRU encodingAsaf Badouh2015-12-245-12/+34
| | | | | | Differential Revision: http://reviews.llvm.org/D15711 llvm-svn: 256366
* AVX-512: Kreg set 0/1 optimizationElena Demikhovsky2015-12-244-66/+88
| | | | | | | | | | | | | | | | | The patterns that set a mask register to 0/1 KXOR %kn, %kn, %kn / KXNOR %kn, %kn, %kn are replaced with KXOR %k0, %k0, %kn / KXNOR %k0, %k0, %kn - AVX-512 targets optimization. KNL does not recognize dependency-breaking idioms for mask registers, so kxnor %k1, %k1, %k2 has a RAW dependence on %k1. Using %k0 as the undef input register is a performance heuristic based on the assumption that %k0 is used less frequently than the other mask registers, since it is not usable as a write mask. Differential Revision: http://reviews.llvm.org/D15739 llvm-svn: 256365
* AVX512: VPMOVM2B/W/D/Q intrinsic implementation.Igor Breger2015-12-247-49/+254
| | | | | | Differential Revision: http://reviews.llvm.org//D15747 llvm-svn: 256364
* Use range-based for loops. NFCCraig Topper2015-12-241-40/+32
| | | | llvm-svn: 256363
* AMDGPU: Fix getRegisterBitWidth for vectorsMatt Arsenault2015-12-241-1/+3
| | | | llvm-svn: 256362
OpenPOWER on IntegriCloud