aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move the private MachineInstrAnnot.h into a private directory.Chris Lattner2004-02-295-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12003 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of an ugly headerChris Lattner2004-02-291-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12002 91177308-0d34-0410-b5e6-96231b3b80d8
* Move methods out of .h fileChris Lattner2004-02-291-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12001 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use explicit casts that hide the dependence on Instruction beingChris Lattner2004-02-292-16/+4
| | | | | | | annotable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12000 91177308-0d34-0410-b5e6-96231b3b80d8
* Ugh, the old sparc backend attaches MachineCodeForInstruction annotations onChris Lattner2004-02-291-1/+2
| | | | | | | | | LLVM instructions. Because it contains an explicit cast, we didn't catch it. I guess instruction's will be annotable for the duration of the sparcv9's existence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11999 91177308-0d34-0410-b5e6-96231b3b80d8
* Add instruction name description.Alkis Evlogimenos2004-02-291-2/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11998 91177308-0d34-0410-b5e6-96231b3b80d8
* Use correct template for SHLD and SHRD instructions so that the memoryAlkis Evlogimenos2004-02-291-9/+9
| | | | | | | operand size is correctly specified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11997 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve allocation order:Alkis Evlogimenos2004-02-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) For 8-bit registers try to use first the ones that are parts of the same register (AL then AH). This way we only alias 2 16/32-bit registers after allocating 4 8-bit variables. 2) Move EBX as the last register to allocate. This will cause less spills to happen since we will have 8-bit registers available up to register excaustion (assuming we use the allocation order). It would be nice if we could push all of the 8-bit aliased registers towards the end but we much prefer to keep callee saved register to the end to avoid saving them on entry and exit of the function. For example this gives a slight reduction of spills with linear scan on 164.gzip. Before: 11221 asm-printer - Number of machine instrs printed 975 spiller - Number of loads added 675 spiller - Number of stores added 398 spiller - Number of register spills After: 11182 asm-printer - Number of machine instrs printed 952 spiller - Number of loads added 652 spiller - Number of stores added 386 spiller - Number of register spills git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11996 91177308-0d34-0410-b5e6-96231b3b80d8
* A big X86 instruction rename. The instructions are renamed to makeAlkis Evlogimenos2004-02-2911-1021/+1021
| | | | | | | | | | | | | | | | | their names more decriptive. A name consists of the base name, a default operand size followed by a character per operand with an optional special size. For example: ADD8rr -> add, 8-bit register, 8-bit register IMUL16rmi -> imul, 16-bit register, 16-bit memory, 16-bit immediate IMUL16rmi8 -> imul, 16-bit register, 16-bit memory, 8-bit immediate MOVSX32rm16 -> movsx, 32-bit register, 16-bit memory git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11995 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead member variables of SparcV9SchedInfo and TargetSchedInfoBrian Gaeke2004-02-292-20/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11994 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the X86-specific BMI functions, using BuildMI instead.Chris Lattner2004-02-292-374/+352
| | | | | | | Replace uses of addZImm with addImm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11992 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a miscompilation of 197.parser that occurs when you have single basicChris Lattner2004-02-292-16/+28
| | | | | | | block loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11990 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR255: [tailduplication] Single basic block loops are very rareChris Lattner2004-02-291-1/+2
| | | | | | | | Note that this is a band-aid put over a band-aid. This just undisables tail duplication in on very specific case that it seems to work in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11989 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comment at head of file. Also fix C 'typedef struct' nonsense IBrian Gaeke2004-02-292-14/+18
| | | | | | | inadvertently left in here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11988 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to change in TII ctor argumentsChris Lattner2004-02-295-15/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11987 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the distinction between "real" and "unreal" instructionsChris Lattner2004-02-294-10/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11986 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more architectures, and ELF64 stuff.Brian Gaeke2004-02-292-2/+98
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11985 91177308-0d34-0410-b5e6-96231b3b80d8
* These two virtual methods are never called.Chris Lattner2004-02-298-105/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11984 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a TON of flags that noone cares aboutChris Lattner2004-02-291-362/+362
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11983 91177308-0d34-0410-b5e6-96231b3b80d8
* Noone calls these virtual methodsChris Lattner2004-02-291-26/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11982 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the only file in the system that uses this enum. eliminate it.Chris Lattner2004-02-291-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11981 91177308-0d34-0410-b5e6-96231b3b80d8
* Scrap a huge layer of cruft out of this interface.Chris Lattner2004-02-291-93/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11980 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement initial prolog/epilog code insertion methods.Chris Lattner2004-02-294-12/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11979 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded #includeChris Lattner2004-02-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11978 91177308-0d34-0410-b5e6-96231b3b80d8
* int64_t -> intChris Lattner2004-02-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11977 91177308-0d34-0410-b5e6-96231b3b80d8
* Continue Alkis's int64_t cleanup. This makes all of the immediate relatedChris Lattner2004-02-292-16/+22
| | | | | | | | | | | | methods take an int or unsigned value instead of int64_t. Also, add an 'addImm' method to the MachineInstrBuilder class, because the fact that the hardware sign or zero extends it does not/should not matter to the code generator. Once the old sparc backend is removed the difference can be eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11976 91177308-0d34-0410-b5e6-96231b3b80d8
* Add BuildMI variants that take a MBB::iteratorChris Lattner2004-02-291-5/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11975 91177308-0d34-0410-b5e6-96231b3b80d8
* Use correct template for ADC instruction with memory operands.Alkis Evlogimenos2004-02-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11974 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an instruction selector capable of selecting 'ret void'Chris Lattner2004-02-2910-14/+636
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11973 91177308-0d34-0410-b5e6-96231b3b80d8
* SHLD and SHRD take 32-bit operands but an 8-bit immediate. Rename themAlkis Evlogimenos2004-02-284-14/+14
| | | | | | | to denote this fact. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11972 91177308-0d34-0410-b5e6-96231b3b80d8
* Floating point loads/stores act on memory operands. Rename them toAlkis Evlogimenos2004-02-288-71/+71
| | | | | | | denote this fact. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11971 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename instruction templates to be easier to the human eye toAlkis Evlogimenos2004-02-281-254/+254
| | | | | | | | | | | | parse. The name is now I (operand size)*. For example: Im32 -> instruction with 32-bit memory operands. Im16i8 -> instruction with 16-bit memory operands and 8 bit immediate operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11970 91177308-0d34-0410-b5e6-96231b3b80d8
* Uncomment instructions that take both an immediate and a memoryAlkis Evlogimenos2004-02-283-21/+11
| | | | | | | operand but their sizes differ. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11969 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix my sloppinessBrian Gaeke2004-02-282-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11968 91177308-0d34-0410-b5e6-96231b3b80d8
* Each instruction now has both an ImmType and a MemType. This describesAlkis Evlogimenos2004-02-286-500/+542
| | | | | | | | | the size of the immediate and the memory operand on instructions that use them. This resolves problems with instructions that take both a memory and an immediate operand but their sizes differ (i.e. ADDmi32b). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11967 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in commentBrian Gaeke2004-02-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11966 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase for switch instruction inductionChris Lattner2004-02-281-0/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11965 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement switch->br and br->switch folding by ripping out the switch->switchChris Lattner2004-02-281-178/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and br->br code and generalizing it. This allows us to compile code like this: int test(Instruction *I) { if (isa<CastInst>(I)) return foo(7); else if (isa<BranchInst>(I)) return foo(123); else if (isa<UnwindInst>(I)) return foo(1241); else if (isa<SetCondInst>(I)) return foo(1); else if (isa<VAArgInst>(I)) return foo(42); return foo(-1); } into: int %_Z4testPN4llvm11InstructionE("struct.llvm::Instruction"* %I) { entry: %tmp.1.i.i.i.i.i.i.i = getelementptr "struct.llvm::Instruction"* %I, long 0, ubyte 4 ; <uint*> [#uses=1] %tmp.2.i.i.i.i.i.i.i = load uint* %tmp.1.i.i.i.i.i.i.i ; <uint> [#uses=2] %tmp.2.i.i.i.i.i.i = seteq uint %tmp.2.i.i.i.i.i.i.i, 27 ; <bool> [#uses=0] switch uint %tmp.2.i.i.i.i.i.i.i, label %endif.0 [ uint 27, label %then.0 uint 2, label %then.1 uint 5, label %then.2 uint 14, label %then.3 uint 15, label %then.3 uint 16, label %then.3 uint 17, label %then.3 uint 18, label %then.3 uint 19, label %then.3 uint 32, label %then.4 ] ... As well as handling the cases in 176.gcc and many other programs more effectively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11964 91177308-0d34-0410-b5e6-96231b3b80d8
* Change this so that LLC actually tries to run the code generator, though it willChris Lattner2004-02-282-2/+2
| | | | | | | immediately abort due to lack of an instruction selector. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11963 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a hook to run with the V8 target, though it doesn't currently work. AlsoChris Lattner2004-02-282-2/+7
| | | | | | | mark the PPC backend as experimental git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11962 91177308-0d34-0410-b5e6-96231b3b80d8
* Add hook for V8 targetChris Lattner2004-02-281-3/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11961 91177308-0d34-0410-b5e6-96231b3b80d8
* SparcV8 now builds.Chris Lattner2004-02-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11960 91177308-0d34-0410-b5e6-96231b3b80d8
* fine grainify namespacificationChris Lattner2004-02-281-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11959 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2004-02-282-12/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11958 91177308-0d34-0410-b5e6-96231b3b80d8
* Tab completion is our friend.Chris Lattner2004-02-2810-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11957 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up rulesChris Lattner2004-02-282-48/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11956 91177308-0d34-0410-b5e6-96231b3b80d8
* Bring this directory into "it actually compiles" landChris Lattner2004-02-288-16/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11955 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix multiple inclusion problemChris Lattner2004-02-282-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11954 91177308-0d34-0410-b5e6-96231b3b80d8
* if there is already a prototype for malloc/free, use it, even if it's incorrect.Chris Lattner2004-02-281-10/+42
| | | | | | | Do not just inject a new prototype. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11951 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not remove an active template argument even if the superclass had one of theChris Lattner2004-02-281-1/+2
| | | | | | | same name git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11950 91177308-0d34-0410-b5e6-96231b3b80d8