summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Restore some code that was accidentally removed by Nate's patch yesterday.Chris Lattner2005-07-071-1/+20
| | | | | | This fixes the regressions from last night. llvm-svn: 22344
* Fix a typo in my checkin today that caused regressions. Oops!Nate Begeman2005-07-071-1/+1
| | | | llvm-svn: 22341
* First round of support for doing scalar FP using the SSE2 ISA extension andNate Begeman2005-07-0611-91/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XMM registers. There are many known deficiencies and fixmes, which will be addressed ASAP. The major benefit of this work is that it will allow the LLVM register allocator to allocate FP registers across basic blocks. The x86 backend will still default to x87 style FP. To enable this work, you must pass -enable-sse-scalar-fp and either -sse2 or -sse3 to llc. An example before and after would be for: double foo(double *P) { double Sum = 0; int i; for (i = 0; i < 1000; ++i) Sum += P[i]; return Sum; } The inner loop looks like the following: x87: .LBB_foo_1: # no_exit fldl (%esp) faddl (%eax,%ecx,8) fstpl (%esp) incl %ecx cmpl $1000, %ecx #FP_REG_KILL jne .LBB_foo_1 # no_exit SSE2: addsd (%eax,%ecx,8), %xmm0 incl %ecx cmpl $1000, %ecx #FP_REG_KILL jne .LBB_foo_1 # no_exit llvm-svn: 22340
* Make several cleanups to Andrews varargs change:Chris Lattner2005-07-054-120/+90
| | | | | | | | | | | | 1. Pass Value*'s into lowering methods so that the proper pointers can be added to load/stores from the valist 2. Intrinsics that return void should only return a token chain, not a token chain/retval pair. 3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone. 4. Now that we have Value*'s available in the lowering methods, pass them into any load/stores from the valist that are emitted llvm-svn: 22339
* Fit to 80 columnsChris Lattner2005-07-051-3/+6
| | | | llvm-svn: 22336
* Fix PowerPC varargsChris Lattner2005-07-051-24/+25
| | | | llvm-svn: 22335
* check the correct VTAndrew Lenharth2005-07-041-1/+1
| | | | llvm-svn: 22332
* fix loading address of fp symbolsAndrew Lenharth2005-07-031-0/+4
| | | | llvm-svn: 22331
* Percolate the call up to the right superclassChris Lattner2005-07-031-1/+1
| | | | llvm-svn: 22330
* The statistic needs to be in the correct namespace.Nate Begeman2005-07-011-1/+2
| | | | llvm-svn: 22327
* Varargs is apparently currently broken on PPC. This hacks it so that itChris Lattner2005-07-011-4/+9
| | | | | | | | is at least overloading the right virtual methods. The implementations are currently wrong though. This fixes Ptrdist/bc, but not other programs (e.g. siod). llvm-svn: 22326
* Refactor X86AsmPrinter.cpp into multiple files. Patch contributedChris Lattner2005-07-016-557/+676
| | | | | | by Aaron Gray, cleaned up by me. llvm-svn: 22324
* simplify call code, remove pseudo ops for div and rem, track more loads and ↵Andrew Lenharth2005-07-011-17/+0
| | | | | | stores llvm-svn: 22323
* simplify call code, remove pseudo ops for div and rem, track more loads and ↵Andrew Lenharth2005-07-013-80/+92
| | | | | | stores llvm-svn: 22322
* remove some debugging codeChris Lattner2005-07-011-3/+0
| | | | llvm-svn: 22321
* Make the x86 asm printer darwin-aware. This mostly entails doing the sameNate Begeman2005-06-301-12/+15
| | | | | | | thing as cygwin most of the time, and printing our alignments in log2 rather than number of bytes. llvm-svn: 22316
* restore old srcValueNode behavior and try to to work around itAndrew Lenharth2005-06-292-53/+72
| | | | llvm-svn: 22315
* tracking the instructions causing loads and stores provides more information ↵Andrew Lenharth2005-06-291-4/+3
| | | | | | than just the pointer being loaded or stored llvm-svn: 22311
OpenPOWER on IntegriCloud