summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Implicitly defined registers can clobber callee saved registers too!Chris Lattner2005-01-221-0/+6
| | | | | | This fixes the return-address-not-being-saved problem in the Alpha backend. llvm-svn: 19741
* More bugfixes for IA64 shifts.Chris Lattner2005-01-221-2/+2
| | | | llvm-svn: 19739
* Fix problems with non-x86 targets.Chris Lattner2005-01-221-3/+3
| | | | llvm-svn: 19738
* Add a nasty hack to fix Alpha/IA64 multiplies by a power of two.Chris Lattner2005-01-221-4/+9
| | | | llvm-svn: 19737
* Remove unneeded line.Chris Lattner2005-01-211-1/+0
| | | | llvm-svn: 19736
* test commitChris Lattner2005-01-211-0/+1
| | | | llvm-svn: 19735
* Unary token factor nodes are unneeded.Chris Lattner2005-01-211-0/+2
| | | | llvm-svn: 19727
* Refactor libcall code a bit. Initial implementation of expanding int -> FPChris Lattner2005-01-211-50/+121
| | | | | | operations for 64-bit integers. llvm-svn: 19724
* Simplify the shift-expansion code.Chris Lattner2005-01-201-8/+7
| | | | llvm-svn: 19721
* Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.Chris Lattner2005-01-201-2/+41
| | | | llvm-svn: 19715
* implement add_parts/sub_parts.Chris Lattner2005-01-201-3/+8
| | | | llvm-svn: 19714
* Add missing entry.Chris Lattner2005-01-201-0/+1
| | | | llvm-svn: 19712
* Support targets that do not use i8 shift amounts.Chris Lattner2005-01-191-0/+4
| | | | llvm-svn: 19707
* Add an assertion that would have made more sense to duraidChris Lattner2005-01-191-1/+3
| | | | llvm-svn: 19704
* Add support for targets that pass args in registers to calls.Chris Lattner2005-01-191-6/+25
| | | | llvm-svn: 19703
* Fold single use token factor nodes into other token factor nodes.Chris Lattner2005-01-191-2/+10
| | | | llvm-svn: 19701
* Realize the individual pieces of an expanded copytoreg/store/load areChris Lattner2005-01-191-9/+16
| | | | | | independent of each other. llvm-svn: 19700
* Know some identities about tokenfactor nodes.Chris Lattner2005-01-191-0/+11
| | | | llvm-svn: 19699
* Know some simple identities. This improves codegen for (1LL << N).Chris Lattner2005-01-191-0/+13
| | | | llvm-svn: 19698
* Just in case, handle something that is both a use and a def.Chris Lattner2005-01-191-1/+2
| | | | llvm-svn: 19696
* When an instruction moves, make sure to update the VarInfo::Kills list asChris Lattner2005-01-191-3/+10
| | | | | | | well as all of teh other stuff in livevar. This fixes the compiler crash on fourinarow last night. llvm-svn: 19695
* Use the TargetInstrInfo::commuteInstruction method to commute instructionsChris Lattner2005-01-191-6/+17
| | | | | | instead of doing it manually. llvm-svn: 19685
* Implement a way of expanding shifts. This applies to targets that offerChris Lattner2005-01-191-3/+94
| | | | | | | | select operations or to shifts that are by a constant. This automatically implements (with no special code) all of the special cases for shift by 32, shift by < 32 and shift by > 32. llvm-svn: 19679
* Zero is cheaper than sign extend.Chris Lattner2005-01-181-1/+1
| | | | llvm-svn: 19675
* Fix some fixmes (promoting bools for select and brcond), fix promotionChris Lattner2005-01-181-8/+43
| | | | | | of zero and sign extends. llvm-svn: 19671
* Keep track of the retval type as well.Chris Lattner2005-01-181-2/+5
| | | | llvm-svn: 19670
* Teach legalize to promote copy(from|to)reg, instead of making the isel passChris Lattner2005-01-182-26/+13
| | | | | | | | | do it. This results in better code on X86 for floats (because if strict precision is not required, we can elide some more expensive double -> float conversions like the old isel did), and allows other targets to emit CopyFromRegs that are not legal for arguments. llvm-svn: 19668
* Teach legalize to promote SetCC results.Chris Lattner2005-01-181-0/+8
| | | | llvm-svn: 19657
* Allow setcc operations to have nonbool types.Chris Lattner2005-01-183-42/+46
| | | | llvm-svn: 19656
* Fix the completely broken FP constant folds for setcc's.Chris Lattner2005-01-181-4/+4
| | | | llvm-svn: 19651
* Non-volatile loads can be freely reordered against each other. This fixesChris Lattner2005-01-171-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | X86/reg-pressure.ll again, and allows us to do nice things in other cases. For example, we now codegen this sort of thing: int %loadload(int *%X, int* %Y) { %Z = load int* %Y %Y = load int* %X ;; load between %Z and store %Q = add int %Z, 1 store int %Q, int* %Y ret int %Y } Into this: loadload: mov %EAX, DWORD PTR [%ESP + 4] mov %EAX, DWORD PTR [%EAX] mov %ECX, DWORD PTR [%ESP + 8] inc DWORD PTR [%ECX] ret where we weren't able to form the 'inc [mem]' before. This also lets the instruction selector emit loads in any order it wants to, which can be good for register pressure as well. llvm-svn: 19644
* Don't call SelectionDAG.getRoot() directly, go through a forwarding method.Chris Lattner2005-01-171-21/+30
| | | | llvm-svn: 19642
* Implement a target independent optimization to codegen arguments only intoChris Lattner2005-01-171-12/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the basic block that uses them if possible. This is a big win on X86, as it lets us fold the argument loads into instructions and reduce register pressure (by not loading all of the arguments in the entry block). For this (contrived to show the optimization) testcase: int %argtest(int %A, int %B) { %X = sub int 12345, %A br label %L L: %Y = add int %X, %B ret int %Y } we used to produce: argtest: mov %ECX, DWORD PTR [%ESP + 4] mov %EAX, 12345 sub %EAX, %ECX mov %EDX, DWORD PTR [%ESP + 8] .LBBargtest_1: # L add %EAX, %EDX ret now we produce: argtest: mov %EAX, 12345 sub %EAX, DWORD PTR [%ESP + 4] .LBBargtest_1: # L add %EAX, DWORD PTR [%ESP + 8] ret This also fixes the FIXME in the code. BTW, this occurs in real code. 164.gzip shrinks from 8623 to 8608 lines of .s file. The stack frame in huft_build shrinks from 1644->1628 bytes, inflate_codes shrinks from 116->108 bytes, and inflate_block from 2620->2612, due to fewer spills. Take that alkis. :-) llvm-svn: 19639
* Refactor code into a new method.Chris Lattner2005-01-172-13/+23
| | | | llvm-svn: 19635
* Implement legalize of call nodes.Chris Lattner2005-01-161-3/+17
| | | | llvm-svn: 19617
* Revamp supported ops. Instead of just being supported or not, we now keepChris Lattner2005-01-161-11/+54
| | | | | | | | | | track of how to deal with it, and provide the target with a hook that they can use to legalize arbitrary operations in arbitrary ways. Implement custom lowering for a couple of ops, implement promotion for select operations (which x86 needs). llvm-svn: 19613
* add method stubChris Lattner2005-01-161-0/+5
| | | | llvm-svn: 19612
* Don't mash stuff together.Chris Lattner2005-01-161-1/+1
| | | | llvm-svn: 19611
* Implement some more missing promotions.Chris Lattner2005-01-161-8/+19
| | | | llvm-svn: 19606
* Clarify assertion.Chris Lattner2005-01-161-1/+1
| | | | llvm-svn: 19597
* Add assertions.Chris Lattner2005-01-161-0/+31
| | | | llvm-svn: 19596
* Add support for promoted registers being live across blocks.Chris Lattner2005-01-161-1/+22
| | | | llvm-svn: 19595
* Move some information into the TargetLowering object.Chris Lattner2005-01-161-56/+5
| | | | llvm-svn: 19583
* Use the new TLI method to get this.Chris Lattner2005-01-161-3/+1
| | | | llvm-svn: 19582
* legalize a bunch of operations that I missed.Chris Lattner2005-01-161-9/+19
| | | | llvm-svn: 19580
* Add support for targets that require promotions.Chris Lattner2005-01-161-1/+6
| | | | llvm-svn: 19579
* Fix some serious bugs in promotion.Chris Lattner2005-01-161-2/+2
| | | | llvm-svn: 19578
* Eliminate unneeded extensions.Chris Lattner2005-01-161-0/+9
| | | | llvm-svn: 19577
* Implement promotion of a whole bunch more operators. I think that this isChris Lattner2005-01-151-12/+174
| | | | | | basically everything. llvm-svn: 19576
* Print extra type for nodes with extra type info.Chris Lattner2005-01-152-0/+4
| | | | llvm-svn: 19575
OpenPOWER on IntegriCloud