aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* "The instructions MMX_PSADBWrm and MMX_PSADBWrr have opcode 0b11100000 (e0), butBill Wendling2009-05-282-2/+2
| | | | | | | | | | | the Intel manual (screenshot) says it should be 0b11110110 (f6). The existing encoding causes a disassembly conflict with MMX_PAVGBrm, which really should be 0f e0." Patch by Sean Callanan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72508 91177308-0d34-0410-b5e6-96231b3b80d8
* Added optimization that narrow load / op / store and the 'op' is a bit ↵Evan Cheng2009-05-286-1/+156
| | | | | | | | | | | | | | twiddling instruction and its second operand is an immediate. If bits that are touched by 'op' can be done with a narrower instruction, reduce the width of the load and store as well. This happens a lot with bitfield manipulation code. e.g. orl $65536, 8(%rax) => orb $1, 10(%rax) Since narrowing is not always a win, e.g. i32 -> i16 is a loss on x86, dag combiner consults with the target before performing the optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72507 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 72493 and replace it with a more conservative fix, for now: don'tDan Gohman2009-05-272-7/+33
| | | | | | | | | rewrite the comparison if there is any implicit extension or truncation on the induction variable. I'm planning for IVUsers to eventually take over some of the work of this code, and for it to be generalized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72496 91177308-0d34-0410-b5e6-96231b3b80d8
* Ger rid of some dead code.Eli Friedman2009-05-272-36/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72494 91177308-0d34-0410-b5e6-96231b3b80d8
* In ChangeCompareStride, when the stride to be reused is truncated toDan Gohman2009-05-272-2/+40
| | | | | | | | a smaller type, promoted its offset back up to the type of the new comparison. This fixes PR4222. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72493 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix sfence jit encoding. Patch by Sean Callanan.Evan Cheng2009-05-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72488 91177308-0d34-0410-b5e6-96231b3b80d8
* This looks like it passes now.Bill Wendling2009-05-271-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72485 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for fround, fextend and FP_TO_SINTBruno Cardoso Lopes2009-05-279-29/+90
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72483 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor fix for CMake build systemDouglas Gregor2009-05-271-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72480 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Set LIBS on llvm-config so we can query the system librariesOscar Fuentes2009-05-273-11/+29
| | | | | | | used by CMake with --ldflags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72470 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups; add a better explanation for the issue with Eli Friedman2009-05-271-23/+10
| | | | | | | | BUILD_VECTOR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72469 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more special cases for opcodes.Eli Friedman2009-05-271-310/+201
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72468 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove special cases for more opcodes.Eli Friedman2009-05-272-207/+122
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72467 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing more special cases from LegalizeDAG.Eli Friedman2009-05-271-191/+78
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72465 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate more special cases for opcodes.Eli Friedman2009-05-271-192/+105
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72464 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more special cases from LegalizeDAG.Eli Friedman2009-05-271-210/+145
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72456 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused argument.Eli Friedman2009-05-271-11/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72455 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more opcode special cases.Eli Friedman2009-05-271-159/+70
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72454 91177308-0d34-0410-b5e6-96231b3b80d8
* Add braces around an array initializer.Dan Gohman2009-05-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72453 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach SCEVExpander to avoid creating over-indexed GEP indices whenDan Gohman2009-05-272-10/+44
| | | | | | | | | | | | | possible. For example, it now emits %p.2.ip.1 = getelementptr [3 x [3 x double]]* %p, i64 2, i64 %tmp, i64 1 instead of the equivalent but less obvious %p.2.ip.1 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %tmp, i64 19 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72452 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach BasicAliasAnalysis to understand constant gep indices that fallDan Gohman2009-05-272-4/+52
| | | | | | | | | | | | | | beyond their associated static array type. I believe that this fixes a legitimate bug, because BasicAliasAnalysis already has code to check for this condition that works for non-constant indices, however it was missing the case of constant indices. With this change, it checks for both. This fixes PR4267, and miscompiles of SPEC 188.ammp and 464.h264.href. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72451 91177308-0d34-0410-b5e6-96231b3b80d8
* Start of refactoring LegalizeDAG so that we don't need specialized Eli Friedman2009-05-271-1185/+363
| | | | | | | | handling for every single opcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72447 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't abuse the quirky behavior of LegalizeDAG for XINT_TO_FP and Eli Friedman2009-05-272-10/+13
| | | | | | | | | | FP_TO_XINT. Necessary for some cleanups I'm working on. Updated from the previous version (r72431) to fix a bug and make some things a bit clearer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72445 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for (llvm-gcc-4.2) 72442 (PR 4242).Dale Johannesen2009-05-261-0/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72443 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out r72431, it is causing a number of compilation crashes with clang.Daniel Dunbar2009-05-262-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72436 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CPU capabilities for AMD machinesStefanus Du Toit2009-05-263-3/+31
| | | | | | | | | | | | | | | | | - added processors k8-sse3, opteron-sse3, athlon64-sse3, amdfam10, and barcelona with appropriate sse3/4a levels - added FeatureSSE4A for amdfam10 processors in X86Subtarget: - added hasSSE4A - updated AutoDetectSubtargetFeatures to detect SSE4A - updated GetCurrentX86CPU to detect family 15 with sse3 as k8-sse3 and family 10h as amdfam10 New processor names match those used by gcc. Patch by Paul Redmond! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72434 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't abuse the quirky behavior of LegalizeDAG for XINT_TO_FP andEli Friedman2009-05-262-6/+6
| | | | | | | | FP_TO_XINT. Necessary for some cleanups I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72431 91177308-0d34-0410-b5e6-96231b3b80d8
* For the new ar --plugin libLLVMgold.so to work we need libLTO linked withEdwin Török2009-05-261-1/+1
| | | | | | | | | | | | pthreads, otherwise ar complains of unresolved references to pthread_mutex_*. LTO doesn't actually use pthreads, but ManagedStatic does. Fix this by linking in LIBS (that contains pthreads) for LTO and gold. For now this links in more libs than needed (libffi for example), we can figure out later how to link in those libs per-tool later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72430 91177308-0d34-0410-b5e6-96231b3b80d8
* LiveVariables::VarInfo contains an AliveBlocks BitVector, which has as manyJeffrey Yasskin2009-05-264-19/+17
| | | | | | | | | | | entries as there are basic blocks in the function. LiveVariables::getVarInfo creates a VarInfo struct for every register in the function, leading to quadratic space use. This patch changes the BitVector to a SparseBitVector, which doesn't help the worst-case memory use but does reduce the actual use in very long functions with short-lived variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72426 91177308-0d34-0410-b5e6-96231b3b80d8
* For the return type of SCEVUDivExpr, use the RHS' type instead ofDan Gohman2009-05-261-1/+6
| | | | | | | | | that of the LHS. It doesn't matter for correctness, but the LHS is more likely than the RHS to be a pointer type in exotic cases, and it's more tidy to have it return the integer type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72424 91177308-0d34-0410-b5e6-96231b3b80d8
* Give SCEVNaryExpr a doxygen comment.Dan Gohman2009-05-261-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72423 91177308-0d34-0410-b5e6-96231b3b80d8
* In cases where a pointer value is an operand of a multiplication orDan Gohman2009-05-262-3/+103
| | | | | | | | division operation, don't attempt to use the operation's value as the base of a getelementptr. This fixes PR4271. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72422 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a bunch of dead code from LegalizeDAG.Eli Friedman2009-05-261-3667/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72414 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate VarInfo::UsedBlocks.Evan Cheng2009-05-264-17/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72411 91177308-0d34-0410-b5e6-96231b3b80d8
* make memdep use the getModRefInfo method for stores instead of theChris Lattner2009-05-252-1/+22
| | | | | | | | low-level alias() method, allowing it to reason more aggressively about pointers into constant memory. PR4189 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72403 91177308-0d34-0410-b5e6-96231b3b80d8
* Audit the type constructors. Previously it was possible to create [0 x void]Nick Lewycky2009-05-251-7/+11
| | | | | | | | or use labels as members of structures for example. Also included a couple of whitespace fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72402 91177308-0d34-0410-b5e6-96231b3b80d8
* add some late optimizations that GCC does. It thinks these are a winChris Lattner2009-05-251-0/+14
| | | | | | | even on Core2, not just AMD processors which was a surprise to me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72396 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoChris Lattner2009-05-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72395 91177308-0d34-0410-b5e6-96231b3b80d8
* we should eventually add -march=atom and the new atom movbe instruction.Chris Lattner2009-05-251-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72387 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the crash debugger to actually bisect globals once it's determined that itNick Lewycky2009-05-251-1/+1
| | | | | | | can't just eliminate all global initializers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72378 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a bisection step on the list of instructions before doing the linearNick Lewycky2009-05-251-0/+92
| | | | | | | | simplification. It's not clear to me whether this can replace the first of the linear instruction simplification stages or not, so I left it in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72377 91177308-0d34-0410-b5e6-96231b3b80d8
* Various comment fixes.Dan Gohman2009-05-242-11/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72376 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ScalarEvolution::getSCEVAtScope to always return the original valueDan Gohman2009-05-243-27/+12
| | | | | | | | | in the case where a loop exit value cannot be computed, instead of only in some cases while using SCEVCouldNotCompute in others. This simplifies getSCEVAtScope's callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72375 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment which should hopefully make the purpose of this method a Eli Friedman2009-05-241-0/+3
| | | | | | | | bit clearer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72374 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor improvement to FCOPYSIGN to use BIT_CONVERT in cases where the Eli Friedman2009-05-241-10/+24
| | | | | | | | corresponding integer type is legal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72373 91177308-0d34-0410-b5e6-96231b3b80d8
* Move Rewriter.clear() earlier, to avoid triggerring the AssertingVH byEdwin Török2009-05-241-2/+8
| | | | | | | | one of the RecursivelyDeleteTriviallyDeadInstructions. Add a comment explaining why the cache needs to be cleared. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72372 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of clearing the rewriter, don't attempt to rewrite dead phi nodes.Edwin Török2009-05-242-3/+4
| | | | | | | Also fix 80 column violation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72371 91177308-0d34-0410-b5e6-96231b3b80d8
* When rewriting the loop exit test with the canonical induction variable,Dan Gohman2009-05-242-1/+42
| | | | | | | | leave the original comparison in place if it has other uses, since the other uses won't be dominated by the new comparison instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72369 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this code for hosts where std::vector doesn't have .data().Dan Gohman2009-05-241-1/+1
| | | | | | | Use &Ops[0] instead, which is safe since Ops will never be empty here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72368 91177308-0d34-0410-b5e6-96231b3b80d8
* When replacing a floating-point comparison with an integerDan Gohman2009-05-241-0/+1
| | | | | | | comparison, use takeName to give the integer comparison a name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72367 91177308-0d34-0410-b5e6-96231b3b80d8