summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix a fixme in LegalizeDAGNate Begeman2005-08-041-7/+2
| | | | llvm-svn: 22661
* * Unbreak release buildMisha Brukman2005-08-041-3/+6
| | | | | | * Add comments to #endif pragmas for readability llvm-svn: 22647
* Fix PR611, codegen'ing SREM of FP operands to fmod or fmodf instead ofChris Lattner2005-08-032-6/+14
| | | | | | the sequence used for integer ops llvm-svn: 22629
* Update to use the new MathExtras.h support for log2 computation.Chris Lattner2005-08-021-14/+6
| | | | | | Patch contributed by Jim Laskey! llvm-svn: 22594
* Fix casts from long to sbyte on ppcChris Lattner2005-08-011-1/+1
| | | | llvm-svn: 22570
* Keep tabs and trailing spaces out.Jeff Cohen2005-07-301-14/+15
| | | | llvm-svn: 22565
* fix float->long conversions on x86Chris Lattner2005-07-301-3/+10
| | | | llvm-svn: 22563
* Allow targets to have custom expanders for FP_TO_*INT conversions whereChris Lattner2005-07-301-3/+9
| | | | | | both the src and dest values are legal llvm-svn: 22555
* Allow targets to define custom expanders for FP_TO_*INTChris Lattner2005-07-291-0/+18
| | | | llvm-svn: 22548
* allow a target to request that unknown FP_TO_*INT conversion be promoted toChris Lattner2005-07-291-1/+74
| | | | | | a larger integer destination. llvm-svn: 22547
* instead of having all conversions be handled by one case value, and then haveChris Lattner2005-07-281-64/+86
| | | | | | subcases inside, break things out earlier. llvm-svn: 22546
* new is not a valid default anywhere, so make this pure virtualAndrew Lenharth2005-07-282-0/+12
| | | | llvm-svn: 22542
* Fix debug info to not print out recently freed memory.Chris Lattner2005-07-271-1/+1
| | | | llvm-svn: 22529
* Print symbolic register names in debug dumpsChris Lattner2005-07-271-2/+4
| | | | llvm-svn: 22528
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-275-56/+56
| | | | llvm-svn: 22523
* Remove unnecessary FP_EXTEND. This causes worse codegen for SSE.Nate Begeman2005-07-191-3/+0
| | | | llvm-svn: 22469
* The assertion was wrong: the code only worked for i64. While we're at it,Chris Lattner2005-07-181-3/+11
| | | | | | | expand the code to work for all integer datatypes. This should unbreak alpha. llvm-svn: 22464
* Only get the .bss and .data sections when needed instead of unconditionally.Chris Lattner2005-07-161-11/+3
| | | | | | This allows is to not emit empty sections when .data or .bss is not used. llvm-svn: 22457
* Refactor getSection() method to make it easier to use.Chris Lattner2005-07-161-19/+15
| | | | llvm-svn: 22455
* Major refactor of the ELFWriter code. Instead of building up one bigChris Lattner2005-07-161-143/+167
| | | | | | | | | | | vector that represents the .o file at once, build up a vector for each section of the .o file. This is needed because the .o file writer needs to be able to switch between sections as it emits them (e.g. switch between the .text section and the .rel section when emitting code). This patch has no functionality change. llvm-svn: 22453
* Teach the legalizer how to promote SINT_TO_FP to a wider SINT_TO_FP thatNate Begeman2005-07-161-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Break the code for expanding UINT_TO_FP operations out into its ownChris Lattner2005-07-161-35/+116
| | | | | | | | | | | | | | SelectionDAGLegalize::ExpandLegalUINT_TO_FP method. Add a new method, PromoteLegalUINT_TO_FP, which allows targets to request that UINT_TO_FP operations be promoted to a larger input type. This is useful for targets that have some UINT_TO_FP or SINT_TO_FP operations but not all of them (like X86). The same should be done with SINT_TO_FP, but this patch does not do that yet. llvm-svn: 22447
* You can't use config options without config.hChris Lattner2005-07-151-0/+1
| | | | llvm-svn: 22446
* Make this use the new autoconf support for finding the executables forChris Lattner2005-07-141-5/+8
| | | | | | gv and Graphviz. llvm-svn: 22434
* As discussed on IRC, this stuff is just for debugging.Chris Lattner2005-07-141-0/+5
| | | | llvm-svn: 22432
* If the Graphviz program is available, use it to visualize dot graphs.Chris Lattner2005-07-141-1/+10
| | | | llvm-svn: 22429
* Fix Alpha/2005-07-12-TwoMallocCalls.ll and PR593.Chris Lattner2005-07-131-1/+2
| | | | | | | | | | It is not safe to call LegalizeOp on something that has already been legalized. Instead, just force another iteration of legalization. This could affect all platforms but X86, as this codepath is dynamically dead on X86 (ISD::MEMSET and friends are legal). llvm-svn: 22419
* Fix test/Regression/CodeGen/Generic/2005-07-12-memcpy-i64-length.llChris Lattner2005-07-131-1/+6
| | | | llvm-svn: 22417
* Add support for 64-bit elf filesChris Lattner2005-07-121-16/+24
| | | | llvm-svn: 22400
* VC++ demands that the function returns a valueJeff Cohen2005-07-121-0/+1
| | | | llvm-svn: 22393
* Clean up code, no functionality changes.Chris Lattner2005-07-111-50/+68
| | | | llvm-svn: 22382
* Emit a symbol table entry for each function we output to the ELF file. ThisChris Lattner2005-07-111-1/+31
| | | | | | | | | | | | | allows objdump to know which function we are emitting to: 00000000 <foo>: <---- 0: b8 01 00 00 00 mov $0x1,%eax 5: 03 44 24 04 add 0x4(%esp,1),%eax 9: c3 ret ... and allows .o files to be useful for linking :) llvm-svn: 22378
* add code to emit the .text section to the section header.Chris Lattner2005-07-111-4/+89
| | | | | | | | | | | | | | | | | | | | | | | | | Add a *VERY INITIAL* machine code emitter class. This is enough to take this C function: int foo(int X) { return X +1; } and make objdump produce the following: $ objdump -d t-llvm.o t-llvm.o: file format elf32-i386 Disassembly of section .text: 00000000 <.text>: 0: b8 01 00 00 00 mov $0x1,%eax 5: 03 44 24 04 add 0x4(%esp,1),%eax 9: c3 ret Anything using branches or refering to the constant pool or requiring relocations will not work yet. llvm-svn: 22375
* Use a name mangler object to uniquify names and remove nonstandardChris Lattner2005-07-111-2/+8
| | | | | | characters from them. llvm-svn: 22371
* Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.Chris Lattner2005-07-103-90/+60
| | | | | | | | | This is the last MVTSDNode. This allows us to eliminate a bunch of special case code for handling MVTSDNodes. llvm-svn: 22367
* Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNodeChris Lattner2005-07-102-46/+38
| | | | llvm-svn: 22366
* Introduce a new VTSDNode class with the ultimate goal of eliminating theChris Lattner2005-07-102-79/+109
| | | | | | | | MVTSDNode class. This class is used to provide an operand to operators that require an extra type. We start by converting FP_ROUND_INREG and SIGN_EXTEND_INREG over to using it. llvm-svn: 22364
* Add support for emitting a .data section and .bss section.Chris Lattner2005-07-081-22/+67
| | | | | | Add support for emitting external and .bss symbols. llvm-svn: 22358
* Add support for emitting the symbol table (and its string table) of theChris Lattner2005-07-071-54/+141
| | | | | | | | | | | | | | | | | | | | module to the ELF file. Test it by adding support for emitting common symbols. This allows us to compile this: %X = weak global int 0 %Y = weak global int 0 %Z = weak global int 0 to an elf file that 'readelf's this: Symbol table '.symtab' contains 4 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000004 4 OBJECT GLOBAL DEFAULT COM X 2: 00000004 4 OBJECT GLOBAL DEFAULT COM Y 3: 00000004 4 OBJECT GLOBAL DEFAULT COM Z llvm-svn: 22343
* Make several cleanups to Andrews varargs change:Chris Lattner2005-07-051-22/+25
| | | | | | | | | | 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. llvm-svn: 22338
* 2 fixes:Andrew Lenharth2005-07-051-4/+13
| | | | | | | 1: Legalize operand in UINT_TO_FP expanision 2: SRA x, const i8 was not promoting the constant to shift amount type. llvm-svn: 22337
* I really didn't think this was necessary. But, Legalize wasn't running againAndrew Lenharth2005-07-021-2/+3
| | | | | | and legalizing the extload. Strange. Should fix most alpha regressions. llvm-svn: 22329
* oopsAndrew Lenharth2005-06-301-2/+1
| | | | llvm-svn: 22320
* FP EXTLOAD is not support on all archs, expand to LOAD and FP_EXTENDAndrew Lenharth2005-06-301-0/+9
| | | | llvm-svn: 22319
* restore old srcValueNode behavior and try to to work around itAndrew Lenharth2005-06-292-2/+4
| | | | llvm-svn: 22315
* tracking the instructions causing loads and stores provides more information ↵Andrew Lenharth2005-06-292-4/+2
| | | | | | than just the pointer being loaded or stored llvm-svn: 22311
* Adapt the code for handling uint -> fp conversion for the 32 bit case toAndrew Lenharth2005-06-271-0/+35
| | | | | | handling it in the 64 bit case. The two code paths should probably be merged. llvm-svn: 22302
* iniital checkin of ELFWriter implementationChris Lattner2005-06-271-0/+230
| | | | | | | | For now, the elf writer is only capable of emitting an empty elf file, with a section table and a section table string table. This will be enhanced in the future :) llvm-svn: 22291
* 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
OpenPOWER on IntegriCloud