summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [Hexagon] Converting multiply and accumulate with immediate intrinsics to ↵Colin LeMahieu2015-01-212-0/+141
| | | | | | patterns. llvm-svn: 226681
* [X86] Declare SSE4.1/AVX2 vector extloads covered by PMOV[SZ]X legal.Ahmed Bougacha2015-01-215-15/+74
| | | | | | | | | | | | | | | | | | Now that we can fully specify extload legality, we can declare them legal for the PMOVSX/PMOVZX instructions. This for instance enables a DAGCombine to fire on code such as (and (<zextload-equivalent> ...), <redundant mask>) to turn it into: (zextload ...) as seen in the testcase changes. There is one regression, in widen_load-2.ll: we're no longer able to do store-to-load forwarding with illegal extload memory types. This will be addressed separately. Differential Revision: http://reviews.llvm.org/D6533 llvm-svn: 226676
* [lit] Format JSONMetricValue strings better.Eric Fiselier2015-01-211-1/+2
| | | | llvm-svn: 226672
* Fixed a bug with how we determine bitset indices.George Burgess IV2015-01-211-1/+1
| | | | llvm-svn: 226671
* Add missing include guards to WindowsSupport.h.Yaron Keren2015-01-211-0/+5
| | | | llvm-svn: 226669
* Revert "DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))"Tim Northover2015-01-214-68/+16
| | | | | | | | It hadn't gone through review yet, but was still on my local copy. This reverts commit r226663 llvm-svn: 226665
* AArch64: add backend option to reserve x18 (platform register)Tim Northover2015-01-212-10/+15
| | | | | | | | | AAPCS64 says that it's up to the platform to specify whether x18 is reserved, and a first step on that way is to add a flag controlling it. From: Andrew Turner <andrew@fubar.geek.nz> llvm-svn: 226664
* DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))Tim Northover2015-01-214-16/+68
| | | | llvm-svn: 226663
* [x32] Fast ISel should use LEA64_32r instead of LEA32r to adjust addresses ↵Michael Kuperstein2015-01-212-2/+18
| | | | | | in x32 mode. llvm-svn: 226661
* Use a smaller pragma unroll threshold to reduce test execution time.Alexander Potapenko2015-01-211-2/+2
| | | | | | | When opt is compiled with AddressSanitizer it takes more than 30 seconds to unroll the loop in unroll_1M(). llvm-svn: 226660
* [msan] Update origin for the entire destination range on memory store.Evgeniy Stepanov2015-01-212-9/+138
| | | | | | | | | Previously we always stored 4 bytes of origin at the destination address even for 8-byte (and longer) stores. This should fix rare missing, or incorrect, origin stacks in MSan reports. llvm-svn: 226658
* [mips][microMIPS] MicroMIPS 16-bit unconditional branch instruction BJozef Kolek2015-01-2118-35/+202
| | | | | | | | | | | | | | Implement microMIPS 16-bit unconditional branch instruction B. Implemented 16-bit microMIPS unconditional instruction has real name B16, and B is an alias which expands to either B16 or BEQ according to the rules: b 256 --> b16 256 # R_MICROMIPS_PC10_S1 b 12256 --> beq $zero, $zero, 12256 # R_MICROMIPS_PC16_S1 b label --> beq $zero, $zero, label # R_MICROMIPS_PC16_S1 Differential Revision: http://reviews.llvm.org/D3514 llvm-svn: 226657
* [mips][microMIPS] Implement ADDIUPC instructionJozef Kolek2015-01-2110-0/+86
| | | | | | Differential Revision: http://reviews.llvm.org/D6582 llvm-svn: 226656
* [PM] Refactor the InstCombiner interface to use an external worklist.Chandler Carruth2015-01-212-211/+222
| | | | | | | | | | | | | | | | | | | | | | | | | Because in its primary function pass the combiner is run repeatedly over the same function until doing so produces no changes, it is essentially to not re-allocate the worklist. However, as a utility, the more common pattern would be to put a limited set of instructions in the worklist rather than the entire function body. That is also the more likely pattern when used by the new pass manager. The result is a very light weight combiner that does the visiting with a separable worklist. This can then be wrapped up in a helper function for users that want a combiner utility, or as I have here it can be wrapped up in a pass which manages the iterations used when combining an entire function's instructions. Hopefully this removes some of the worst of the interface warts that became apparant with the last patch here. However, there is clearly more work. I've again left some FIXMEs for the most egregious. The ones that stick out to me are the exposure of the worklist and IR builder as public members, and the use of pointers rather than references. However, fixing these is likely to be much more mechanical and less interesting so I didn't want to touch them in this patch. llvm-svn: 226655
* [PM] Simplify (ha! ha!) the way that instcombine calls theChandler Carruth2015-01-213-9/+6
| | | | | | | | | | | | SimplifyLibCalls utility by sinking it into the specific call part of the combiner. This will avoid us needing to do any contortions to build this object in a subsequent refactoring I'm doing and seems generally better factored. We don't need this utility everywhere and it carries no interesting state so we might as well build it on demand. llvm-svn: 226654
* [Mips][Disassembler]When disassembler meets load/store from coprocessor 2 ↵Vladimir Medic2015-01-218-8/+39
| | | | | | instructions for mips r6 it crashes as the access to operands array is out of range. This patch adds dedicated decoder method that properly handles decoding of these instructions. llvm-svn: 226652
* [x86] Remove some unnecessary and slightly confusing typecasts from some ↵Craig Topper2015-01-211-4/+4
| | | | | | patterns. I think it actually went i32->iPtr->i32 in some of these cases. llvm-svn: 226647
* [X86] Convert all the i8imm used by AVX512 and MMX instructions to u8imm.Craig Topper2015-01-212-27/+27
| | | | llvm-svn: 226646
* [X86] Convert all the i8imm used by SSE and AVX instructions to u8imm.Craig Topper2015-01-215-78/+70
| | | | | | This makes the assembler check their size and removes a hack from the disassembler to avoid sign extending the immediate. llvm-svn: 226645
* [x86] Add assembly parser bounds checking to the immediate value for ↵Craig Topper2015-01-217-14/+60
| | | | | | cmpss/cmpsd/cmpps/cmppd. llvm-svn: 226642
* [PM] Replace an abuse of inheritance to override a single function withChandler Carruth2015-01-213-35/+27
| | | | | | | | | | | | | a more direct approach: a type-erased glorified function pointer. Now we can pass a function pointer into this for the easy case and we can even pass a lambda into it in the interesting case in the instruction combiner. I'll be using this shortly to simplify the interfaces to InstCombiner, but this helps pave the way and seems like a better design for the libcall simplifier utility. llvm-svn: 226640
* Make DIExpression::Verify() stricter by checking that the number ofAdrian Prantl2015-01-214-9/+93
| | | | | | elements and the ordering is sane and cleanup the accessors. llvm-svn: 226627
* [X86][AVX] Simplified diff between AVX1 and SSE42 fp stack folding tests. NFC.Simon Pilgrim2015-01-211-191/+191
| | | | | | Changed the AVX1 tests register spill tail call to return a xmm like the SSE42 version - makes doing diffs between them a lot easier without affecting the spills themselves. llvm-svn: 226623
* [X86][SSE] Added SSE/AVX1 integer stack folding tests.Simon Pilgrim2015-01-202-0/+1816
| | | | | | Some folding patterns + tests are missing (marked as TODO) - these will be added in a future patch for review. llvm-svn: 226622
* [X86][SSE] Added SSE fp stack folding tests.Simon Pilgrim2015-01-201-0/+1082
| | | | | | Some folding patterns + tests are missing (marked as TODO) - these will be added in a future patch for review. llvm-svn: 226621
* [X86][AVX] Renamed AVX1 fp stack folding tests. NFC.Simon Pilgrim2015-01-201-457/+457
| | | | | | The SSE42 version of the AVX1 float stack folding tests will be added shortly, this renames the AVX1 file so that the files will be near each other in a directory listing to help ensure they are kept in sync. llvm-svn: 226620
* [PM] Separate the InstCombiner from its pass.Chandler Carruth2015-01-204-52/+82
| | | | | | | | | | | | | | | | | | | | This creates a small internal pass which runs the InstCombiner over a function. This is the hard part of porting InstCombine to the new pass manager, as at this point none of the code in InstCombine has access to a Pass object any longer. The resulting interface for the InstCombiner is pretty terrible. I'm not planning on leaving it that way. The key thing missing is that we need to separate the worklist from the combiner a touch more. Once that's done, it should be possible for *any* part of LLVM to just create a worklist with instructions, populate it, and then combine it until empty. The pass will just be the (obvious and important) special case of doing that for an entire function body. For now, this is the first increment of factoring to make all of this work. llvm-svn: 226618
* DebugLocs without a scope should fail the verification.Adrian Prantl2015-01-202-3/+36
| | | | | | Follow-up to r226588. llvm-svn: 226616
* Don't pass -Wl,z,defs for now.Rafael Espindola2015-01-201-7/+0
| | | | | | It broke the msan build. llvm-svn: 226613
* For llvm-objdump, hook up existing options to work when using -macho (the ↵Kevin Enderby2015-01-208-29/+81
| | | | | | Mach-O parser). llvm-svn: 226612
* Use -Wl,defs when linking.Rafael Espindola2015-01-202-2/+18
| | | | | | | | | | | | | | | ELF linkers by default allow shared libraries to contain undefined references and it is up to the dynamic linker to look for them. On COFF and MachO, that is not the case. This creates a situation where a .so might build on an ELF system, but the build of the corresponding .dylib or .dll will fail. This patch changes the cmake build to use -Wl,-z,defs when linking and updates the dependencies so that -DBUILD_SHARED_LIBS=ON build still works. llvm-svn: 226611
* [PM] Reformat this code with clang-format so that subsequent changesChandler Carruth2015-01-201-9/+9
| | | | | | | | | | don't get muddied up by formatting changes. Some of these don't really seem like improvements to me, but they also don't seem any worse and I care much more about not formatting them manually than I do about the particular formatting. =] llvm-svn: 226610
* [Hexagon] Adding intrinsics for doubleword ALU operations.Colin LeMahieu2015-01-202-0/+53
| | | | llvm-svn: 226606
* [Hexagon] Removing unnecessary clutter in intrinsic tests.Colin LeMahieu2015-01-201-18/+9
| | | | llvm-svn: 226602
* Prevent binary-tree deterioration in sparse switch statements.Daniel Jasper2015-01-202-8/+68
| | | | | | | | | | | | | This addresses part of llvm.org/PR22262. Specifically, it prevents considering the densities of sub-ranges that have fewer than TLI.getMinimumJumpTableEntries() elements. Those densities won't help jump tables. This is not a complete solution but works around the most pressing issue. Review: http://reviews.llvm.org/D7070 llvm-svn: 226600
* [GC] Verify-pass void vararg functions in gc.statepointRamkumar Ramachandra2015-01-202-5/+27
| | | | | | | | | | With the appropriate Verifier changes, exactracting the result out of a statepoint wrapping a vararg function crashes. However, a void vararg function works fine: commit this first step. Differential Revision: http://reviews.llvm.org/D7071 llvm-svn: 226599
* Reapply: Teach SROA how to update debug info for fragmented variables.Adrian Prantl2015-01-205-12/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies r225379. ChangeLog: - The assertion that this commit previously ran into about the inability to handle indirect variables has since been removed and the backend can handle this now. - Testcases were upgrade to the new MDLocation format. - Instead of keeping a DebugDeclares map, we now use llvm::FindAllocaDbgDeclare(). Original commit message follows. Debug info: Teach SROA how to update debug info for fragmented variables. This allows us to generate debug info for extremely advanced code such as typedef struct { long int a; int b;} S; int foo(S s) { return s.b; } which at -O1 on x86_64 is codegen'd into define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 { ret i32 %s.coerce1, !dbg !24 } with this patch we emit the following debug info for this TAG_formal_parameter [3] AT_location( 0x00000000 0x0000000000000000 - 0x0000000000000006: rdi, piece 0x00000008, rsi, piece 0x00000004 0x0000000000000006 - 0x0000000000000008: rdi, piece 0x00000008, rax, piece 0x00000004 ) AT_name( "s" ) AT_decl_file( "/Volumes/Data/llvm/_build.ninja.release/test.c" ) Thanks to chandlerc, dblaikie, and echristo for their feedback on all previous iterations of this patch! llvm-svn: 226598
* R600/SI: Add subtarget feature to enable VGPR spilling for all shader typesTom Stellard2015-01-209-11/+36
| | | | | | | This is disabled by default, but can be enabled with the subtarget feature: 'vgpr-spilling' llvm-svn: 226597
* R600/SI: Fix simple-loop.ll testTom Stellard2015-01-203-6/+9
| | | | llvm-svn: 226596
* Reverted revision 226577.Jozef Kolek2015-01-2017-268/+6
| | | | llvm-svn: 226595
* [PM] Clean up a bunch of the doxygen / API docs on the InstCombiner passChandler Carruth2015-01-201-50/+61
| | | | | | prior to refactoring it. llvm-svn: 226594
* [llvm link] Destroy ConstantArrays in LLVMContext if they are not used.Manman Ren2015-01-204-1/+37
| | | | | | | | | | | | | | ConstantArrays constructed during linking can cause quadratic memory explosion. An example is the ConstantArrays constructed when linking in GlobalVariables with appending linkage. Releasing all unused constants can cause a 20% LTO compile-time slowdown for a large application. So this commit releases unused ConstantArrays only. rdar://19040716. It reduces memory footprint from 20+G to 6+G. llvm-svn: 226592
* R600/SI: Remove stray debugging code from r226586Tom Stellard2015-01-201-2/+0
| | | | llvm-svn: 226591
* [PM] Don't spend time making self moves no-ops. They're allowed to leaveChandler Carruth2015-01-201-7/+5
| | | | | | | the object in a moved-from state, and its simpler to write the code that way. llvm-svn: 226589
* Add an assertion and prefer a crash over an infinite loop.Adrian Prantl2015-01-201-0/+3
| | | | llvm-svn: 226588
* R600/SI: Use external symbols for scratch bufferTom Stellard2015-01-209-82/+92
| | | | | | | | We were passing the scratch buffer address to the shaders via user sgprs, but now we use external symbols and have the driver patch the shader using reloc information. llvm-svn: 226586
* R600/SI: Add kill flag when copying scratch offset to a registerTom Stellard2015-01-202-3/+8
| | | | | | | This allows us to re-use the same register for the scratch offset when accessing large private arrays. llvm-svn: 226585
* R600/SI: Don't store scratch buffer frame index in MUBUF offset fieldTom Stellard2015-01-202-16/+81
| | | | | | | | We don't have a good way of legalizing this if the frame index offset is more than the 12-bits, which is size of MUBUF's offset field, so now we store the frame index in the vaddr field. llvm-svn: 226584
* R600/SI: Update SIInstrInfo:verifyInstruction() after r225662Tom Stellard2015-01-201-6/+12
| | | | | | | Now that we have our own custom register operand types, we need to handle them in the verifiier. llvm-svn: 226583
* Silencing a -Wunused-variable warning in non-asserts builds; NFC.Aaron Ballman2015-01-201-3/+2
| | | | llvm-svn: 226581
OpenPOWER on IntegriCloud