summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Teach IRCE to look at branch weights when recognizing range checksSanjoy Das2015-01-271-3/+14
| | | | | | | | | | | Splitting a loop to make range checks redundant is profitable only if the range check "never" fails. Make this fact a part of recognizing a range check -- a branch is a range check only if it is expected to pass (via branch_weights metadata). Differential Revision: http://reviews.llvm.org/D7192 llvm-svn: 227249
* Revert "[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector"Alexey Samsonov2015-01-271-29/+0
| | | | | | This reverts commits r226953 and r226974. llvm-svn: 227248
* dd the option, -link-opt-hints to llvm-objdump used with -macho to print theKevin Enderby2015-01-271-2/+25
| | | | | | Mach-O AArch64 linker optimization hints for ADRP code optimization. llvm-svn: 227246
* Merge vector stores into wider vector stores (PR21711)Sanjay Patel2015-01-271-30/+54
| | | | | | | | | | | | | | | | | | | | This patch resolves part of PR21711 ( http://llvm.org/bugs/show_bug.cgi?id=21711 ). The 'f3' test case in that report presents a situation where we have two 128-bit stores extracted from a 256-bit source vector. Instead of producing this: vmovaps %xmm0, (%rdi) vextractf128 $1, %ymm0, 16(%rdi) This patch merges the 128-bit stores into a single 256-bit store: vmovups %ymm0, (%rdi) Differential Revision: http://reviews.llvm.org/D7208 llvm-svn: 227242
* tsan: properly instrument unaligned accessesDmitry Vyukov2015-01-271-1/+22
| | | | | | | | | | | If a memory access is unaligned, emit __tsan_unaligned_read/write callbacks instead of __tsan_read/write. Required to change semantics of __tsan_unaligned_read/write to not do the user memory. But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine. Fixes long standing issue 17: https://code.google.com/p/thread-sanitizer/issues/detail?id=17 llvm-svn: 227231
* [ExecutionEngine] Add weak symbol support to RuntimeDyldKeno Fischer2015-01-273-1/+31
| | | | | | | | | | | Support weak symbols by first looking up if there is an externally visible symbol we can find, and only if that fails using the one in the object file we're loading. Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6950 llvm-svn: 227228
* [ExecutionEngine] FindFunctionNamed: Skip declarationsKeno Fischer2015-01-272-2/+4
| | | | | | | | | | | | | | | | Summary: Basically all other methods that look up functions by name skip them if they are mere declarations. Do the same in FindFunctionNamed. Reviewers: lhames Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7068 llvm-svn: 227227
* [mips] Add range checks and transformation to octeon instructions in AsmParser.Kai Nacke2015-01-271-0/+78
| | | | | | | | | | | | | | | | | This patch adds range checks to the immediate operands of octeon instructions in the AsmParser. Like gas, it applies the following transformations if the immediate is to large: bbit0 $8, 42, foo => bbit032 $8, 10, foo bbit1 $8, 46, foo => bbit132 $8, 14, foo cins $8, $31, 32, 31 => cins32 $8, $31, 0, 31 exts $7, $4, 54, 9 => exts32 $7, $4, 22, 9 Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D7080 llvm-svn: 227225
* R600/SI: Fix MIN3/MAX3 on VI, define MED3Marek Olsak2015-01-271-9/+16
| | | | llvm-svn: 227213
* R600/SI: Don't set patterns for chip-specific instructions while having pseudosMarek Olsak2015-01-271-50/+43
| | | | | | | | | | | Only pseudos have patterns on them. Also don't set the asm string for VINTRP_Pseudo. All pseudos should have empty asm. This matches what all other multiclasses do. llvm-svn: 227212
* R600/SI: Add VI versions of LDS atomicsMarek Olsak2015-01-273-120/+139
| | | | | | | Each class is split into two: one adds let statements around non-pseudos, and the other one specifies the parameters. llvm-svn: 227211
* R600/SI: Add VI versions of MUBUF atomicsMarek Olsak2015-01-272-73/+80
| | | | llvm-svn: 227210
* R600/SI: Add VI versions of MUBUF loads and storesMarek Olsak2015-01-273-131/+39
| | | | | | This enables a lot of existing patterns for VI. llvm-svn: 227209
* R600/SI: Add pseudos for MUBUF loads and storesMarek Olsak2015-01-271-103/+125
| | | | | | | | | This defines the SI versions only, so it shouldn't change anything. There are no changes other than using the new multiclasses, adding missing mayLoad/mayStore, and formatting fixes. llvm-svn: 227208
* [InstCombine] Teach how to fold a select into a cttz/ctlz with the ↵Andrea Di Biagio2015-01-271-0/+63
| | | | | | | | | | | 'is_zero_undef' flag. This patch teaches the Instruction Combiner how to fold a cttz/ctlz followed by a icmp plus select into a single cttz/ctlz with flag 'is_zero_undef' cleared. Added test InstCombine/select-cmp-cttz-ctlz.ll. llvm-svn: 227197
* [sancov] Fix unspecified constructor order between sancov and asan.Evgeniy Stepanov2015-01-271-1/+1
| | | | | | | Sanitizer coverage constructor must run after asan constructor (for each DSO). Bump constructor priority to guarantee that. llvm-svn: 227195
* Add a FIXME in SelectionDAGBuilder before an assert that is valid only on X86.Manuel Jacob2015-01-271-0/+3
| | | | | | | | | When lowering memcpy, memset or memmove, this assert checks whether the pointer operands are in an address space < 256 which means "user defined address space" on X86. However, this notion of "user defined address space" does not exist for other targets. llvm-svn: 227191
* Replace some uses of getSubtargetImpl with the cached versionEric Christopher2015-01-275-9/+8
| | | | | | | off of the MachineFunction or with the version that takes a Function reference as an argument. llvm-svn: 227185
* Have the PBQP register allocator use the subtarget on the MachineFunction.Eric Christopher2015-01-271-8/+5
| | | | | | (and remove an extraneous private). llvm-svn: 227181
* Remove some extraneous includes.Eric Christopher2015-01-272-3/+0
| | | | llvm-svn: 227180
* Fix build failure with pointer vs reference.Eric Christopher2015-01-271-1/+1
| | | | | NB: Saving files after editing helps. llvm-svn: 227178
* Update a few calls to getSubtarget<> to either be getSubtargetImplEric Christopher2015-01-275-18/+16
| | | | | | | when we didn't need the cast to the base class or the cached version off of the subtarget. llvm-svn: 227176
* Clean up the AArch64 store pair suppression pass initializationEric Christopher2015-01-271-11/+7
| | | | | | and remove and unnecessary class variable. llvm-svn: 227175
* The subtarget is cached on the MachineFunction. Access it directly.Eric Christopher2015-01-278-30/+18
| | | | llvm-svn: 227173
* Migrate SeparateConstOffsetFromGEP to use a Function withEric Christopher2015-01-271-1/+1
| | | | | | getSubtarget. llvm-svn: 227172
* LoopRotate: Don't walk the uses of a ConstantDavid Majnemer2015-01-271-11/+8
| | | | | | | | | | LoopRotate wanted to avoid live range interference by looking at the uses of a Value in the loop latch and seeing if any lied outside of the loop. We would wrongly perform this operation on Constants. This fixes PR22337. llvm-svn: 227171
* Remove unused include.Eric Christopher2015-01-271-1/+0
| | | | llvm-svn: 227170
* Revert r227148 & r227154 which added a test which infinitely loops.Richard Trieu2015-01-271-1/+2
| | | | | | | | | | | | r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly outputs two following lines: -tool: CommandLine Error: Option 'test-option-1' registered more than once! -tool: CommandLine Error: Option 'test-option-2' registered more than once! r227154 depends on changes from r227148 llvm-svn: 227167
* [PM] Refactor the core logic to run EarlyCSE over a function into anChandler Carruth2015-01-272-76/+95
| | | | | | | | | | | | | | | | | object that manages a single run of this pass. This was already essentially how it worked. Within the run function, it would point members at *stack local* allocations that were only live for a single run. Instead, it seems much cleaner to have a utility object whose lifetime is clearly bounded by the run of the pass over the function and can use member variables in a more direct way. This also makes it easy to plumb the analyses used into it from the pass and will make it re-usable with the new pass manager. No functionality changed here, its just a refactoring. llvm-svn: 227162
* MachineRegisterInfo can access TII off of the MachineFunction'sEric Christopher2015-01-273-4/+4
| | | | | | | subtarget and so doesn't need the TargetMachine or to access via getSubtargetImpl. Update all callers. llvm-svn: 227160
* Migrate AtomicExpandPass and DwarfEHPrepare to using a Function-ized ↵Eric Christopher2015-01-272-3/+3
| | | | | | getSubtargetImpl. llvm-svn: 227159
* Migrate CodeGenPrepare to use the Function based getSubtargetEric Christopher2015-01-271-3/+5
| | | | | | code. llvm-svn: 227157
* Grab the TargetLowering info from the DAG rather than querying forEric Christopher2015-01-271-3/+2
| | | | | | a subtarget. llvm-svn: 227156
* One more fix to the new API to fix const-correctness.Chris Bieneman2015-01-271-1/+1
| | | | llvm-svn: 227154
* Commoning of target specific load/store intrinsics in Early CSE.Chad Rosier2015-01-263-29/+221
| | | | | | | Phabricator revision: http://reviews.llvm.org/D7121 Patch by Sanjin Sijaric <ssijaric@codeaurora.org>! llvm-svn: 227149
* Pete Cooper suggested the new API should use ArrayRef instead of ↵Chris Bieneman2015-01-261-2/+1
| | | | | | SmallVectorImpl. Also adding a test case. llvm-svn: 227148
* [X86][SSE] Float comparisons can sometimes be safely commutedSimon Pilgrim2015-01-262-0/+45
| | | | | | | | For ordered, unordered, equal and not-equal tests, packed float and double comparison instructions can be safely commuted without affecting the results. This patch checks the comparison mode of the (v)cmpps + (v)cmppd instructions and commutes the result if it can. Differential Revision: http://reviews.llvm.org/D7178 llvm-svn: 227145
* Have the UTF conversion wrappers append a null terminator.Zachary Turner2015-01-261-4/+11
| | | | | | | | | | | This is especially useful for the UTF8 -> UTF16 direction, since there is no equivalent of llvm::SmallString<> for wide characters. This means that anyone who wants a null terminated string is forced to manually push and pop their own null terminator. Reviewed by: Reid Kleckner. llvm-svn: 227143
* [X86][PCLMUL] Enable commutation for PCLMUL instructionsSimon Pilgrim2015-01-262-0/+17
| | | | | | | | Patch to allow (v)pclmulqdq to be commuted - swaps the src registers and inverts the immediate (low/high) src mask. Differential Revision: http://reviews.llvm.org/D7180 llvm-svn: 227141
* Add new HideUnrelatedOptions API that takes a SmallVectorImpl.Chris Bieneman2015-01-261-0/+14
| | | | | | Need a new API for clang-modernize that allows specifying a list of option categories to remain visible. This will allow clang-modernize to move off getRegisteredOptions. llvm-svn: 227140
* bpf: fix build due to 'Move DataLayout back to the TargetMachine'Alexei Starovoitov2015-01-264-4/+5
| | | | | | commit r227113 moved DataLayout llvm-svn: 227133
* SimplifyCFG: Omit range checks for switch lookup tables when default is ↵Hans Wennborg2015-01-261-7/+8
| | | | | | | | | | | unreachable The range check would get optimized away later, but we might as well not emit them in the first place. http://reviews.llvm.org/D6471 llvm-svn: 227126
* SimplifyCFG: don't remove unreachable default switch destinationsHans Wennborg2015-01-261-89/+92
| | | | | | | | | | | | | | | An unreachable default destination can be exploited by other optimizations and allows for more efficient lowering. Both the SDag switch lowering and LowerSwitch can exploit unreachable defaults. Also make TurnSwitchRangeICmp handle switches with unreachable default. This is kind of separate change, but it cannot be tested without the change above, and I don't want to land the change above without this since that would regress other tests. Differential Revision: http://reviews.llvm.org/D6471 llvm-svn: 227125
* Make ConstantFoldTerminator() handle switches with unreachable default.Hans Wennborg2015-01-261-4/+10
| | | | | | | | Tested by Transforms/SimplifyCFG/switch-to-br.ll's @unreachable function. Differential Revision: http://reviews.llvm.org/D6471 llvm-svn: 227124
* [NVPTX] Generate a more optimal sequence for select of i1Justin Holewinski2015-01-263-5/+23
| | | | | | | | | Instead of creating a pattern like "(p && a) || ((!p) && b)", just expand the i8 operands to i32 and perform the selp on them. Fixes PR22246 llvm-svn: 227123
* Add a UTF8 to UTF16 conversion wrapper for use in the pdb dumperReid Kleckner2015-01-261-0/+31
| | | | | | | | | This can also be used instead of the WindowsSupport.h ConvertUTF8ToUTF16 helpers, but that will require massaging some character types. The Windows support routines want wchar_t output, but wchar_t is often 32 bits on non-Windows OSs. llvm-svn: 227122
* Cache the lookup of TargetLowering in the atomic expand pass.Eric Christopher2015-01-261-31/+17
| | | | llvm-svn: 227121
* [SelectionDAG] Fix assert message copypasta. NFC.Ahmed Bougacha2015-01-261-2/+2
| | | | llvm-svn: 227119
* [NVPTX] Handle floating-point conversion patterns that are not explicitly ↵Justin Holewinski2015-01-261-6/+13
| | | | | | | | ordered or unordered Fixes PR22322 llvm-svn: 227117
* Use a different encoding for debugtrap on PS4.Alex Rosenberg2015-01-263-3/+7
| | | | llvm-svn: 227116
OpenPOWER on IntegriCloud