summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix some code in the current node combining code, spotted when it was movedNate Begeman2005-09-011-11/+3
| | | | | | | | | | over to DAGCombiner.cpp 1. Don't assume that SetCC returns i1 when folding (xor (setcc) constant) 2. Don't duplicate code in folding AND with AssertZext that is handled by MaskedValueIsZero llvm-svn: 23196
* Implement first round of feedback from chris (there's still a couple thingsNate Begeman2005-09-011-201/+137
| | | | | | left to do). llvm-svn: 23195
* It is NDEBUG not _NDEBUGChris Lattner2005-09-012-3/+3
| | | | llvm-svn: 23186
* Add the rest of the currently implemented visit routines to the switchNate Begeman2005-09-011-22/+36
| | | | | | statement in visit(). llvm-svn: 23185
* First pass at the DAG Combiner. It isn't used anywhere yet, but it shouldNate Begeman2005-09-011-0/+1056
| | | | | | | be mostly functional. It currently has all folds from SelectionDAG.cpp that do not involve a condition code. llvm-svn: 23184
* If a function has live ins/outs, print themChris Lattner2005-08-311-1/+23
| | | | llvm-svn: 23181
* Allow targets to custom expand shifts that are too large for their registersChris Lattner2005-08-311-0/+39
| | | | llvm-svn: 23173
* Fix VC++ precedence warningsJeff Cohen2005-08-311-2/+2
| | | | llvm-svn: 23169
* Sigh, not my day. Fix typo.Nate Begeman2005-08-311-1/+1
| | | | llvm-svn: 23166
* Fix a mistake in my previous patch pointed out by sabre; the AssertZextNate Begeman2005-08-311-2/+3
| | | | | | case in MaskedValueIsZero was wrong. llvm-svn: 23165
* Remove some unnecessary casts, and add the AssertZext case toNate Begeman2005-08-311-2/+3
| | | | | | MaskedValueIsZero. llvm-svn: 23164
* Allow physregs to occur in the dag with multiple types. Though I don't ↵Chris Lattner2005-08-301-12/+8
| | | | | | | | likethis, it is a requirement on PPC, which can have an f32 value in r3 at onepoint in a function and a f64 value in r3 at another point. :( This fixes compilation of mesa llvm-svn: 23161
* When checking the fixed intervals, don't forget to check for register aliases.Chris Lattner2005-08-301-5/+11
| | | | | | This fixes PR621 and Regression/CodeGen/X86/2005-08-30-RegAllocAliasProblem.ll llvm-svn: 23158
* Fix FreeBench/fourinarow with the dag isel, by not adding a bogus resultChris Lattner2005-08-301-4/+1
| | | | | | to SHIFT_PARTS nodes llvm-svn: 23151
* Fix a miscompile of PtrDist/bc. Sign extending bools is not the right thing,Chris Lattner2005-08-301-1/+4
| | | | | | at least tends to expose problems elsewhere. llvm-svn: 23149
* Remove a bogus piece of my AssertSext/AssertZext patch. oops.Nate Begeman2005-08-301-2/+0
| | | | llvm-svn: 23148
* Add support for AssertSext and AssertZext, folding other extensions withNate Begeman2005-08-302-9/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | them. This allows for elminination of redundant extends in the entry blocks of functions on PowerPC. Add support for i32 x i32 -> i64 multiplies, by recognizing when the inputs to ISD::MUL in ExpandOp are actually just extended i32 values and not real i64 values. this allows us to codegen int mulhs(int a, int b) { return ((long long)a * b) >> 32; } as: _mulhs: mulhw r3, r4, r3 blr instead of: _mulhs: mulhwu r2, r4, r3 srawi r5, r3, 31 mullw r5, r4, r5 add r2, r2, r5 srawi r4, r4, 31 mullw r3, r4, r3 add r3, r2, r3 blr with a similar improvement on x86. llvm-svn: 23147
* Name this variable to be what it really is!Chris Lattner2005-08-301-4/+4
| | | | llvm-svn: 23145
* Handle CopyToReg nodes with flag operands correctlyChris Lattner2005-08-301-1/+6
| | | | llvm-svn: 23144
* Add a hack to avoid some horrible code in some cases by always emittingChris Lattner2005-08-291-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | token chains first. For this C function: int test() { int i; for (i = 0; i < 100000; ++i) foo(); } Instead of emitting this (condition before call) .LBB_test_1: ; no_exit addi r30, r30, 1 lis r2, 1 ori r2, r2, 34464 cmpw cr2, r30, r2 bl L_foo$stub bne cr2, .LBB_test_1 ; no_exit Emit this: .LBB_test_1: ; no_exit bl L_foo$stub addi r30, r30, 1 lis r2, 1 ori r2, r2, 34464 cmpw cr0, r30, r2 bne cr0, .LBB_test_1 ; no_exit Which makes it so we don't have to save/restore cr2 in the prolog/epilog of the function. This also makes the code much more similar to what the pattern isel produces. llvm-svn: 23135
* Add a new API for NateChris Lattner2005-08-291-0/+27
| | | | llvm-svn: 23131
* Some of us cared about the the promote pathAndrew Lenharth2005-08-291-0/+4
| | | | llvm-svn: 23130
* Fix an infinite loop on x86Chris Lattner2005-08-291-1/+1
| | | | llvm-svn: 23129
* Fix a bug in my previous patch that was using the wrong iterator. This fixesChris Lattner2005-08-291-1/+1
| | | | | | Olden/bisort among others. llvm-svn: 23124
* Fix a bug in ReplaceAllUsesWithChris Lattner2005-08-281-1/+1
| | | | llvm-svn: 23122
* Disable this code, which broke many tests last nightChris Lattner2005-08-271-1/+1
| | | | llvm-svn: 23114
* fix PHI node emission for basic blocks that have select_cc's in them on ppc32Chris Lattner2005-08-271-2/+3
| | | | llvm-svn: 23113
* Nate noticed that Andrew never did this. This fixes PR600Chris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23110
* Don't copy regs that are only used in the entry block into a vreg. ThisChris Lattner2005-08-261-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | changes the code generated for: short %test(short %A) { %B = xor short %A, -32768 ret short %B } to: _test: xori r2, r3, 32768 xoris r2, r2, 65535 extsh r3, r2 blr instead of: _test: rlwinm r2, r3, 0, 16, 31 xori r2, r3, 32768 xoris r2, r2, 65535 extsh r3, r2 blr llvm-svn: 23109
* Make this code safe for when loadRegFromStackSlot inserts multiple instructions.Chris Lattner2005-08-261-1/+13
| | | | llvm-svn: 23108
* Checking types here is not safe, because multiple types can map to the sameChris Lattner2005-08-261-3/+0
| | | | | | register class. llvm-svn: 23103
* Call the InsertAtEndOfBasicBlock hook if the usesCustomDAGSchedInserterChris Lattner2005-08-262-1/+22
| | | | | | flag is set on an instruction. llvm-svn: 23098
* Revampt ReplaceAllUsesWith to be more efficient and easier to use.Chris Lattner2005-08-261-5/+53
| | | | llvm-svn: 23087
* Change ConstantPoolSDNode to actually hold the Constant itself instead ofChris Lattner2005-08-264-27/+24
| | | | | | | | putting it into the constant pool. This allows the isel machinery to create constants that it will end up deciding are not needed, without them ending up in the resultant function constant pool. llvm-svn: 23081
* Fix a huge annoyance: SelectNodeTo took types before the opcode unlikeChris Lattner2005-08-261-19/+17
| | | | | | every other SD API. Fix it to take the opcode before the types. llvm-svn: 23079
* the 5th operand is the 4th numberChris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23074
* Add support for targets that want to custom expand select_cc in some cases.Chris Lattner2005-08-261-6/+24
| | | | llvm-svn: 23071
* Allow LowerOperation to return a null SDOperand in case it wants to lowerChris Lattner2005-08-261-21/+39
| | | | | | some things given to it, but not all. llvm-svn: 23070
* Fix a nasty bug from a previous patch of mineChris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23069
* New fold for SELECT_CCNate Begeman2005-08-251-1/+19
| | | | llvm-svn: 23058
* Don't auto-cse nodes that return flagsChris Lattner2005-08-251-17/+38
| | | | llvm-svn: 23055
* add printer support for flag operandsChris Lattner2005-08-251-0/+1
| | | | llvm-svn: 23054
* simplify the code a bit using isOperationLegalChris Lattner2005-08-251-4/+3
| | | | llvm-svn: 23053
* Add support for flag operandsChris Lattner2005-08-251-8/+18
| | | | llvm-svn: 23050
* ADd support for TargetConstantPool nodesChris Lattner2005-08-251-1/+14
| | | | llvm-svn: 23041
* add a new TargetFrameIndex nodeChris Lattner2005-08-251-1/+13
| | | | llvm-svn: 23035
* add a methodChris Lattner2005-08-241-0/+6
| | | | llvm-svn: 23027
* Add ReplaceAllUsesWith that can take a vector of replacement values.Chris Lattner2005-08-241-15/+90
| | | | | | Add some foldings to hopefully help the illegal setcc issue, and move some code around. llvm-svn: 23025
* Add support for external symbols, and support for variable arity instructionsChris Lattner2005-08-241-5/+12
| | | | llvm-svn: 23022
* Fix pasto that prevented VT ndoes from showing up in -view-isel-dags correctlyChris Lattner2005-08-241-1/+1
| | | | llvm-svn: 23021
OpenPOWER on IntegriCloud