summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix a dumb bug of mine where we were mishandling the PPC ABI (undef handling).Chris Lattner2005-08-291-15/+16
| | | | | | This fixes voronoi and bh in Olden, allowing all of olden to pass! llvm-svn: 23133
* 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
* Allow bugpoint+PPC codegen to use fsqrtChris Lattner2005-08-291-0/+3
| | | | llvm-svn: 23128
* Fix a bug the last patch exposed in treeadd among othersChris Lattner2005-08-291-1/+1
| | | | llvm-svn: 23127
* A hack to fix a problem folding immedaites. This fixes Olden/power.Chris Lattner2005-08-291-4/+8
| | | | llvm-svn: 23126
* Fix order of operands for copytoreg node when emitting calls. This fixesChris Lattner2005-08-291-1/+1
| | | | | | | Olden/msFix order of operands for copytoreg node when emitting calls. This fixes Olden/mstt. llvm-svn: 23125
* 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
* add operands in the correct orderChris Lattner2005-08-291-2/+2
| | | | llvm-svn: 23123
* Fix a bug in ReplaceAllUsesWithChris Lattner2005-08-281-1/+1
| | | | llvm-svn: 23122
* Fix a bug in FP_EXTEND, implement FP_TO_SINTChris Lattner2005-08-281-3/+15
| | | | llvm-svn: 23121
* fix an assertion failure in treeaddChris Lattner2005-08-281-2/+2
| | | | llvm-svn: 23120
* Adjust to member variable name change.Reid Spencer2005-08-271-1/+1
| | | | llvm-svn: 23119
* Change the names of member variables per Chris' instructions, and documentReid Spencer2005-08-271-2/+2
| | | | | | them more clearly. llvm-svn: 23118
* Implement PR614:Reid Spencer2005-08-275-5/+7414
| | | | | | | | | | These changes modify the makefiles so that the output of flex and bison are placed in the SRC directory, not the OBJ directory. It is intended that they be checked in as any other LLVM source so that platforms without convenient access to flex/bison can be compiled. From now on, if you change a .y or .l file you *must* also commit the generated .cpp and .h files. llvm-svn: 23115
* 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
* The condition register being branched on may not be cr0, as such, print it.Chris Lattner2005-08-261-6/+6
| | | | | | This fixes: UnitTests/2005-07-17-INT-To-FP.c llvm-svn: 23112
* Propagate cr# from COND_BRANCH to the actual branch instruction as appropriateChris Lattner2005-08-261-2/+3
| | | | llvm-svn: 23111
* 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
* allow code using mtcrf to assembleChris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23107
* Remove operand type 'crbit', since it is no longer usedNate Begeman2005-08-262-11/+0
| | | | llvm-svn: 23106
* teach getClass what a condition reg isChris Lattner2005-08-261-3/+5
| | | | llvm-svn: 23105
* Minor cleanups:Chris Lattner2005-08-261-7/+8
| | | | | | | * avoid calling getClass() multiple times (it is relatively expensive) * Allow -disable-fp-elim to turn of frame pointer elimination. llvm-svn: 23104
* Checking types here is not safe, because multiple types can map to the sameChris Lattner2005-08-261-3/+0
| | | | | | register class. llvm-svn: 23103
* implement SELECT_CC fully for the DAG->DAG isel!Chris Lattner2005-08-264-2/+79
| | | | llvm-svn: 23101
* spell this rightChris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23099
* Call the InsertAtEndOfBasicBlock hook if the usesCustomDAGSchedInserterChris Lattner2005-08-262-1/+22
| | | | | | flag is set on an instruction. llvm-svn: 23098
* Add a flagChris Lattner2005-08-261-0/+1
| | | | llvm-svn: 23092
* Make fsel emission work with both the pattern and dag-dag selectors, byChris Lattner2005-08-264-14/+34
| | | | | | | | giving it a non-instruction opcode. The dag->dag selector used to not select the operands of the fsel, because it thought that whole tree was already selected. llvm-svn: 23091
* implement the fold for:Chris Lattner2005-08-261-0/+21
| | | | | | | | | | | | | | | | bool %test(int %X, int %Y) { %C = setne int %X, 0 ret bool %C } to: _test: addic r2, r3, -1 subfe r3, r2, r3 blr llvm-svn: 23089
* Changes to adjust to new ReplaceAllUsesWith syntax. Change FP_EXTEND toChris Lattner2005-08-261-13/+15
| | | | | | just return its input, instead of emitting an explicit copy. llvm-svn: 23088
* Revampt ReplaceAllUsesWith to be more efficient and easier to use.Chris Lattner2005-08-261-5/+53
| | | | llvm-svn: 23087
* Remove some code made dead by the fsel patchNate Begeman2005-08-261-1/+0
| | | | llvm-svn: 23085
* now that fsel is formed during legalization, this code is deadChris Lattner2005-08-262-102/+0
| | | | llvm-svn: 23084
* implement the other half of the select_cc -> fsel lowering, which handlesChris Lattner2005-08-261-16/+37
| | | | | | when the RHS of the comparison is 0.0. Turn this on by default. llvm-svn: 23083
* Fix a bug in my previous checkinChris Lattner2005-08-262-2/+2
| | | | llvm-svn: 23082
* Change ConstantPoolSDNode to actually hold the Constant itself instead ofChris Lattner2005-08-269-44/+51
| | | | | | | | 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 some warnings in an optimized buildChris Lattner2005-08-262-3/+3
| | | | llvm-svn: 23080
* Fix a huge annoyance: SelectNodeTo took types before the opcode unlikeChris Lattner2005-08-262-94/+92
| | | | | | every other SD API. Fix it to take the opcode before the types. llvm-svn: 23079
* Fix JIT encoding of conditional branchesNate Begeman2005-08-262-27/+19
| | | | llvm-svn: 23076
* add initial support for converting select_cc -> fsel in the legalizerChris Lattner2005-08-263-2/+67
| | | | | | | | | instead of in the backend. This currently handles fsel cases with registers, but doesn't have the 0.0 and -0.0 optimization enabled yet. Once this is finished, special hack for fp immediates can go away. llvm-svn: 23075
* the 5th operand is the 4th numberChris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23074
* SUBFIC produces two results, not one.Nate Begeman2005-08-261-4/+4
| | | | llvm-svn: 23073
* Implement SHL_PARTS and SRL_PARTSNate Begeman2005-08-261-0/+38
| | | | llvm-svn: 23072
* Add support for targets that want to custom expand select_cc in some cases.Chris Lattner2005-08-261-6/+24
| | | | llvm-svn: 23071
OpenPOWER on IntegriCloud