summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, andChris Lattner2005-01-151-21/+58
| | | | | | ZERO_EXTEND_INREG for targets that don't support them. llvm-svn: 19573
* Common code factored out.Chris Lattner2005-01-151-24/+4
| | | | llvm-svn: 19572
* implement these methods.Chris Lattner2005-01-151-0/+52
| | | | llvm-svn: 19571
* Add support for promoting ADD/MUL.Chris Lattner2005-01-151-0/+66
| | | | | | | | Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators. Realize that if we do any promotions, we need to iterate SelectionDAG construction. llvm-svn: 19569
* Add new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.Chris Lattner2005-01-152-17/+57
| | | | llvm-svn: 19568
* Add intitial support for promoting some operators.Chris Lattner2005-01-151-7/+119
| | | | llvm-svn: 19565
* Adjust to CopyFromReg changes, implement deletion of truncating/extendingChris Lattner2005-01-143-6/+38
| | | | | | stores/loads. llvm-svn: 19562
* Start implementing truncating stores and extending loads.Chris Lattner2005-01-142-7/+72
| | | | llvm-svn: 19559
* Improve compatibility with accChris Lattner2005-01-141-2/+2
| | | | llvm-svn: 19549
* Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.Chris Lattner2005-01-134-8/+14
| | | | 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
* Legalize new node, add assertion.Chris Lattner2005-01-131-0/+16
| | | | llvm-svn: 19527
* Print new node.Chris Lattner2005-01-131-0/+1
| | | | llvm-svn: 19526
* Do not fold (zero_ext (sign_ext V)) -> (sign_ext V), they are not the same.Chris Lattner2005-01-121-2/+2
| | | | | | This fixes llvm-test/SingleSource/Regression/C/casts.c llvm-svn: 19519
* New methodChris Lattner2005-01-121-0/+33
| | | | llvm-svn: 19517
* Fix sign extend to long. When coming from sbyte, we used to generate:Chris Lattner2005-01-121-2/+2
| | | | | | | | | | | | | | | | movsbl 4(%esp), %eax movl %eax, %edx sarl $7, %edx Now we generate: movsbl 4(%esp), %eax movl %eax, %edx sarl $31, %edx Which is right. llvm-svn: 19515
* Shut up warnings with GCC 3.4.3 about uninitialized variables.Reid Spencer2005-01-121-2/+1
| | | | llvm-svn: 19512
* Add an option to view the selection dags as they are generated.Chris Lattner2005-01-121-0/+11
| | | | llvm-svn: 19498
* Print the value types in the nodes of the graphChris Lattner2005-01-111-0/+19
| | | | llvm-svn: 19485
* add an assertion, avoid creating copyfromreg/copytoreg pairs that are theChris Lattner2005-01-111-2/+5
| | | | | | same for PHI nodes. llvm-svn: 19484
* Squelch optimized warning.Chris Lattner2005-01-111-0/+1
| | | | llvm-svn: 19475
* Teach legalize to lower MEMSET/MEMCPY/MEMMOVE operations if the targetChris Lattner2005-01-111-7/+52
| | | | | | does not support them. llvm-svn: 19465
* Print new operations.Chris Lattner2005-01-111-0/+3
| | | | llvm-svn: 19464
* Turn memset/memcpy/memmove into the corresponding operations.Chris Lattner2005-01-111-52/+15
| | | | llvm-svn: 19463
* shift X, 0 -> XChris Lattner2005-01-111-0/+6
| | | | llvm-svn: 19453
* Print SelectionDAGs bottom up, include extra info in the node labelsChris Lattner2005-01-111-3/+38
| | | | llvm-svn: 19447
* Add a marker for the graph root.Chris Lattner2005-01-101-0/+6
| | | | llvm-svn: 19445
* Put the operation name in each node, put the function name on the graph.Chris Lattner2005-01-101-0/+17
| | | | llvm-svn: 19444
OpenPOWER on IntegriCloud