aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Change preserve all claim to just preserve live variables and phielimination.Alkis Evlogimenos2003-12-142-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10460 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a floating point killer pass. This pass runs before registerAlkis Evlogimenos2003-12-134-0/+120
| | | | | | | | | | | allocaton on the X86 to add information to the machine code denoting that our floating point stackifier cannot handle virtual point register that are alive across basic blocks. This pass adds an implicit def of all virtual floating point register at the end of each basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10446 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified cast so that it converts the int to a long before casting toJohn Criswell2003-12-121-1/+1
| | | | | | | | a pointer. This evades a warning emitted by GCC when we cast from unsigned int (32 bit) to void * (64 bit) on SparcV9. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10435 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the TargetMachine::getJITStubForFunction method for X86, finegrainifyChris Lattner2003-12-122-4/+13
| | | | | | | namespacification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10430 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off "attribute weak" to pacify Mac OS X's system compiler, which prints aBrian Gaeke2003-12-112-8/+50
| | | | | | | warning whenever it sees it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10391 91177308-0d34-0410-b5e6-96231b3b80d8
* This appears to fix Bug 172 and does not break any other feature tests orJohn Criswell2003-12-101-0/+6
| | | | | | | regression tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10388 91177308-0d34-0410-b5e6-96231b3b80d8
* Upon Chris's suggestion, moved the #ifdef's to the generated C code.John Criswell2003-12-102-16/+10
| | | | | | | This makes LLVM and the generated C code more portable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10377 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the CBE on Solaris/Sparc. We need to define the return value ofJohn Criswell2003-12-102-2/+16
| | | | | | | | | the write() system call because it returns 64 bits on Solaris 64 bit, and an implicit return value of int says it returns 32 bits. Admittedly, this is a bit of a hack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10375 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to enable the SSA based peephole optimizer.Chris Lattner2003-12-012-4/+13
| | | | | | | | | | | Eventually this pass will provide substantially better code in the interim between when we have a crappy isel and nice isel. Unfortunately doing so requires fixing the backend to actually SUPPORT all of the fancy addressing modes that we now generate, and writing a DCE pass for machine code. Each of these is a fairly substantial job, so this will remain disabled for the immediate future. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10276 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new SSA-based peephole optimizer which includes copy propagation andChris Lattner2003-12-012-4/+566
| | | | | | | | | folding of instructions into addressing modes. This creates lots of dead instructions, which are currently not deleted. It also creates a lot of instructions that the X86 backend currently cannot handle. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10275 91177308-0d34-0410-b5e6-96231b3b80d8
* generalize the instruction types permitted a bitChris Lattner2003-12-012-70/+84
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10274 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2003-11-302-8/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10270 91177308-0d34-0410-b5e6-96231b3b80d8
* output foo(void) as appropriateChris Lattner2003-11-262-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10232 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in previous checkinChris Lattner2003-11-252-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10231 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not depend on the gep index types to determine what flavor of index it isChris Lattner2003-11-252-36/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10225 91177308-0d34-0410-b5e6-96231b3b80d8
* Support constant casting constant pointers to ints/uints, and/orBrian Gaeke2003-11-222-8/+16
| | | | | | | the other way around, instead of failing a large, tumor-like assertion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10171 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant shift expressions, meet InstSelectSimple. Yow!!Brian Gaeke2003-11-222-100/+110
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10170 91177308-0d34-0410-b5e6-96231b3b80d8
* Stub for constant shift expr support.Brian Gaeke2003-11-222-0/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10168 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR149 - support constant shift expressions.Brian Gaeke2003-11-222-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10167 91177308-0d34-0410-b5e6-96231b3b80d8
* * Add code to flush the ICache, which any self-respecting SMC must doMisha Brukman2003-11-211-5/+8
| | | | | | | | | * Restore registers *after* everything else to avoid any possible side effects This fixes McCat-imp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10147 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR123Chris Lattner2003-11-182-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10069 91177308-0d34-0410-b5e6-96231b3b80d8
* ISO 9899 7.13.2.1 (3) says that "[...] the values of objects of automaticChris Lattner2003-11-162-8/+78
| | | | | | | | | | | | | | storage duration that are local to the function containing the invocation of the [...] setjmp macro that do not have volatile-qualified type and have been changed between the setjmp invocation and longjmp call are indeterminate." As such, we have to mark all variables in a function that uses 'invoke' as volatile. This fixes PR77 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10035 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the file before we close the llvm namespace.Misha Brukman2003-11-131-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9954 91177308-0d34-0410-b5e6-96231b3b80d8
* Substantially re-organized this file:Misha Brukman2003-11-131-600/+554
| | | | | | | | | | | | | | * There is now only one pass to print out assembly instead of two * It is a FunctionPass * The Module-level printing of globals is now in doFinalization() method of the FunctionPass * The code has been reformatted to follow LLVM coding standards * Some comments, not all, were doxygenified * Last but not least, the function to create an instance of this pass is also no longer a method in the UltraSparc class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9953 91177308-0d34-0410-b5e6-96231b3b80d8
* The function to create an instance of this pass is no longer a method ofMisha Brukman2003-11-132-2/+2
| | | | | | | the UltraSparc class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9952 91177308-0d34-0410-b5e6-96231b3b80d8
* The functions to create new instances of passes are no longer methods in theMisha Brukman2003-11-131-15/+16
| | | | | | | UltraSparc class. Comments are also doxygen-compatible now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9951 91177308-0d34-0410-b5e6-96231b3b80d8
* * Put command-line switches in their own namespaceMisha Brukman2003-11-131-17/+16
| | | | | | | * Pass creation functions are no longer in the UltraSparc class git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9950 91177308-0d34-0410-b5e6-96231b3b80d8
* Force a dependency on the .inc file, which must be generated!Misha Brukman2003-11-131-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9949 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-1178-72/+371
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix problems linking against the reoptimizer; _llvm_regAllocState must haveBrian Gaeke2003-11-101-2/+2
| | | | | | | | externally-visible linkage, and SaveStateToModule must default to true for llc. I don't remember why I made it const; perhaps it should be deconstified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9858 91177308-0d34-0410-b5e6-96231b3b80d8
* Operand numbers are now ints. Save the register allocation of the valueBrian Gaeke2003-11-103-30/+40
| | | | | | | | | each instruction produces as "operand" -1, and the other operands as 0 .. n, as before. PhyRegAlloc::saveState() is refactored into PhyRegAlloc::saveStateForValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9842 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR103Brian Gaeke2003-11-091-6/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9830 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two typos I found in comments.Brian Gaeke2003-11-082-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9806 91177308-0d34-0410-b5e6-96231b3b80d8
* For some reason, LICM and GCSE like to crash the FunctionPassManager when theyMisha Brukman2003-11-081-2/+4
| | | | | | | are being added as FunctionPasses... Sigh. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9798 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement branching to a PC-relative constant (not a BasicBlock).Misha Brukman2003-11-071-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9793 91177308-0d34-0410-b5e6-96231b3b80d8
* PreSelection is not optional, it performs a necessary and vital transformationMisha Brukman2003-11-071-12/+15
| | | | | | | | | | for the Sparc backend: breaking up constant expressions. Thus, we cannot have it guarded by a conditional, it should never be disabled. Also, it's now available for the JIT since it is a FunctionPass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9791 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to emitting MachineConstantPool the way it was meant to be done.Misha Brukman2003-11-072-49/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9777 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to using the standard representation of the constant pool -- namely, theMisha Brukman2003-11-071-338/+322
| | | | | | | | MachineConstantPool. This involved refactoring the two classes involved in printing out Sparc assembly. In fact, they should share all this code anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9776 91177308-0d34-0410-b5e6-96231b3b80d8
* We accept TargetMachine as a const reference.Misha Brukman2003-11-071-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9775 91177308-0d34-0410-b5e6-96231b3b80d8
* PreSelection and PeepholeOpts are now FunctionPasses.Misha Brukman2003-11-071-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9774 91177308-0d34-0410-b5e6-96231b3b80d8
* * Stop making a global for each constant that cannot live in an instruction;Misha Brukman2003-11-071-36/+14
| | | | | | | | | | it will be converted to a MachineConstantPool index during instruction selection * This is now eligible to become a FunctionPass since it does not have any side effects outside of the function it is processing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9773 91177308-0d34-0410-b5e6-96231b3b80d8
* * Use the MachineConstantPool for storing constants instead of a hash_set;Misha Brukman2003-11-071-17/+41
| | | | | | | | | * Do not create new globals for constants! Also, order #includes as per coding style guide git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9772 91177308-0d34-0410-b5e6-96231b3b80d8
* Use `basename $<` to get just the filename, not full path, for ease of reading.Misha Brukman2003-11-071-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9770 91177308-0d34-0410-b5e6-96231b3b80d8
* Hopefully this will fix PR98Chris Lattner2003-11-071-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9762 91177308-0d34-0410-b5e6-96231b3b80d8
* Hopefully fix the objdir != srcdir issueChris Lattner2003-11-071-6/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9761 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warnings building on sparcChris Lattner2003-11-061-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9758 91177308-0d34-0410-b5e6-96231b3b80d8
* * Make the comment header 80 columns longMisha Brukman2003-11-061-3/+3
| | | | | | | * Alphabetize #includes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9751 91177308-0d34-0410-b5e6-96231b3b80d8
* Let's not forget about our friends -- Constant Pool indices.Misha Brukman2003-11-061-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9750 91177308-0d34-0410-b5e6-96231b3b80d8
* We know exactly what the value of $< is, so instead of using `basename $<` toMisha Brukman2003-11-051-8/+7
| | | | | | | get just the filename and not the full path, just use the filename directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9730 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use a class before it is defined.Chris Lattner2003-11-051-6/+9
| | | | | | | Be gcc 3.4 clean git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9727 91177308-0d34-0410-b5e6-96231b3b80d8