aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22364 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for emitting a .data section and .bss section.Chris Lattner2005-07-081-22/+67
| | | | | | | Add support for emitting external and .bss symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22358 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22343 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22338 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22337 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22329 91177308-0d34-0410-b5e6-96231b3b80d8
* oopsAndrew Lenharth2005-06-301-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22320 91177308-0d34-0410-b5e6-96231b3b80d8
* FP EXTLOAD is not support on all archs, expand to LOAD and FP_EXTENDAndrew Lenharth2005-06-301-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22319 91177308-0d34-0410-b5e6-96231b3b80d8
* restore old srcValueNode behavior and try to to work around itAndrew Lenharth2005-06-292-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22315 91177308-0d34-0410-b5e6-96231b3b80d8
* tracking the instructions causing loads and stores provides more information ↵Andrew Lenharth2005-06-292-4/+2
| | | | | | than just the pointer being loaded or stored git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22311 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22302 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22291 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22273 91177308-0d34-0410-b5e6-96231b3b80d8
* core changes for varargsAndrew Lenharth2005-06-181-18/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug 537 test 2, which checks to make sure that we fold A+(B-A) -> B forNate Begeman2005-06-161-2/+7
| | | | | | | | integer types. Add a couple checks to not perform these kinds of transform on floating point values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22228 91177308-0d34-0410-b5e6-96231b3b80d8
* aCC and STLport complained about this, because they're like thatDuraid Madina2005-05-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22053 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some simplifications for MULH[SU]. This allows us to compile this:Chris Lattner2005-05-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | long %bar(long %X) { %Y = mul long %X, 4294967297 ret long %Y } to this: l1_bar: mov %EAX, DWORD PTR [%ESP + 4] mov %EDX, %EAX add %EDX, DWORD PTR [%ESP + 8] ret instead of: l1_bar: mov %ECX, DWORD PTR [%ESP + 4] mov %EDX, 1 mov %EAX, %ECX mul %EDX add %EDX, %ECX add %EDX, DWORD PTR [%ESP + 8] mov %EAX, %ECX ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22044 91177308-0d34-0410-b5e6-96231b3b80d8
* When inserting callee-save register reloads, make sure to skip over anyChris Lattner2005-05-151-0/+8
| | | | | | | | terminator instructions before the 'ret' in case the target has a multi-instruction return sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22041 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix construction of ioport intrinsics, fixing X86/io.llx and io-port.llxChris Lattner2005-05-141-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22026 91177308-0d34-0410-b5e6-96231b3b80d8
* allow token chain at start or end of nodeChris Lattner2005-05-141-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22020 91177308-0d34-0410-b5e6-96231b3b80d8
* remove special case hacks for readport/readio from the binary operatorChris Lattner2005-05-142-13/+15
| | | | | | | codepath git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22019 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement fixme's by memoizing nodes.Chris Lattner2005-05-141-9/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22018 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn this into a wrapper for a simpler version of getNode.Chris Lattner2005-05-141-8/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22016 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate special purpose hacks for dynamic_stack_alloc.Chris Lattner2005-05-143-20/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22015 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the general mechanism for creating multi-value nodes instead of usingChris Lattner2005-05-142-56/+60
| | | | | | | special case hacks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22014 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap long line, actually add node to the graph.Chris Lattner2005-05-141-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22011 91177308-0d34-0410-b5e6-96231b3b80d8
* legalize target-specific operationsChris Lattner2005-05-141-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22010 91177308-0d34-0410-b5e6-96231b3b80d8
* add a getNode() version that allows construction of any node type.Chris Lattner2005-05-141-9/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22009 91177308-0d34-0410-b5e6-96231b3b80d8
* LowerOperation takes a dagChris Lattner2005-05-142-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22004 91177308-0d34-0410-b5e6-96231b3b80d8
* Print the symbolic register name in a register allocator debug dump.Chris Lattner2005-05-143-17/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22002 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow targets to have a custom int64->fp expander if desiredChris Lattner2005-05-141-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22001 91177308-0d34-0410-b5e6-96231b3b80d8
* Align doubles on 8-byte boundaries if possible.Chris Lattner2005-05-131-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21993 91177308-0d34-0410-b5e6-96231b3b80d8
* print stack object alignment in -print-machineinstr dumpsChris Lattner2005-05-131-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21992 91177308-0d34-0410-b5e6-96231b3b80d8
* Tolerate instrs with extra argsChris Lattner2005-05-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21982 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an isTailCall flag to LowerCallToChris Lattner2005-05-132-7/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21958 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle TAILCALL nodeChris Lattner2005-05-132-3/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21957 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit function entry code after lowering hte arguments.Chris Lattner2005-05-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21931 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow targets to emit code into the entry block of each functionChris Lattner2005-05-131-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21930 91177308-0d34-0410-b5e6-96231b3b80d8
* allow a virtual register to be associated with live-in values.Chris Lattner2005-05-132-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21927 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a problem that nate reduced for me.Chris Lattner2005-05-131-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21923 91177308-0d34-0410-b5e6-96231b3b80d8
* rename variables and functions to match renamed DAG nodes. Bonus feature:Chris Lattner2005-05-131-32/+32
| | | | | | | I can actually remember which one is which now! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21922 91177308-0d34-0410-b5e6-96231b3b80d8
* do not call expandop on the same value more than once. This fixesChris Lattner2005-05-131-4/+5
| | | | | | | X86/2004-02-22-Casts.llx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21919 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a bad typeoChris Lattner2005-05-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21917 91177308-0d34-0410-b5e6-96231b3b80d8
* update commentChris Lattner2005-05-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21916 91177308-0d34-0410-b5e6-96231b3b80d8
* rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.Chris Lattner2005-05-122-22/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21915 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass calling convention to use into lower call toChris Lattner2005-05-122-7/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21900 91177308-0d34-0410-b5e6-96231b3b80d8
* fix expansion of ct[lt]z nodesChris Lattner2005-05-121-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21896 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand 64-bit ctlz/cttz nodes for 32-bit targetsChris Lattner2005-05-121-4/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21895 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uint->fp casts on PPC, allowing UnitTests/2005-05-12-Int64ToFP toChris Lattner2005-05-121-4/+3
| | | | | | | work on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21894 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow something to be legalized multiple times. This can be used to reduceChris Lattner2005-05-121-12/+30
| | | | | | | legalization iteration git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21892 91177308-0d34-0410-b5e6-96231b3b80d8