summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Support targets that do not use i8 shift amounts.Chris Lattner2005-01-191-0/+4
| | | | llvm-svn: 19707
* Teach legalize to promote copy(from|to)reg, instead of making the isel passChris Lattner2005-01-181-21/+1
| | | | | | | | | 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
* Allow setcc operations to have nonbool types.Chris Lattner2005-01-181-2/+2
| | | | llvm-svn: 19656
* 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-171-11/+22
| | | | llvm-svn: 19635
* add method stubChris Lattner2005-01-161-0/+5
| | | | llvm-svn: 19612
* Add support for promoted registers being live across blocks.Chris Lattner2005-01-161-1/+22
| | | | llvm-svn: 19595
* Use the new TLI method to get this.Chris Lattner2005-01-161-3/+1
| | | | llvm-svn: 19582
* Add support for targets that require promotions.Chris Lattner2005-01-161-1/+6
| | | | llvm-svn: 19579
* Add new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.Chris Lattner2005-01-151-1/+0
| | | | llvm-svn: 19568
* Adjust to CopyFromReg changes, implement deletion of truncating/extendingChris Lattner2005-01-141-1/+1
| | | | | | stores/loads. llvm-svn: 19562
* Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.Chris Lattner2005-01-131-2/+3
| | | | llvm-svn: 19535
* Don't forget the existing root.Chris Lattner2005-01-131-4/+2
| | | | llvm-svn: 19531
* Codegen independent ops as being independent.Chris Lattner2005-01-131-7/+21
| | | | llvm-svn: 19528
* Add an option to view the selection dags as they are generated.Chris Lattner2005-01-121-0/+11
| | | | llvm-svn: 19498
* add an assertion, avoid creating copyfromreg/copytoreg pairs that are theChris Lattner2005-01-111-2/+5
| | | | | | same for PHI nodes. llvm-svn: 19484
* Turn memset/memcpy/memmove into the corresponding operations.Chris Lattner2005-01-111-52/+15
| | | | llvm-svn: 19463
* Handle static alloca arguments to PHI nodes.Chris Lattner2005-01-091-3/+8
| | | | llvm-svn: 19409
* Use new interfaces to correctly lower varargs and return/frame address ↵Chris Lattner2005-01-091-25/+61
| | | | | | intrinsics. llvm-svn: 19407
* Add support for llvm.setjmp and longjmp. Only 3 SingleSource/UnitTests fail ↵Chris Lattner2005-01-081-1/+8
| | | | | | now. llvm-svn: 19404
* Silence VS warnings.Chris Lattner2005-01-081-3/+4
| | | | llvm-svn: 19384
* Adjust to changes in LowerCAllTo interfacesChris Lattner2005-01-081-14/+27
| | | | llvm-svn: 19374
* Add support for FP->INT conversions and back.Chris Lattner2005-01-081-17/+26
| | | | llvm-svn: 19369
* Implement support for long GEP indices on 32-bit archs and support forChris Lattner2005-01-071-3/+14
| | | | | | int GEP indices on 64-bit archs. llvm-svn: 19354
* Fix handling of dead PHI nodes.Chris Lattner2005-01-071-26/+30
| | | | llvm-svn: 19349
* 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
OpenPOWER on IntegriCloud