summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Keep track of the retval type as well.Chris Lattner2005-01-181-2/+5
| | | | llvm-svn: 19670
* Keep track of the returned value type as well.Chris Lattner2005-01-181-1/+2
| | | | llvm-svn: 19669
* 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
* Fix 124.m88ksim.Chris Lattner2005-01-181-0/+3
| | | | llvm-svn: 19667
* Add project llvm-ld to Visual StudioJeff Cohen2005-01-181-0/+140
| | | | llvm-svn: 19665
* Add project llvm-nm to Visual StudioJeff Cohen2005-01-182-0/+150
| | | | llvm-svn: 19664
* Add project llvm-ld to Visual StudioJeff Cohen2005-01-181-0/+17
| | | | llvm-svn: 19663
* Add llvm-bcanalyzer project to Visual StudioJeff Cohen2005-01-182-0/+150
| | | | llvm-svn: 19662
* Do not emit loads multiple times, potentially in the wrong places.Chris Lattner2005-01-181-2/+2
| | | | llvm-svn: 19661
* Minor changes.Tanya Lattner2005-01-181-12/+22
| | | | llvm-svn: 19660
* Eliminate bad assertions.Chris Lattner2005-01-181-0/+2
| | | | llvm-svn: 19659
* * Eliminate the TokenSet and just use the ExprMap for both tokens and values.Chris Lattner2005-01-181-14/+13
| | | | | | | | * Insert some really pedantic assertions that will notice when we emit the same loads more than one time, exposing bugs. This turns a miscompilation in bzip2 into a compile-fail. yaay. llvm-svn: 19658
* 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
* Allow setcc operations to have non-bool types.Chris Lattner2005-01-182-2/+2
| | | | llvm-svn: 19655
* Rely on the code in MatchAddress to do this work. Otherwise we fail toChris Lattner2005-01-181-11/+13
| | | | | | | match (X+Y)+(Z << 1), because we match the X+Y first, consuming the index register, then there is no place to put the Z. llvm-svn: 19652
* Fix the completely broken FP constant folds for setcc's.Chris Lattner2005-01-181-4/+4
| | | | llvm-svn: 19651
* Fix a problem where probing for addressing modes caused expressions to beChris Lattner2005-01-181-33/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emitted too early. In particular, this fixes Regression/CodeGen/X86/regpressure.ll:regpressure3. This also improves the 2nd basic block in 164.gzip:flush_block, which went from .LBBflush_block_1: # loopentry.1.i movzx %EAX, WORD PTR [dyn_ltree + 20] movzx %ECX, WORD PTR [dyn_ltree + 16] mov DWORD PTR [%ESP + 32], %ECX movzx %ECX, WORD PTR [dyn_ltree + 12] movzx %EDX, WORD PTR [dyn_ltree + 8] movzx %EBX, WORD PTR [dyn_ltree + 4] mov DWORD PTR [%ESP + 36], %EBX movzx %EBX, WORD PTR [dyn_ltree] add DWORD PTR [%ESP + 36], %EBX add %EDX, DWORD PTR [%ESP + 36] add %ECX, %EDX add DWORD PTR [%ESP + 32], %ECX add %EAX, DWORD PTR [%ESP + 32] movzx %ECX, WORD PTR [dyn_ltree + 24] add %EAX, %ECX mov %ECX, 0 mov %EDX, %ECX to .LBBflush_block_1: # loopentry.1.i movzx %EAX, WORD PTR [dyn_ltree] movzx %ECX, WORD PTR [dyn_ltree + 4] add %ECX, %EAX movzx %EAX, WORD PTR [dyn_ltree + 8] add %EAX, %ECX movzx %ECX, WORD PTR [dyn_ltree + 12] add %ECX, %EAX movzx %EAX, WORD PTR [dyn_ltree + 16] add %EAX, %ECX movzx %ECX, WORD PTR [dyn_ltree + 20] add %ECX, %EAX movzx %EAX, WORD PTR [dyn_ltree + 24] add %ECX, %EAX mov %EAX, 0 mov %EDX, %EAX ... which results in less spilling in the function. This change alone speeds up 164.gzip from 37.23s to 36.24s on apoc. The default isel takes 37.31s. llvm-svn: 19650
* Fix indentation.Chris Lattner2005-01-171-19/+18
| | | | llvm-svn: 19649
* This is a carefully contrived testcase where the X86 ISel is emitting all loadsChris Lattner2005-01-171-0/+45
| | | | | | | before other ops, causing it to spill like mad. This occurs in 164.gzip:flush_block. llvm-svn: 19648
* Don't bother using max here.Chris Lattner2005-01-171-1/+1
| | | | llvm-svn: 19647
* Do not give token factor nodes outrageous weightsChris Lattner2005-01-171-2/+5
| | | | llvm-svn: 19645
* 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
* Two changes:Chris Lattner2005-01-171-5/+74
| | | | | | | 1. Fold [mem] += (1|-1) into inc [mem]/dec [mem] to save some icache space. 2. Do not let token factor nodes prevent forming '[mem] op= val' folds. llvm-svn: 19643
* Don't call SelectionDAG.getRoot() directly, go through a forwarding method.Chris Lattner2005-01-171-21/+30
| | | | llvm-svn: 19642
* Refactor load/op/store folding into it's own method, no functionality changes.Chris Lattner2005-01-171-125/+141
| | | | llvm-svn: 19641
* 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
* Fix a major regression last night that prevented us from producing [mem] op= regChris Lattner2005-01-171-109/+111
| | | | | | | | operations. The body of the if is less indented but unmodified in this patch. llvm-svn: 19638
* Refactor code into a new method.Chris Lattner2005-01-172-13/+23
| | | | llvm-svn: 19635
* Make methods private, add a method.Chris Lattner2005-01-171-0/+3
| | | | llvm-svn: 19634
* Codegen this:Chris Lattner2005-01-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | int %foo(int %X) { %T = add int %X, 13 %S = mul int %T, 3 ret int %S } as this: mov %ECX, DWORD PTR [%ESP + 4] lea %EAX, DWORD PTR [%ECX + 2*%ECX + 39] ret instead of this: mov %ECX, DWORD PTR [%ESP + 4] mov %EAX, %ECX add %EAX, 13 imul %EAX, %EAX, 3 ret llvm-svn: 19633
* Added tmp instructions to preserve ssa.Tanya Lattner2005-01-171-7/+25
| | | | llvm-svn: 19632
* Fix test/Regression/CodeGen/X86/2005-01-17-CycleInDAG.ll and 132.ijpeg.Chris Lattner2005-01-171-17/+62
| | | | | | | | Do not fold a load into an operation if it will induce a cycle in the DAG. Repeat after me: dAg. llvm-svn: 19631
* New testcase for a problem that occurred in 132.ijpegChris Lattner2005-01-171-0/+16
| | | | llvm-svn: 19630
* Delete PHI nodes that are not dead but are locked in a cycle of singleChris Lattner2005-01-171-0/+26
| | | | | | useness. llvm-svn: 19629
* Move code out of indentation one level to make it easier to read.Chris Lattner2005-01-171-60/+64
| | | | | | | | | | | | | Disable the xform for < > cases. It turns out that the following is being miscompiled: bool %test(sbyte %S) { %T = cast sbyte %S to uint %V = setgt uint %T, 255 ret bool %V } llvm-svn: 19628
* Add methodsChris Lattner2005-01-171-0/+4
| | | | llvm-svn: 19627
* Do not fold a load into a comparison that is used by more than one place.Chris Lattner2005-01-171-8/+8
| | | | | | | The comparison will probably be folded, so this is not ok to do. This fixed 197.parser. llvm-svn: 19624
* sysconfdir -> PROJ_etcdirReid Spencer2005-01-171-4/+4
| | | | llvm-svn: 19623
* Do not codegen 'xor bool, true' as 'not reg'. not reg inverts the upper bitsChris Lattner2005-01-171-4/+7
| | | | | | of the bytereg. This fixes yacr2, 300.twolf and probably others. llvm-svn: 19622
* Fix typos noticed by Gabor Greif, thanks Gabor!Chris Lattner2005-01-171-7/+7
| | | | llvm-svn: 19621
* Set up the shift and setcc types.Chris Lattner2005-01-171-1/+32
| | | | | | | If we emit a load because we followed a token chain to get to it, try to fold it into its single user if possible. llvm-svn: 19620
* Shift and setcc types default to the pointer type.Chris Lattner2005-01-161-1/+1
| | | | llvm-svn: 19619
* Add commentsChris Lattner2005-01-161-3/+28
| | | | | | Add fields to hold the result type of setcc operations and shift amounts. llvm-svn: 19618
* Implement legalize of call nodes.Chris Lattner2005-01-161-3/+17
| | | | llvm-svn: 19617
* Fix llvm-java project autconfiguration.Alkis Evlogimenos2005-01-162-2/+2
| | | | llvm-svn: 19616
* Added paramters to a few functions in order to allow me to change the ↵Tanya Lattner2005-01-161-14/+16
| | | | | | functions to preserve SSA llvm-svn: 19615
* * Adjust to changes in TargetLowering interfaces.Chris Lattner2005-01-161-43/+52
| | | | | | | | | | | | * Remove custom promotion for bool and byte select ops. Legalize now promotes them for us. * Allow folding ConstantPoolIndexes into EXTLOAD's, useful for float immediates. * Declare which operations are not supported better. * Add some hacky code for TRUNCSTORE to pretend that we have truncstore for i16 types. This is useful for testing promotion code because I can just remove 16-bit registers all together and verify that programs work. llvm-svn: 19614
* 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
OpenPOWER on IntegriCloud