summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [mips][msa] Added support for matching nor from normal IR (i.e. not intrinsics)Daniel Sanders2013-09-234-3/+67
| | | | llvm-svn: 191195
* [mips][msa] Added support for matching and, or, and xor from normal IR (i.e. ↵Daniel Sanders2013-09-232-3/+54
| | | | | | not intrinsics) llvm-svn: 191194
* Partially revert r191192: Fix -Wunused-variable error when assertions are ↵Daniel Sanders2013-09-231-9/+0
| | | | | | | | | disabled and -Werror is in use. An unrelated change crept in because 'svn revert' isn't recursive by default. The unrelated changes have been reverted. llvm-svn: 191193
* Fix -Wunused-variable error when assertions are disabled and -Werror is in use.Daniel Sanders2013-09-231-3/+9
| | | | llvm-svn: 191192
* [mips][msa] Implemented build_vector using ldi, fill, and custom ↵Daniel Sanders2013-09-235-11/+139
| | | | | | | | | | | | | | | | | | SelectionDAG nodes (VSPLAT and VSPLATD) Note: There's a later patch on my branch that re-implements this to select build_vector without the custom SelectionDAG nodes. The future patch avoids the constant-folding problems stemming from the custom node (i.e. it doesn't need to re-implement all the DAG combines related to BUILD_VECTOR). Changes to MIPS specific SelectionDAG nodes: * Added VSPLAT This is a special case of BUILD_VECTOR that covers the case the BUILD_VECTOR is a splat operation. * Added VSPLATD This is a special case of VSPLAT that handles the cases when v2i64 is legal llvm-svn: 191191
* [Sparc] Use correct instruction pattern for CMPri.Venkatraman Govindaraju2013-09-221-1/+1
| | | | llvm-svn: 191180
* Remove dead codeDavid Blaikie2013-09-221-17/+0
| | | | llvm-svn: 191179
* StringRef-ize some thingsDavid Blaikie2013-09-221-8/+4
| | | | llvm-svn: 191178
* Provide basic type safety for array_pod_sort comparators.Benjamin Kramer2013-09-227-28/+20
| | | | | | | | This makes using array_pod_sort significantly safer. The implementation relies on function pointer casting but that should be safe as we're dealing with void* here. llvm-svn: 191175
* Drop spurious handle in comment.Benjamin Kramer2013-09-221-1/+1
| | | | llvm-svn: 191172
* [Sparc] Make SPARC instructions' encoding well defined such that TableGen ↵Venkatraman Govindaraju2013-09-224-39/+70
| | | | | | can automatically generate code emitter. llvm-svn: 191168
* [Sparc] Clean up MOVcc instructions so that TableGen can encode them ↵Venkatraman Govindaraju2013-09-222-29/+105
| | | | | | correctly. No functionality change intended. llvm-svn: 191167
* [Sparc] Clean up branch instructions, so that TableGen can encode branch ↵Venkatraman Govindaraju2013-09-223-23/+26
| | | | | | conditions as well. No functionality change intended. llvm-svn: 191166
* ISelDAG: spot chain cycles involving MachineNodesTim Northover2013-09-2212-10/+26
| | | | | | | | | | | | | | | | | Previously, the DAGISel function WalkChainUsers was spotting that it had entered already-selected territory by whether a node was a MachineNode (amongst other things). Since it's fairly common practice to insert MachineNodes during ISelLowering, this was not the correct check. Looking around, it seems that other nodes get their NodeId set to -1 upon selection, so this makes sure the same thing happens to all MachineNodes and uses that characteristic to determine whether we should stop looking for a loop during selection. This should fix PR15840. llvm-svn: 191165
* [Sparc] Add support for TLS in sparc.Venkatraman Govindaraju2013-09-227-10/+238
| | | | llvm-svn: 191164
* X86: Use R_X86_64_TPOFF64 for FK_Data_8David Majnemer2013-09-221-0/+3
| | | | | | | | | | | | | | | | | | | Summary: LLVM would crash when trying to come up with a relocation type for assembly like: movabsq $V@TPOFF, %rax Instead, we say the relocation type is R_X86_64_TPOFF64. Fixes PR17274. Reviewers: dblaikie, nrieck, rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1717 llvm-svn: 191163
* [SPARC] Make functions with GLOBAL_OFFSET_TABLE access as non-leaf functions.Venkatraman Govindaraju2013-09-221-0/+4
| | | | llvm-svn: 191160
* [Sparc] Emit .register directive to declare the use of global registers %g2, ↵Venkatraman Govindaraju2013-09-221-0/+26
| | | | | | %g4, %g6 and %g7. llvm-svn: 191158
* Correct the pre-increment load latencies in the PPC A2 itineraryHal Finkel2013-09-221-3/+3
| | | | | | | | Pre-increment loads are microcoded on the A2, and the address increment occurs only after the load completes. As a result, the latency of the GPR address update is an additional 2 cycles on top of the load latency. llvm-svn: 191156
* [Sparc] Fix lowering FABS on fp128 (long double) on pre-v9 targets.Venkatraman Govindaraju2013-09-211-6/+6
| | | | llvm-svn: 191154
* SROA: Handle casts involving vectors of pointers and integer scalars.Benjamin Kramer2013-09-211-11/+47
| | | | | | | | | | SROA wants to convert any types of equivalent widths but it's not possible to convert vectors of pointers to an integer scalar with a single cast. As a workaround we add a bitcast to the corresponding int ptr type first. This type of cast used to be an edge case but has become common with SLP vectorization. Fixes PR17271. llvm-svn: 191143
* Revert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs ↵Juergen Ributzka2013-09-213-45/+9
| | | | | | | | splitting too." This reverts commit r191130. llvm-svn: 191138
* Remove alignment restrictions from FMA load folding.Craig Topper2013-09-211-31/+31
| | | | llvm-svn: 191136
* SLPVectorizer: Fix multiline comment warningArnold Schwaighofer2013-09-211-2/+2
| | | | llvm-svn: 191135
* ELF: Parse types in directives like binutils gasDavid Majnemer2013-09-211-20/+43
| | | | | | | | | | Allow binutils .type and .section directives to take the following forms: - @<type> - %<type> - "<type>" llvm-svn: 191134
* Fix the buildbotJuergen Ributzka2013-09-211-3/+3
| | | | llvm-svn: 191133
* [X86] Emulate AVX 256bit MIN/MAX support by splitting the vector.Juergen Ributzka2013-09-211-19/+45
| | | | | | | | | | | In AVX 256bit vectors are valid vectors and therefore the Type Legalizer doesn't split the VSELECT and SETCC nodes. AVX only supports MIN/MAX on 128bit vectors and this fix enables vector splitting for this special case in the X86 DAG Combiner. This fix is related to PR16695, PR17002, and <rdar://problem/14594431>. llvm-svn: 191131
* SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too.Juergen Ributzka2013-09-213-9/+45
| | | | | | | | | | | | | | | | | | The Type Legalizer recognizes that VSELECT needs to be split, because the type is to wide for the given target. The same does not always apply to SETCC, because less space is required to encode the result of a comparison. As a result VSELECT is split and SETCC is unrolled into scalar comparisons. This commit fixes the issue by checking for VSELECT-SETCC patterns in the DAG Combiner. If a matching pattern is found, then the result mask of SETCC is promoted to the expected vector mask for the given target. This mask has usually te same size as the VSELECT return type (except for Intel KNL). Now the type legalizer will split both VSELECT and SETCC. This allows the following X86 DAG Combine code to sucessfully detect the MIN/MAX pattern. This fixes PR16695, PR17002, and <rdar://problem/14594431>. llvm-svn: 191130
* Initialize BSSSection explicitly in InitMachOMCObjectFileInfo() to appease msvc.NAKAMURA Takumi2013-09-211-0/+3
| | | | | | This can revert r191087. llvm-svn: 191128
* Set .reorder for the stub so that gas takes care of delay slot processing.Reed Kotler2013-09-211-1/+3
| | | | llvm-svn: 191125
* Reapply "SLPVectorizer: Handle more horizontal reductions (disabled)""Arnold Schwaighofer2013-09-211-8/+364
| | | | | | | | | | | | | | Reapply r191108 with a fix for a memory corruption error I introduced. Of course, we can't reference the scalars that we replace by vectorizing and then call their eraseFromParent method. I only 'needed' the scalars to get the DebugLoc. Just store the DebugLoc before actually vectorizing instead. As a nice side effect, this also simplifies the interface between BoUpSLP and the HorizontalReduction class to returning a value pointer (the vectorized tree root). radar://14607682 llvm-svn: 191123
* LoopVectorizer: Only allow vectorization of intrinsics. We can't know for ↵Nadav Rotem2013-09-211-2/+11
| | | | | | | | sure that the functions 'abs' or 'round' are the functions from libm. rdar://15012650 llvm-svn: 191122
* Revert "SLPVectorizer: Handle more horizontal reductions (disabled)"Arnold Schwaighofer2013-09-211-368/+8
| | | | | | | | | This reverts commit r191108. The horizontal.ll test case fails under libgmalloc. Thanks Shuxin for pointing this out to me. llvm-svn: 191121
* Move emission of the debug string table to early in the debugEric Christopher2013-09-203-22/+46
| | | | | | | info finalization to greatly reduce the number of fixups that the assembler has to handle in order to improve compile time. llvm-svn: 191119
* Resurrect r191017 " GVN proceeds in the presence of dead code" plus a fix to ↵Shuxin Yang2013-09-201-6/+168
| | | | | | | | | PR17307 & 17308. The problem of r191017 is that when GVN fabricate a val-number for a dead instruction (in order to make following expr-PRE happy), it forget to fabricate a leader-table entry for it as well. llvm-svn: 191118
* MC: Tidy up.Jim Grosbach2013-09-201-743/+723
| | | | | | | | Clean up some simple code quality issues. Bring internal naming conventions up to current standard, fix inconsistent formatting, and tidy up a couple of odd contructs. llvm-svn: 191117
* Migrate addGlobalName to the .cpp file as an intermediate stepEric Christopher2013-09-202-2/+6
| | | | | | to further work. llvm-svn: 191113
* InstCombine: Remove unused argument. No functionality change.Benjamin Kramer2013-09-202-12/+6
| | | | llvm-svn: 191112
* [mips] MUL should clobber HI0 and LO0.Akira Hatanaka2013-09-201-0/+1
| | | | | | I cannot think of a test case that reliably triggers this bug. llvm-svn: 191109
* SLPVectorizer: Handle more horizontal reductions (disabled)Arnold Schwaighofer2013-09-201-8/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Match reductions starting at binary operation feeding into a phi. The code handles trees like r += v1 + v2 + v3 ... and r += v1 r += v2 ... and r *= v1 + v2 + ... We currently only handle associative operations (add, fadd fast). The code can now also handle reductions feeding into stores. a[i] = v1 + v2 + v3 + ... The code is currently disabled behind the flag "-slp-vectorize-hor". The cost model for most architectures is not there yet. I found one opportunity of a horizontal reduction feeding a phi in TSVC (LoopRerolling-flt) and there are several opportunities where reductions feed into stores. radar://14607682 llvm-svn: 191108
* Revert r191017, it results in segmentation faults in Qt.Joerg Sonnenberger2013-09-201-164/+6
| | | | llvm-svn: 191104
* InstCombine: Canonicalize (gep i8* X, -(ptrtoint Y)) to (sub (ptrtoint X), ↵Benjamin Kramer2013-09-201-0/+14
| | | | | | | | | | (ptrtoint Y)) The GEP pattern is what SCEV expander emits for "ugly geps". The latter is what you get for pointer subtraction in C code. The rest of instcombine already knows how to deal with that so just canonicalize on that. llvm-svn: 191090
* Revert "llvm-c: Add LLVMGetPointerToFunction"Anders Waldenborg2013-09-201-4/+0
| | | | | | This reverts r191030 llvm-svn: 191075
* Lift alignment restrictions on load/store folding of VEXTRACTI128/VINSERTI128.Craig Topper2013-09-201-12/+12
| | | | llvm-svn: 191073
* Allow subtarget selection of the default MachineScheduler and document the ↵Andrew Trick2013-09-204-24/+48
| | | | | | | | | | | interface. The global registry is used to allow command line override of the scheduler selection, but does not work well as the normal selection API. For example, the same LLVM process should be able to target multiple targets or subtargets. llvm-svn: 191071
* Revert r191062; the build break was also fixed in a different (incompatible) ↵Richard Smith2013-09-201-3/+2
| | | | | | way in r191060. llvm-svn: 191065
* Unbreak Clang build after r191050: don't pass a StringRef to snprintf.Richard Smith2013-09-201-2/+3
| | | | llvm-svn: 191062
* DebugInfo: GDBIndexEntry*String conversion functions now return const char* ↵David Blaikie2013-09-202-4/+4
| | | | | | | | | for easy llvm::formating This was previously invoking UB by passing a user-defined type to format. Thanks to Jordan Rose for pointing this out. llvm-svn: 191060
* Add braces to suppress Clang's dangling-else warning.David Blaikie2013-09-201-2/+4
| | | | | | These violations were introduced in r191049 llvm-svn: 191059
* DebugInfo: constrain gnu pubnames test furtherDavid Blaikie2013-09-191-2/+2
| | | | | | | | | | Ensures that the pubnames entries actually refer to the intended entities. This test could be more flexible if there was a way to do multiline FileCheck matches with captures (in that way the test wouldn't need to have hardcoded offset values and would thus be resilient to changes in the layout of the DIEs in this CU). llvm-svn: 191055
OpenPOWER on IntegriCloud