aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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-291-8/+2
| | | | | | | annotable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12000 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-291-10/+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
* 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-293-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11986 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
* 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
* 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
* 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
* 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
* 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
* 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 generate instructions with mismatched memory/immediate sizedAlkis Evlogimenos2004-02-284-36/+44
| | | | | | | operands. The X86 backend doesn't handle them properly right now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11944 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename AddUsesToWorkList -> AddUsersToWorkList, as that is what it does.Chris Lattner2004-02-281-19/+54
| | | | | | | | Create a new AddUsesToWorkList method optimize memmove/set/cpy of zero bytes to a noop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11941 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn 'free null' into nothingChris Lattner2004-02-281-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11940 91177308-0d34-0410-b5e6-96231b3b80d8
* Right, it's really Extractor, not Extraction.Misha Brukman2004-02-281-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11939 91177308-0d34-0410-b5e6-96231b3b80d8
* A pass that uses the generic CodeExtractor to rip out *every* loop in everyMisha Brukman2004-02-281-0/+69
| | | | | | | | function, as long as the loop isn't the only one in that function. This should help debugging passes easier with BugPoint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11936 91177308-0d34-0410-b5e6-96231b3b80d8
* A generic code extractor: given a list of BasicBlocks, it will rip them out intoMisha Brukman2004-02-281-0/+573
| | | | | | | a new function, taking care of inputs and outputs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11935 91177308-0d34-0410-b5e6-96231b3b80d8
* Further comment updates.Alkis Evlogimenos2004-02-281-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11933 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments.Alkis Evlogimenos2004-02-281-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11932 91177308-0d34-0410-b5e6-96231b3b80d8
* My previous commit broke the jit. The shift instructions always takeAlkis Evlogimenos2004-02-281-16/+16
| | | | | | | | | | | | | | | | | an 8-bit immediate. So mark the shifts that take immediates as taking an 8-bit argument. The rest with the implicit use of CL are marked appropriately. A bug still exists: def SHLDmri32 : I2A8 <"shld", 0xA4, MRMDestMem>, TB; // [mem32] <<= [mem32],R32 imm8 The immediate in the above instruction is 8-bit but the memory reference is 32-bit. The printer prints this as an 8-bit reference which confuses the assembler. Same with SHRDmri32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11931 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off the SparcV9MachineCodeDestructionPass for now, because it's buggyBrian Gaeke2004-02-271-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11930 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct DestroyMachineFunction's getPassNameBrian Gaeke2004-02-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11929 91177308-0d34-0410-b5e6-96231b3b80d8
* Only clone global nodes between graphs if both graphs have the global.Chris Lattner2004-02-272-13/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11928 91177308-0d34-0410-b5e6-96231b3b80d8