summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* [NVPTX] Add support for native SIGN_EXTEND_INREG where availableJustin Holewinski2013-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185330 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] Add isel patterns for [reg+offset] form of ldg/ldu.Justin Holewinski2013-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185329 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] Make sure we zero out high-order 24 bits for 8-bit load into 32-bit ↵Justin Holewinski2013-07-01
| | | | | | value git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185328 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorize: Math functions only read rounding modeArnold Schwaighofer2013-07-01
| | | | | | | | Math functions are mark as readonly because they read the floating point rounding mode. Because we don't vectorize loops that would contain function calls that set the rounding mode it is safe to ignore this memory read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185299 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Fix an unitialized variable in R600InstrInfo.cppVincent Lejeune2013-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185294 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: POP*rmm: move address operand to (ins) from (outs).Ahmed Bougacha2013-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185292 91177308-0d34-0410-b5e6-96231b3b80d8
* DeadArgumentElimination: keep return value on functions that have a live ↵Stephen Lin2013-06-30
| | | | | | argument with the 'returned' attribute (rather than generate invalid IR); however, if both can be eliminated, both will be git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185290 91177308-0d34-0410-b5e6-96231b3b80d8
* ConstantFold: Check that truncating the other side is safe under a sext when ↵Benjamin Kramer2013-06-30
| | | | | | | | trying to remove a sext from a compare. Fixes PR16462. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185284 91177308-0d34-0410-b5e6-96231b3b80d8
* ValueTracking: Teach isKnownToBeAPowerOfTwo about (ADD X, (XOR X, Y)) where ↵David Majnemer2013-06-29
| | | | | | | | | | X is a power of two This allows us to simplify urem instructions involving the add+xor to turn into simpler math. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185272 91177308-0d34-0410-b5e6-96231b3b80d8
* NVPTX: Fold otherwise unused variable into assert.Benjamin Kramer2013-06-29
| | | | | | Avoids unused variable warnings in release builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185271 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Also turn selects fed by an and into arithmetic when the types ↵Benjamin Kramer2013-06-29
| | | | | | | | | don't match. Inserting a zext or trunc is sufficient. This pattern is somewhat common in LLVM's pointer mangling code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185270 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Unbreak GCC build.Benjamin Kramer2013-06-29
| | | | | | | operator++ on an enum is not legal. clang happens to accept it anyways, I think that's a known bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185269 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Support schedule and packetization of trans-only instVincent Lejeune2013-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185268 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Bank Swizzle now display SCL equivalentVincent Lejeune2013-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185267 91177308-0d34-0410-b5e6-96231b3b80d8
* misched: Compress pairs returned by getUnderlyingObjectsForInstr.Benjamin Kramer2013-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185266 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorizer: Pack MemAccessInfo pairs.Benjamin Kramer2013-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185263 91177308-0d34-0410-b5e6-96231b3b80d8
* Move helper classes into anonymous namespaces.Benjamin Kramer2013-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185262 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: FoldGEPICmp shouldn't change sign of base pointer comparisonDavid Majnemer2013-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | Changing the sign when comparing the base pointer would introduce all sorts of unexpected things like: %gep.i = getelementptr inbounds [1 x i8]* %a, i32 0, i32 0 %gep2.i = getelementptr inbounds [1 x i8]* %b, i32 0, i32 0 %cmp.i = icmp ult i8* %gep.i, %gep2.i %cmp.i1 = icmp ult [1 x i8]* %a, %b %cmp = icmp ne i1 %cmp.i, %cmp.i1 ret i1 %cmp into: %cmp.i = icmp slt [1 x i8]* %a, %b %cmp.i1 = icmp ult [1 x i8]* %a, %b %cmp = xor i1 %cmp.i, %cmp.i1 ret i1 %cmp By preserving the original sign, we now get: ret i1 false This fixes PR16483. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185259 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Small whitespace cleanup in FoldGEPICmpDavid Majnemer2013-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185258 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denomsDavid Majnemer2013-06-29
| | | | | | | | | | | | | | | | | | Real world code sometimes has the denominator of a 'udiv' be a 'select'. LLVM can handle such cases but only when the 'select' operands are symmetric in structure (both select operands are a constant power of two or a left shift, etc.). This falls apart if we are dealt a 'udiv' where the code is not symetric or if the select operands lead us to more select instructions. Instead, we should treat the LHS and each select operand as a distinct divide operation and try to optimize them independently. If we can to simplify each operation, then we can replace the 'udiv' with, say, a 'lshr' that has a new select with a bunch of new operands for the select. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185257 91177308-0d34-0410-b5e6-96231b3b80d8
* We preserve the CFG and some of the analysis passes.Nadav Rotem2013-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185251 91177308-0d34-0410-b5e6-96231b3b80d8
* Update docs.Nadav Rotem2013-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185250 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: clean up usage of Verify.Manman Ren2013-06-29
| | | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185249 91177308-0d34-0410-b5e6-96231b3b80d8
* Change assert(0 && "text") to llvm_unreachable(0 && "text")Richard Trieu2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185243 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Optimize (1 << X) Pred CstP2 to X Pred Log2(CstP2)David Majnemer2013-06-28
| | | | | | | | | | | | | | | We may, after other optimizations, find ourselves with IR that looks like: %shl = shl i32 1, %y %cmp = icmp ult i32 %shl, 32 Instead, we should just compare the shift count: %cmp = icmp ult i32 %y, 5 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185242 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix extra whitespace / formattingMatt Arsenault2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185238 91177308-0d34-0410-b5e6-96231b3b80d8
* PPC: Ignore spill/restore requests for VRSAVE (except on Darwin)Hal Finkel2013-06-28
| | | | | | | | | | | | This fixes PR16418, which reports that a function calling __builtin_unwind_init() asserts. The cause is that this generates a spill/restore for VRSAVE, and we support that only on Darwin (because VRSAVE is only really used on Darwin). The test case checks only that we don't crash. We can add correctness checks once someone verifies what behavior the function is supposed to have. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185235 91177308-0d34-0410-b5e6-96231b3b80d8
* SLP Vectorizer: Add support for trees with external users.Nadav Rotem2013-06-28
| | | | | | | | | To support this we have to insert 'extractelement' instructions to pick the right lane. We had this functionality before but I removed it when we moved to the multi-block design because it was too complicated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185230 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken asserts that never fire.Richard Trieu2013-06-28
| | | | | | | | | Change assert("text") to assert(0 && "text"). The first case is a const char * to bool conversion, which always evaluates to true, never triggering the assert. The second case will always trigger the assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185227 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bad overflow check pointed out by Ben.Jakob Stoklund Olesen2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185226 91177308-0d34-0410-b5e6-96231b3b80d8
* Revising the MCJIT ObjectCache interface to allow subclasses to avoid ↵Andrew Kaylor2013-06-28
| | | | | | retaining references to returned objects git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185221 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused memberDavid Blaikie2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185219 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate an assortment of undefined behavior.Jakob Stoklund Olesen2013-06-28
| | | | | | Hopefully, this fixes the PPC64 buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185218 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorizer: Refactor the code that checks if it is safe to predicate ↵Nadav Rotem2013-06-28
| | | | | | | | | | | blocks. In this code we keep track of pointers that we are allowed to read from, if they are accessed by non-predicated blocks. We use this list to allow vectorization of conditional loads in predicated blocks because we know that these addresses don't segfault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185214 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add processor types for each CIK variantTom Stellard2013-06-28
| | | | | | | | | Patch By: Alex Deucher Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185209 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: PR14728: TLS supportDavid Blaikie2013-06-28
| | | | | | | | | | | | | | Based on GCC's output for TLS variables (OP_constNu, x@dtpoff, OP_lo_user), this implements debug info support for TLS in ELF. Verified that this output is correct/sufficient on Linux (using gold - if you're using binutils-ld, you'll need something with the fix for http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it). Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks want to discuss (or just go ahead & implement) how this should work in MachO, etc, I'm open. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185203 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbolsDavid Blaikie2013-06-28
| | | | | | | This is a precursor to adding debug info support for TLS which requires non-default relocations applied to TLS symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185202 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a PPC rlwimi instruction-selection bugHal Finkel2013-06-28
| | | | | | | | | Under certain (evidently rare) circumstances, this code used to convert OR(a, AND(x, y)) into OR(a, x). This was incorrect. While there, I've added a comment to the code immediately above. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185201 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove needless include (unistd.h) in DebugIR passDaniel Malea2013-06-28
| | | | | | | | - should unbreak Windows builds git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185198 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing header for DebugIRDaniel Malea2013-06-28
| | | | | | | | - missed svn add... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185194 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove limitation on DebugIR that made it require existing debug metadata.Daniel Malea2013-06-28
| | | | | | | | | | | - Build debug metadata for 'bare' Modules using DIBuilder - DebugIR can be constructed to generate an IR file (to be seen by a debugger) or not in cases where the user already has an IR file on disk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185193 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an off-by-one error. Also make the code a little more explicit in what itChad Rosier2013-06-28
| | | | | | | is trying to do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185191 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool'David Blaikie2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185190 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Simplify the AddressPool representationDavid Blaikie2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185189 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: constify the AddressPool MCSymbol pointersDavid Blaikie2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185188 91177308-0d34-0410-b5e6-96231b3b80d8
* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185187 ↵Preston Briggs2013-06-28
| | | | 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResultLang Hames2013-06-28
| | | | | | | | | | | | | | should expand ATOMIC_CMP_SWAP nodes the same way that it does for ATOMIC_SWAP. Since ATOMIC_LOADs on some targets (e.g. older ARM variants) get legalized to ATOMIC_CMP_SWAPs, the missing case had been causing i64 atomic loads to crash during isel. <rdar://problem/14074644> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185186 91177308-0d34-0410-b5e6-96231b3b80d8
* Stylistic cleanups, no functional change.Jakob Stoklund Olesen2013-06-28
| | | | | | | | - Use static functions instead of anonymous namespace. - Appease the Doxygen lobby. - Use 0-based induction variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185185 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a division operator to BlockFrequency.Jakob Stoklund Olesen2013-06-28
| | | | | | | | | | | Allow a BlockFrequency to be divided by a non-zero BranchProbability with saturating arithmetic. This will be used to compute the frequency of a loop header given the probability of leaving the loop. Our long division algorithm already saturates on overflow, so that was a freebie. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185184 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused variables.Eric Christopher2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185180 91177308-0d34-0410-b5e6-96231b3b80d8