summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Reimplementation of the X86 pattern isel. This is still missing many largeChris Lattner2005-01-071-0/+1415
| | | | | | pieces, but can already do amazing things in some cases. llvm-svn: 19334
* This file is now dead.Chris Lattner2005-01-071-131/+0
| | | | llvm-svn: 19333
* Add a new prototypeChris Lattner2005-01-071-2/+7
| | | | llvm-svn: 19332
* Initial implementation of the SelectionDAGISel class. This contains mostChris Lattner2005-01-071-0/+853
| | | | | | of the code for lowering from LLVM code to a SelectionDAG. llvm-svn: 19331
* This file is obsoleteChris Lattner2005-01-071-278/+0
| | | | llvm-svn: 19330
* Initial implementation of the DAG legalization. This still has a long wayChris Lattner2005-01-071-0/+703
| | | | | | to go, but it does work for some non-trivial cases now. llvm-svn: 19329
* Complete rewrite of the SelectionDAG class.Chris Lattner2005-01-071-106/+758
| | | | llvm-svn: 19327
* First draft of new Target interfaceChris Lattner2005-01-071-0/+48
| | | | llvm-svn: 19324
* Add convenience method.Chris Lattner2005-01-071-0/+4
| | | | llvm-svn: 19321
* Convert tabs to spacesMisha Brukman2005-01-071-3/+2
| | | | llvm-svn: 19320
* Add missing createXxxPass functionsJeff Cohen2005-01-074-0/+20
| | | | llvm-svn: 19319
* Add missing includeJeff Cohen2005-01-071-0/+1
| | | | llvm-svn: 19315
* Codegen -1 and -0.0 more efficiently. This implements ↵Chris Lattner2005-01-061-2/+9
| | | | | | CodeGen/X86/negatize_zero.ll llvm-svn: 19313
* No need to pessimize current code for future possibilities.Chris Lattner2005-01-061-4/+3
| | | | llvm-svn: 19311
* Put createLoopUnswitchPass() into proper namespaceJeff Cohen2005-01-061-1/+1
| | | | llvm-svn: 19306
* Add missing includeJeff Cohen2005-01-061-0/+1
| | | | llvm-svn: 19305
* Fix CBE code so that it compiles with VC++.Jeff Cohen2005-01-061-1/+1
| | | | llvm-svn: 19303
* 1. If a double FP constant must be put into a constant pool, but it can beChris Lattner2005-01-051-9/+23
| | | | | | | | | precisely represented as a float, put it into the constant pool as a float. 2. Use the cbw/cwd/cdq instructions instead of an explicit SAR for signed division. llvm-svn: 19291
* Minor optimization to allocate R8 registers in a better order.Chris Lattner2005-01-051-1/+7
| | | | llvm-svn: 19289
* To not break TBAA rules, use a union.Chris Lattner2005-01-041-5/+9
| | | | llvm-svn: 19280
* Revert elimination of global variable hack... still needed.Jeff Cohen2005-01-031-0/+7
| | | | llvm-svn: 19273
* ADC and IMUL are also commutable.Chris Lattner2005-01-031-0/+4
| | | | llvm-svn: 19264
* This hunk:Chris Lattner2005-01-021-2/+2
| | | | | | | | | | | - unsigned TrueValue = getReg(TrueVal, BB, BB->begin()); + unsigned TrueValue = getReg(TrueVal); Fixes the PPC regressions from last night. The other hunk is just a clarity improvement. llvm-svn: 19263
* Correct the case of a #include directory name, just in case.Reid Spencer2005-01-021-1/+1
| | | | llvm-svn: 19254
* Eliminate the use of the global variable hack in the X86 target that was usedJeff Cohen2005-01-021-7/+0
| | | | | | | to get Visual Studio to link in X86.lib to the executables that need it. There is another way of doing it. llvm-svn: 19252
* Disable 2->3 address promotion of add and inc instructions to LEA's. InChris Lattner2005-01-021-0/+5
| | | | | | | | addition to being three address, LEA's don't set the flags. This fixes 186.crafty. llvm-svn: 19251
* Add a new method.Chris Lattner2005-01-021-1/+10
| | | | llvm-svn: 19249
* Add support for SETNPr to lower to memory form.Chris Lattner2005-01-021-0/+1
| | | | llvm-svn: 19248
* Implement the convertToThreeAddress method, add support for inverting JP/JNPChris Lattner2005-01-022-0/+93
| | | | | | branches. llvm-svn: 19247
* Two changes here:Chris Lattner2005-01-021-1/+30
| | | | | | | | 1. Add new instructions for checking parity flags: JP, JNP, SETP, SETNP. 2. Set the isCommutable and isPromotableTo3Address bits on several instructions. llvm-svn: 19246
* Make the 2-address instruction lowering pass smarter in two ways:Chris Lattner2005-01-021-17/+61
| | | | | | | | | | | | | | | | | 1. If we are two-addressing a commutable instruction and the LHS is not the last use of the variable, see if the instruction is the last use of the RHS. If so, commute the instruction, allowing us to avoid a register-register copy in many cases for common instructions like ADD, OR, AND, etc on X86. 2. If #1 doesn't hold, and if this is an instruction that also existing in 3-address form, promote the instruction to a 3-address instruction to avoid the register-register copy. We can do this for several common instructions in X86, including ADDrr, INC, DEC, etc. This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll, overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it. llvm-svn: 19245
* Add some bits that can be set for instructions.Chris Lattner2005-01-021-0/+2
| | | | llvm-svn: 19241
* Make printing a warning message optional in CheckBytecodeOutputToConsole.Reid Spencer2005-01-021-5/+8
| | | | llvm-svn: 19240
* Implement a function to print a warning if bytecode output is to be sent toReid Spencer2005-01-011-8/+10
| | | | | | a terminal/console. llvm-svn: 19237
* Add functions for determining if the stdin/out/err is connected to aJeff Cohen2005-01-011-0/+13
| | | | | | console or not. llvm-svn: 19236
* Add functions for determining if the stdin/out/err is connected to aReid Spencer2005-01-011-0/+24
| | | | | | console or not. llvm-svn: 19233
* This is a bulk commit that implements the following primary improvements:Chris Lattner2005-01-011-78/+268
| | | | | | | | | | | | | | | | | | | | | | * We can now fold cast instructions into select instructions that have at least one constant operand. * We now optimize expressions more aggressively based on bits that are known to be zero. These optimizations occur a lot in code that uses bitfields even in simple ways. * We now turn more cast-cast sequences into AND instructions. Before we would only do this if it if all types were unsigned. Now only the middle type needs to be unsigned (guaranteeing a zero extend). * We transform sign extensions into zero extensions in several cases. This corresponds to these test/Regression/Transforms/InstCombine testcases: 2004-11-22-Missed-and-fold.ll and.ll: test28-29 cast.ll: test21-24 and-or-and.ll cast-cast-to-and.ll zeroext-and-reduce.ll llvm-svn: 19220
* Fix a FIXME: Select instructions on longs were miscompiled.Chris Lattner2005-01-011-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, improve codegen of select instructions. For this testcase: int %test(bool %C, int %A, int %B) { %D = select bool %C, int %A, int %B ret int %D } We used to generate this code: _test: cmpwi cr0, r3, 0 bne .LBB_test_2 ; .LBB_test_1: ; b .LBB_test_3 ; .LBB_test_2: ; or r5, r4, r4 .LBB_test_3: ; or r3, r5, r5 blr Now we emit: _test: cmpwi cr0, r3, 0 bne .LBB_test_2 ; .LBB_test_1: ; or r4, r5, r5 .LBB_test_2: ; or r3, r4, r4 blr -Chris llvm-svn: 19214
* Substantially improve the code generated by non-folded setcc instructions.Chris Lattner2005-01-011-33/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, instead of compiling this: bool %test(int %A, int %B) { %C = setlt int %A, %B ret bool %C } to this: test: save %sp, -96, %sp subcc %i0, %i1, %g0 bl .LBBtest_1 ! nop ba .LBBtest_2 ! nop .LBBtest_1: ! or %g0, 1, %i0 ba .LBBtest_3 ! nop .LBBtest_2: ! or %g0, 0, %i0 ba .LBBtest_3 ! nop .LBBtest_3: ! restore %g0, %g0, %g0 retl nop We now compile it to this: test: save %sp, -96, %sp subcc %i0, %i1, %g0 or %g0, 1, %i0 bl .LBBtest_2 ! nop .LBBtest_1: ! or %g0, %g0, %i0 .LBBtest_2: ! restore %g0, %g0, %g0 retl nop llvm-svn: 19213
* Implement SimplifyCFG/DeadSetCC.llChris Lattner2005-01-011-0/+8
| | | | | | | | SimplifyCFG is one of those passes that we use for final cleanup: it should not rely on other passes to clean up its garbage. This fixes the "why are trivially dead setcc's in the output of gccas" problem. llvm-svn: 19212
* Allow getZeroExtend and getSignExtend to work with boolean inputs.Chris Lattner2005-01-011-5/+13
| | | | llvm-svn: 19210
* Where do these tabs keep coming from???Jeff Cohen2004-12-311-1/+1
| | | | llvm-svn: 19203
* Mostly cleanup, but also some bug fixes, for win32/Path.cppJeff Cohen2004-12-311-38/+81
| | | | llvm-svn: 19202
* Fix a compilation error for the case where mallinfo() is not available.Reid Spencer2004-12-311-1/+1
| | | | llvm-svn: 19201
* Get rid of those nasty tabs...Jeff Cohen2004-12-311-18/+18
| | | | llvm-svn: 19199
* Bring win32/Path.cpp up to date with respect to Unix/Path.cppJeff Cohen2004-12-311-9/+104
| | | | llvm-svn: 19198
* Fix MINGW compilation errorsJeff Cohen2004-12-301-2/+2
| | | | llvm-svn: 19190
* Fix PR491 and testcase ↵Chris Lattner2004-12-291-1/+2
| | | | | | Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll llvm-svn: 19180
* Fix PR490Chris Lattner2004-12-291-0/+6
| | | | | | Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll llvm-svn: 19176
* Remove potential platform portability issue with size of "int".Reid Spencer2004-12-291-1/+3
| | | | llvm-svn: 19172
OpenPOWER on IntegriCloud