summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Implement getelementptr constant exprsChris Lattner2002-12-132-33/+45
| | | | | | | Implement ConstantPointerRefs Treat long/ulongs as if they were integers. A hack, but an effective one llvm-svn: 4995
* brgBrian Gaeke2002-12-132-1/+33
| | | | | | | | | | | | | InstSelectSimple.cpp: Add stub implementation of visitFreeInst. Add comments that mention how we are failing to implement malloc/free. Add initial implementation of visitAllocaInst. X86TargetMachine.cpp: Include llvm/Transforms/Scalar.h. Add LowerAllocations pass before instruction selection. jello/Makefile: Add scalaropts.a. llvm-svn: 4994
* Emit the right form of mod/rm mod fieldChris Lattner2002-12-132-2/+2
| | | | llvm-svn: 4986
* Nicify a bitChris Lattner2002-12-131-2/+1
| | | | llvm-svn: 4985
* Fix encoding of CBW instructionChris Lattner2002-12-131-1/+1
| | | | llvm-svn: 4983
* Start allocating stack space at [ebp-4] to not overwrite the return address.Misha Brukman2002-12-131-2/+9
| | | | | | Also make all loads & stores 4-byte aligned for performance. ;) llvm-svn: 4982
* Moves now select correct opcode based on the data size.Misha Brukman2002-12-131-3/+18
| | | | llvm-svn: 4981
* Remove extranous #includeChris Lattner2002-12-131-1/+0
| | | | llvm-svn: 4980
* Rename MemArg* to Arg*Chris Lattner2002-12-135-49/+49
| | | | llvm-svn: 4979
* Make mem size an assertChris Lattner2002-12-133-27/+17
| | | | | | Add mem size flags to all instructions using an imm llvm-svn: 4978
* This is supposed to provide correct size for datatypes. Supposedly.Misha Brukman2002-12-132-4/+40
| | | | llvm-svn: 4977
* Take advantage of our knowledge of 2-address X86 instructions andMisha Brukman2002-12-121-7/+24
| | | | | | register-allocated them appropriately. llvm-svn: 4976
* Added the flag to mark instructions which are really 2-address instructions inMisha Brukman2002-12-121-35/+35
| | | | | | X86, but would be 3-address in any normail architecture. llvm-svn: 4974
* This checkin is brought to you by the brian gaeke allnighter fund.Brian Gaeke2002-12-122-30/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (lib/Target/X86) InstSelectSimple.cpp: Include llvm/DerivedTypes.h and iostream. Refactor visitMul out into a wrapper around doMultiply(), so that we can do multiplications on temporary values when we are doing getelementptrs. Refactor part of getReg out into makeAnotherReg, so that we can create registers willy-nilly to hold temporary values, when we are doing getelementptrs. Add stub implementations of visitMallocInst and visitAllocaInst. Add initial implementation of visitGetElementPtrInst. In copyConstantToRegister: We throw a *lot* of our asserts here. So, when we want to throw an assert, print out to stderr whatever expr or whatever constant made us barf. Support copying ConstantPointerNull to register, using a move immediate of zero. Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings of the numbers in the other instruction names. All uses modified. Teach visitCallInst to extract byte- and short-class return values from subregs of EAX. Add a FIXME note about how we would do it for float-class return values. Add a FIXME note about how we would cast float to int and back. X86InstrInfo.def: Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings of the numbers in the other instruction names. All uses modified. (tools/jello) GlobalVars.cpp: Include iostream. If we have to emit a floating-point constant to memory, gamble and use the same method as for ints. If we have to emit a ConstantPointerNull to memory, try using a "void *" and "NULL". Otherwise, if we are going to throw an assert, print out whatever constant made us barf, first. llvm-svn: 4973
* 'graph' is spelled without a 'c'.Misha Brukman2002-12-121-3/+12
| | | | | | Also added Statistic counters for NoAlias and MayAlias. llvm-svn: 4972
* Remove #includesChris Lattner2002-12-121-2/+0
| | | | llvm-svn: 4968
* External routines used to identify Cilk operations inserted by theVikram S. Adve2002-12-102-0/+89
| | | | | | parallelization pass. llvm-svn: 4965
* This file implements the function DemoteRegToStack(), which takes aVikram S. Adve2002-12-101-0/+193
| | | | | | | virtual register computed by an Instruction& X and replaces it with a slot in the stack frame, allocated via alloca. llvm-svn: 4964
* This file implements a pass that automatically parallelizes a program,Vikram S. Adve2002-12-101-0/+548
| | | | | | | | using the Cilk multi-threaded runtime system to execute parallel code. The current version inserts too many sync() operations in the program because it does not attempt to optimize their placement. llvm-svn: 4962
* Iterator that enumerates the ProgramDependenceGraph (PDG) for a function,Vikram S. Adve2002-12-081-0/+250
| | | | | | i.e., enumerates all data and control dependences for the function. llvm-svn: 4958
* An explicit representation of dependence graphs, and a pass thatVikram S. Adve2002-12-082-0/+571
| | | | | | | computes a dependence graph for data dependences on memory locations using interprocedural Mod/Ref information. llvm-svn: 4957
* Namespacify moreChris Lattner2002-12-081-10/+10
| | | | llvm-svn: 4956
* Add support to count the number of dynamic instructions executed by LLIChris Lattner2002-12-081-0/+8
| | | | llvm-svn: 4955
* Add total instruction, bb, & function countsChris Lattner2002-12-071-2/+9
| | | | llvm-svn: 4954
* Fix bug that was bugging bugpointChris Lattner2002-12-071-2/+2
| | | | llvm-svn: 4953
* Remove dead codeChris Lattner2002-12-071-32/+0
| | | | llvm-svn: 4952
* Two bug fixes:Vikram S. Adve2002-12-061-13/+22
| | | | | | | | (1) Make entries for Constant values in the ScalarMap. (2) Set MOD bit for the node pointed to by the argument of a free instruction. llvm-svn: 4948
* Fix several related bugs in DSNode::mergeWith() caused by theVikram S. Adve2002-12-061-90/+102
| | | | | | | | | fact that the incoming nodes may be merged away at intermediate steps. Use an extra level of indirection via DSNodeHandles to track the nodes being merged. All this now happens in a static helper function MergeNodes(). llvm-svn: 4947
* Implement a lot of cast functionality (no FP or 64)Brian Gaeke2002-12-061-34/+62
| | | | llvm-svn: 4944
* Fix bug: 2002-12-05-MissedConstProp.ll pointed out by Casey CarterChris Lattner2002-12-051-1/+2
| | | | llvm-svn: 4935
* Cute bug fix: when moving links from N to this, some links could haveVikram S. Adve2002-12-051-14/+23
| | | | | | | been missed if node *this got merged away due to recursive merging! Also, links were not moved correctly if a node is collapsed. llvm-svn: 4933
* Target/X86/Printer.cpp: Add sizePtr function, and use it instead ofBrian Gaeke2002-12-053-111/+143
| | | | | | | | | | | | | | | | | | " <SIZE> PTR " string when emitting assembly. Target/X86/X86InstrInfo.def: Tidy up a bit: Squashed everything down to 118 chars wide, wrapping lines so that comment is at the same point on each line. Rename "NoImpRegs" as "NoIR". (most instructions have NoImpRegs twice on a line, so this saves 10 columns). Also, annotate various instructions with flags for size of memory operand. (MemArg16, MemArg32, MemArg64, etc.) Target/X86/X86InstrInfo.h: Define flags for size of memory operand. (MemArg16, MemArg32, MemArg64, etc.) llvm-svn: 4932
* Added code generation for function prologues and epilogues.Misha Brukman2002-12-041-17/+32
| | | | llvm-svn: 4930
* Implemented functions for emitting prologues and epilogues;Misha Brukman2002-12-042-1/+62
| | | | | | removed EBP from the list of callee-saved registers (it isn't one). llvm-svn: 4929
* Added push and pop instructions.Misha Brukman2002-12-041-1/+2
| | | | llvm-svn: 4928
* Fix handling of function calls that return voidChris Lattner2002-12-041-9/+11
| | | | llvm-svn: 4925
* Implement initial support for return values from call instructionsChris Lattner2002-12-041-0/+14
| | | | llvm-svn: 4924
* Fun arithmetic with iterators aimed at fixing a bug: inserting instructionsMisha Brukman2002-12-041-2/+4
| | | | | | | after the *current* instruction while keeping the iterator in the same 'logical' place. llvm-svn: 4923
* Adjust the stack pointer after a function call, proportional to the number ofMisha Brukman2002-12-041-0/+9
| | | | | | arguments pushed onto the stack. llvm-svn: 4922
* Added instructions to add/subtract imm32 to/from a reg32.Misha Brukman2002-12-041-0/+2
| | | | llvm-svn: 4921
* Fix bogus assertion failuresChris Lattner2002-12-043-3/+3
| | | | llvm-svn: 4919
* Avoid bad assertionChris Lattner2002-12-041-1/+1
| | | | llvm-svn: 4918
* Remove think-o assertionChris Lattner2002-12-041-2/+0
| | | | llvm-svn: 4917
* Avoid crashing on Arguments, just silently miscompileChris Lattner2002-12-041-0/+2
| | | | llvm-svn: 4916
* storeReg2RegOffset() and loadRegOffset2Reg() now take the iterator by valueMisha Brukman2002-12-042-4/+4
| | | | | | instead of by reference, since they return the modified iterator. llvm-svn: 4914
* Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, sinceMisha Brukman2002-12-042-15/+0
| | | | | | it is target-independent. llvm-svn: 4911
* Add a "Lazy Function Resolution in Jello" sectionChris Lattner2002-12-041-14/+40
| | | | | | Remove some todo's llvm-svn: 4910
* Fix a bug I introduced in a previous changeChris Lattner2002-12-041-2/+4
| | | | llvm-svn: 4909
* Add support for referencing global variables/functionsChris Lattner2002-12-044-5/+31
| | | | llvm-svn: 4907
* Print out direct global referencesChris Lattner2002-12-041-1/+4
| | | | llvm-svn: 4906
OpenPOWER on IntegriCloud