summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tracking the instructions causing loads and stores provides more information ↵Andrew Lenharth2005-06-291-2/+2
| | | | | | than just the pointer being loaded or stored llvm-svn: 22311
* If we support structs as va_list, we must pass pointers to them to va_copyAndrew Lenharth2005-06-221-4/+5
| | | | | | See last commit for LangRef, this implements it on all targets. llvm-svn: 22273
* core changes for varargsAndrew Lenharth2005-06-181-18/+12
| | | | llvm-svn: 22254
* Fix construction of ioport intrinsics, fixing X86/io.llx and io-port.llxChris Lattner2005-05-141-4/+10
| | | | llvm-svn: 22026
* Eliminate special purpose hacks for dynamic_stack_alloc.Chris Lattner2005-05-141-3/+8
| | | | llvm-svn: 22015
* LowerOperation takes a dagChris Lattner2005-05-141-1/+1
| | | | llvm-svn: 22004
* Align doubles on 8-byte boundaries if possible.Chris Lattner2005-05-131-0/+9
| | | | llvm-svn: 21993
* Add an isTailCall flag to LowerCallToChris Lattner2005-05-131-3/+4
| | | | llvm-svn: 21958
* Emit function entry code after lowering hte arguments.Chris Lattner2005-05-131-2/+2
| | | | llvm-svn: 21931
* Allow targets to emit code into the entry block of each functionChris Lattner2005-05-131-0/+2
| | | | llvm-svn: 21930
* Pass calling convention to use into lower call toChris Lattner2005-05-121-3/+4
| | | | llvm-svn: 21900
* wrap long lineChris Lattner2005-05-111-1/+2
| | | | llvm-svn: 21870
* The semantics of cast X to bool are a comparison against zero, not a truncation!Chris Lattner2005-05-091-0/+5
| | | | llvm-svn: 21833
* Add support for matching the READPORT, WRITEPORT, READIO, WRITEIO intrinsicsChris Lattner2005-05-091-14/+28
| | | | llvm-svn: 21825
* Don't use the load/store instruction as the source pointer, use the pointerChris Lattner2005-05-091-2/+2
| | | | | | being stored/loaded through! llvm-svn: 21806
* wrap long linesChris Lattner2005-05-091-2/+4
| | | | llvm-svn: 21804
* When hitting an unsupported intrinsic, actually print itChris Lattner2005-05-051-0/+10
| | | | | | Lower debug info to noops. llvm-svn: 21698
* Implement count leading zeros (ctlz), count trailing zeros (cttz), and countAndrew Lenharth2005-05-031-0/+15
| | | | | | | | | population (ctpop). Generic lowering is implemented, however only promotion is implemented for SelectionDAG at the moment. More coming soon. llvm-svn: 21676
* Codegen and legalize sin/cos/llvm.sqrt as FSIN/FCOS/FSQRT calls. This patchChris Lattner2005-04-301-0/+25
| | | | | | | was contributed by Morten Ofstad, with some minor tweaks and bug fixes added by me. llvm-svn: 21636
* Implement Value* tracking for loads and stores in the selection DAG. This ↵Andrew Lenharth2005-04-271-2/+3
| | | | | | | | enables one to use alias analysis in the backends. (TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*. Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null. llvm-svn: 21599
* Convert tabs to spacesMisha Brukman2005-04-221-5/+4
| | | | llvm-svn: 21439
* Remove trailing whitespaceMisha Brukman2005-04-211-28/+28
| | | | llvm-svn: 21420
* Fold shift by size larger than type size to undefNate Begeman2005-04-121-8/+1
| | | | | | Make llvm undef values generate ISD::UNDEF nodes llvm-svn: 21261
* Emit BRCONDTWOWAY when possible.Chris Lattner2005-04-091-7/+6
| | | | llvm-svn: 21167
* transform fabs/fabsf calls into FABS nodes.Chris Lattner2005-04-021-29/+39
| | | | llvm-svn: 21014
* Turn -0.0 - X -> fnegChris Lattner2005-04-021-1/+13
| | | | llvm-svn: 21011
* PCMarker support for DAG and AlphaAndrew Lenharth2005-03-311-0/+6
| | | | llvm-svn: 20965
* Instead of setting up the CFG edges at selectiondag construction time, setChris Lattner2005-03-301-7/+15
| | | | | | | them up after the code has been emitted. This allows targets to select one mbb as multiple mbb's as needed. llvm-svn: 20937
* Fix a bug that andrew noticed where we do not correctly sign/zero extendChris Lattner2005-03-291-4/+13
| | | | | | | | returned integer values all of the way to 64-bits (we only did it to 32-bits leaving the top bits undefined). This causes problems for targets like alpha whose ABI's define the top bits too. llvm-svn: 20926
* Change interface to LowerCallTo to take a boolean isVarArg argument.Nate Begeman2005-03-261-3/+6
| | | | llvm-svn: 20842
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-3/+3
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Fix compilation errors with VS 2005, patch by Aaron Gray.Misha Brukman2005-02-171-0/+3
| | | | llvm-svn: 20231
* Don't sink argument loads into loops or other bad places. This disables ↵Chris Lattner2005-02-171-1/+8
| | | | | | folding of argument loads with instructions that are not in the entry block. llvm-svn: 20228
* Adjust to changes in SelectionDAG interface.Chris Lattner2005-01-231-2/+2
| | | | llvm-svn: 19779
* Get this to work for 64-bit systems.Chris Lattner2005-01-221-6/+11
| | | | llvm-svn: 19763
* 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
OpenPOWER on IntegriCloud