summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate an extra copy from R1 that Nate noticed on function calls thatChris Lattner2005-07-281-1/+2
| | | | | | have to write arguments to the stack llvm-svn: 22536
* Specify the correct number of operandsChris Lattner2005-07-281-3/+3
| | | | llvm-svn: 22535
* Fold constant adds into loads and stores to frame indices.Nate Begeman2005-07-281-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the following code: double %ext(int %A.0__, long %A.1__) { %A_addr = alloca %typedef.DComplex ; <%typedef.DComplex*> [#uses=2] %tmp.1 = cast %typedef.DComplex* %A_addr to int* ; <int*> [#uses=1] store int %A.0__, int* %tmp.1 %tmp.2 = getelementptr %typedef.DComplex* %A_addr, int 0, uint 1 ; <double*> [#uses=2] %tmp.3 = cast double* %tmp.2 to long* ; <long*> [#uses=1] store long %A.1__, long* %tmp.3 %tmp.5 = load double* %tmp.2 ; <double> [#uses=1] ret double %tmp.5 } We now generate: _ext: .LBB_ext_0: ; stw r3, -12(r1) stw r4, -8(r1) stw r5, -4(r1) lfd f1, -8(r1) blr Instead of: _ext: .LBB_ext_0: ; stw r3, -12(r1) addi r2, r1, -12 stw r4, 4(r2) stw r5, 8(r2) lfd f1, 4(r2) blr This also fires hundreds of times on MultiSource. llvm-svn: 22533
* Fix some commentsNate Begeman2005-07-272-4/+2
| | | | llvm-svn: 22530
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-2737-912/+912
| | | | llvm-svn: 22523
* Implement the optimization for the Red Zone on Darwin. This removes theNate Begeman2005-07-272-4/+8
| | | | | | unnecessary SP manipulation in leaf routines that don't need it. llvm-svn: 22522
* fix some warnings when compiled with 32-bit hostsChris Lattner2005-07-271-2/+2
| | | | llvm-svn: 22521
* Eliminate tabs and trailing spaces.Jeff Cohen2005-07-2749-3750/+3750
| | | | llvm-svn: 22520
* add a note about the red zoneChris Lattner2005-07-261-0/+2
| | | | llvm-svn: 22518
* Wrap some long lines, fix emission of weak global variablesChris Lattner2005-07-261-8/+9
| | | | llvm-svn: 22517
* Update the PPC readmeNate Begeman2005-07-261-6/+4
| | | | llvm-svn: 22516
* Fix an optimization put in for accessing static globals. This obviatesNate Begeman2005-07-251-5/+6
| | | | | | the need to build PIC. llvm-svn: 22512
* fix compile errorAndrew Lenharth2005-07-231-1/+1
| | | | llvm-svn: 22508
* PowerPC no-pic code is not quite ready for prime-timeChris Lattner2005-07-221-0/+1
| | | | llvm-svn: 22507
* Handle more imm forms, and load small negative i32 constants without hitting ↵Andrew Lenharth2005-07-221-2/+45
| | | | | | memory (should do the same for arbitrary zero extended small negative constants) llvm-svn: 22505
* finally found the gcc defined constantsAndrew Lenharth2005-07-222-2/+2
| | | | llvm-svn: 22502
* Alpha JIT (beta)Andrew Lenharth2005-07-229-3/+673
| | | | llvm-svn: 22500
* simpilfy instruction encoding (and make the lines way shorter, aka Misha ↵Andrew Lenharth2005-07-223-223/+281
| | | | | | happification) llvm-svn: 22499
* update interfaceAndrew Lenharth2005-07-226-6/+6
| | | | llvm-svn: 22498
* Support building non-PICNate Begeman2005-07-218-123/+179
| | | | | | | | Remove the LoadHiAddr pseudo-instruction. Optimization of stores to and loads from statics. Force JIT to use new non-PIC codepaths. llvm-svn: 22494
* revert to using 4-byte alignment for doubles, as specified by the ABIChris Lattner2005-07-211-1/+1
| | | | llvm-svn: 22493
* Support assembling fsqrt on darwin. This will be implemented better whenNate Begeman2005-07-211-0/+9
| | | | | | PowerPC gets subtarget support up. llvm-svn: 22489
* Generate mfocrf when targeting g5. Generate fsqrt/fsqrts when targetin g5.Nate Begeman2005-07-205-22/+54
| | | | | | 8-byte align doubles. llvm-svn: 22486
* Integrate SelectFPExpr into SelectExpr. This gets PPC32 closer to beingNate Begeman2005-07-193-346/+242
| | | | | | automatically generated from a target description. llvm-svn: 22470
* For: memory operations -> storesReid Spencer2005-07-192-0/+7
| | | | | | | | | | | | | | | | This is the first incremental patch to implement this feature. It adds no functionality to LLVM but setup up the information needed from targets in order to implement the optimization correctly. Each target needs to specify the maximum number of store operations for conversion of the llvm.memset, llvm.memcpy, and llvm.memmove intrinsics into a sequence of store operations. The limit needs to be chosen at the threshold of performance for such an optimization (generally smallish). The target also needs to specify whether the target can support unaligned stores for multi-byte store operations. This helps ensure the optimization doesn't generate code that will trap on an alignment errors. More patches to follow. llvm-svn: 22468
* Teach the legalizer how to promote SINT_TO_FP to a wider SINT_TO_FP thatNate Begeman2005-07-161-45/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the target natively supports. This eliminates some special-case code from the x86 backend and generates better code as well. For an i8 to f64 conversion, before & after: _x87 before: subl $2, %esp movb 6(%esp), %al movsbw %al, %ax movw %ax, (%esp) filds (%esp) addl $2, %esp ret _x87 after: subl $2, %esp movsbw 6(%esp), %ax movw %ax, (%esp) filds (%esp) addl $2, %esp ret _sse before: subl $12, %esp movb 16(%esp), %al movsbl %al, %eax cvtsi2sd %eax, %xmm0 addl $12, %esp ret _sse after: subl $12, %esp movsbl 16(%esp), %eax cvtsi2sd %eax, %xmm0 addl $12, %esp ret llvm-svn: 22452
* Teach the register allocator that movaps is also a move instructionNate Begeman2005-07-161-1/+1
| | | | llvm-svn: 22451
* A couple more darwinismsNate Begeman2005-07-161-2/+5
| | | | llvm-svn: 22450
* Remove all knowledge of UINT_TO_FP from the X86 backend, relying on theChris Lattner2005-07-161-53/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | legalizer to eliminate them. With this comes the expected code quality improvements, such as, for this: double foo(unsigned short X) { return X; } we now generate this: _foo: subl $4, %esp movzwl 8(%esp), %eax movl %eax, (%esp) fildl (%esp) addl $4, %esp ret instead of this: _foo: subl $4, %esp movw 8(%esp), %ax movzwl %ax, %eax ;; Load not folded into this. movl %eax, (%esp) fildl (%esp) addl $4, %esp ret -Chris llvm-svn: 22449
* Get closer to fully working scalar FP in SSE regs. This gets singlesourceNate Begeman2005-07-153-52/+53
| | | | | | working, and Olden/power. llvm-svn: 22441
* Add support for printing the sse scalar comparison instruction mnemonics.Nate Begeman2005-07-144-0/+34
| | | | llvm-svn: 22440
* Fixed PR#596:John Criswell2005-07-141-2/+2
| | | | | | | | Add parenthesis around the value being negated; that way, if the value begins with a minus sign (e.g. negative integer), we won't generate a C predecrement operator by mistake. llvm-svn: 22437
* Check in the last of the darwin-specific code necessary to get shootoutNate Begeman2005-07-121-11/+11
| | | | | | working before modifying the asm printer to use the subtarget info. llvm-svn: 22408
* Remove some code that moved to the generic asm printer a long time ago.Nate Begeman2005-07-121-84/+0
| | | | llvm-svn: 22407
* Fix povray and minor cleanupsAndrew Lenharth2005-07-121-25/+11
| | | | llvm-svn: 22397
* I don't know how this ever compiled with gcc, but VC++ correctly rejects it.Jeff Cohen2005-07-121-1/+1
| | | | llvm-svn: 22394
* Clean up the TargetSubtarget class a bit, removing an unnecessary argumentNate Begeman2005-07-121-1/+1
| | | | | | to the constructor. llvm-svn: 22392
* Minor changes to improve comments and fix the build on _WIN32 systems.Chris Lattner2005-07-122-12/+13
| | | | llvm-svn: 22391
* Add a noteChris Lattner2005-07-121-1/+1
| | | | llvm-svn: 22390
* Implement Subtarget supportNate Begeman2005-07-126-4/+170
| | | | | | | | | | | | | | | | Implement the X86 Subtarget. This consolidates the checks for target triple, and setting options based on target triple into one place. This allows us to convert the asm printer and isel over from being littered with "forDarwin", "forCygwin", etc. into just having the appropriate flags for each subtarget feature controlling the code for that feature. This patch also implements indirect external and weak references in the X86 pattern isel, for darwin. Next up is to convert over the asm printers to use this new interface. llvm-svn: 22389
* Commit some pending darwin changes before subtarget support.Nate Begeman2005-07-122-11/+13
| | | | llvm-svn: 22388
* fix a warningChris Lattner2005-07-111-1/+1
| | | | llvm-svn: 22385
* Output .size directives to tell the assembler the size of each function.Chris Lattner2005-07-111-0/+1
| | | | llvm-svn: 22381
* Fix crazy indentationChris Lattner2005-07-111-75/+73
| | | | llvm-svn: 22380
* Refactor things a bit to allow the ELF code emitter to run the X86 machine ↵Chris Lattner2005-07-114-24/+32
| | | | | | | | code emitter after itself. llvm-svn: 22376
* Remove prototype for non-existant functionChris Lattner2005-07-111-6/+0
| | | | llvm-svn: 22372
* Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.Chris Lattner2005-07-106-38/+34
| | | | | | | | | | | | This is the last MVTSDNode. This allows us to eliminate a bunch of special case code for handling MVTSDNodes. Also, remove some uses of dyn_cast that should really be cast (which is cheaper in a release build). llvm-svn: 22368
* Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNodeChris Lattner2005-07-106-13/+14
| | | | llvm-svn: 22366
* Add support for assembling .s files on mac os x for intelNate Begeman2005-07-084-7/+95
| | | | | | Add support for running bugpoint on mac os x for intel llvm-svn: 22351
* clean up prolouge and epilougeAndrew Lenharth2005-07-072-28/+39
| | | | llvm-svn: 22346
OpenPOWER on IntegriCloud