aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Nice tasty llc fixes. These should fix LLC for x86 for everything inBrian Gaeke2003-06-277-112/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SingleSource except oopack and Oscar. (Sorry, Oscar.) include/llvm/Target/TargetInstrInfo.h: Remove virtual print method. Add accessors for ImplicitUses/Defs. lib/Target/TargetInstrInfo.cpp: Remove virtual print method. If you really wanted this, just use MI->print(O, TM); instead... lib/Target/X86: FloatingPoint.cpp: ...like this. X86InstrInfo.h: Remove virtual print method. Define the PrintImplUses target-specific flag bit. X86InstrInfo.def: Add the PrintImplUses flag to all the instructions which implicitly use CL, because the assembler needs to see the CL in order to generate the right instruction. Printer.cpp: Ditch fnIndex at Chris's request. Now we use CurrentFnName to name constants in the constant pool for each function instead. This avoids keeping state between runOnMachineFunction() invocations, which is a no-no. Having MangledGlobals be global is a bogon I'd like to get rid of too, but making it a static member of Printer causes link errors (why???). Make NumberForBB into a member of Printer instead of a global, too. Make printOp and printMemReference into methods of Printer. X86InstrInfo::print is now Printer::printMachineInstruction, because TargetInstrInfo::print is history. (Because of this, we have to qualify the names of some TargetInstrInfo methods we call.) Print out the ImplicitUses field of any instruction we print that has the PrintImplUses bit set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6924 91177308-0d34-0410-b5e6-96231b3b80d8
* Number constants from constant pool as CPIf_i where f is the function indexBrian Gaeke2003-06-262-20/+22
| | | | | | | and i is the constant pool index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6920 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to globaldce for deleting dead function prototypesChris Lattner2003-06-261-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6918 91177308-0d34-0410-b5e6-96231b3b80d8
* When internalizing global ctor/dtor list, also mark it constant. This is ↵Chris Lattner2003-06-261-0/+8
| | | | | | | | | gross, but until DSA is working all of the time and is totally reliable, we do this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6917 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement more aggressive folding of constant GEP instructionsChris Lattner2003-06-261-6/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6913 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for elimination of load instruction from global constantsChris Lattner2003-06-261-0/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6912 91177308-0d34-0410-b5e6-96231b3b80d8
* Integrate the C writer's name mangler.Brian Gaeke2003-06-252-30/+164
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6908 91177308-0d34-0410-b5e6-96231b3b80d8
* First draft of X86 LLC backend. This should be OK for small programs likeBrian Gaeke2003-06-252-60/+708
| | | | | | | Shootout, but it has some issues with bigger programs. Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6907 91177308-0d34-0410-b5e6-96231b3b80d8
* Instcombine: X * -1 -> -XChris Lattner2003-06-251-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6904 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: LevelRaise/2003-06-25-ExprAnalysis.llChris Lattner2003-06-251-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6903 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: Mem2Reg/2003-06-26-IterativePromote.llChris Lattner2003-06-251-10/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6901 91177308-0d34-0410-b5e6-96231b3b80d8
* - Fixed name mangling conditions to handle 'linkonce' linkage type. InJoel Stanley2003-06-252-60/+88
| | | | | | | | | | | | | particular, name mangling for GlobalValues only occurs when the linkage type is internal or when the name must be mangled to avoid a collision. See comments in CWriter::getValueName for more information. - 'inline' keyword is now emitted for functions with 'linkonce' linkage type. - Fixed typos. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6898 91177308-0d34-0410-b5e6-96231b3b80d8
* Add argument to DAE to allow operation on non-internal functionsChris Lattner2003-06-251-9/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6895 91177308-0d34-0410-b5e6-96231b3b80d8
* It seems likely that floats would need a cast too, because they areBrian Gaeke2003-06-252-2/+4
| | | | | | | ordinarily promoted to doubles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6894 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: ADCE/2003-06-24-BadSuccessor.llChris Lattner2003-06-241-12/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6891 91177308-0d34-0410-b5e6-96231b3b80d8
* Make assertion more descriptiveChris Lattner2003-06-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6889 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not mark ALL terminators live if any instruciton in the block is live. ↵Chris Lattner2003-06-241-2/+23
| | | | | | | | | | We only want to mark it live if it is an unconditional branch. This fixes bug: ADCE/2002-05-28-Crash.ll and makes this pass _much_ more useful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6887 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.llChris Lattner2003-06-241-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6883 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: TailDup/2003-06-24-Simpleloop.llChris Lattner2003-06-241-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6881 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement new transforms:Chris Lattner2003-06-231-4/+33
| | | | | | | | Replace (cast (sub A, B) to bool) -> (setne A, B) Replace (cast (add A, B) to bool) -> (setne A, -B) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6873 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 2003-06-23-PromotedExprs.llx -- if we are adding two bytes we betterBrian Gaeke2003-06-232-0/+28
| | | | | | | | explicitly cast the result to be a byte, or C will gleefully promote it to int. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6869 91177308-0d34-0410-b5e6-96231b3b80d8
* Include <cmath> instead of <math.h>Brian Gaeke2003-06-231-10/+1
| | | | | | | Remove isnan; it's too unportable to handle cleanly at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6866 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for GCC 3.3Chris Lattner2003-06-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6865 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid dividing by zero when dealing with zero sized types (like [0 x double])Chris Lattner2003-06-232-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6862 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the padding needed for variable-size alloca's, which should work now.Vikram S. Adve2003-06-231-6/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6859 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: InstCombine/2003-06-22-ConstantExprCrash.llChris Lattner2003-06-221-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6857 91177308-0d34-0410-b5e6-96231b3b80d8
* Add paranoia checkingChris Lattner2003-06-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6856 91177308-0d34-0410-b5e6-96231b3b80d8
* Test changeChris Lattner2003-06-221-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6852 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of Tail duplication pass.Chris Lattner2003-06-221-0/+324
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6846 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use the inefficient, fixed function, CBW, CDQ, ... instructionsChris Lattner2003-06-222-4/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6844 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a ton of extraneous #includesChris Lattner2003-06-228-17/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for the MultiObject flag, which was fundamentally brokenChris Lattner2003-06-224-14/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6840 91177308-0d34-0410-b5e6-96231b3b80d8
* Instcombine cast (getelementptr Ptr, 0, 0, 0) to ... into: cast Ptr to ...Chris Lattner2003-06-211-0/+17
| | | | | | | | This fixes type safety problems in a variety of benchmarks that were confusing DSA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6837 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor simplification to 64-bit instselChris Lattner2003-06-212-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6831 91177308-0d34-0410-b5e6-96231b3b80d8
* For 16 and 32-bit multiplies, use the IMUL instruction instead of the MUL ↵Chris Lattner2003-06-212-42/+22
| | | | | | | | | instruction. This allows us to not force the use of the EAX/AX registers! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6830 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IMULr16 & IMULr32 instructionsChris Lattner2003-06-211-7/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6829 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate code for LONG indexes to getelementptr instructions more efficientlyChris Lattner2003-06-212-2/+50
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6828 91177308-0d34-0410-b5e6-96231b3b80d8
* Some preprocessors doen't support // comments and get confusedChris Lattner2003-06-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6821 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build. :(Chris Lattner2003-06-201-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6797 91177308-0d34-0410-b5e6-96231b3b80d8
* RDCCR defines arg. #1, not arg. #2.Vikram S. Adve2003-06-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6796 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to privatize NodeTypeChris Lattner2003-06-191-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6795 91177308-0d34-0410-b5e6-96231b3b80d8
* * Changes to make NodeType be private to DSNode.Chris Lattner2003-06-195-76/+107
| | | | | | | | | * Add new MultiObject flag to DSNode which keeps track of whether or not multiple objects have been merged into the node, allowing must-alias info to be tracked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6794 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix output bug: Intel asm comment character is #, not ;.Brian Gaeke2003-06-192-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6792 91177308-0d34-0410-b5e6-96231b3b80d8
* RECAPITALIZE all the names of pseudo-instructions, and add a comment explainingBrian Gaeke2003-06-191-14/+17
| | | | | | | | | the convention. :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6791 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename many instructions to their Intel asm-compatible names. ThisBrian Gaeke2003-06-191-49/+49
| | | | | | | | | | involves removing the [bwl] suffixes from instruction names, as well as some other distinguishing marks (32/64/80 on fp insns, _i suffixes, etc.) Lowercase all instr. names as well for consistency's sake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6790 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Initialization and Finalization methods for the Printer pass,Brian Gaeke2003-06-192-6/+52
| | | | | | | | | | | | | to print various things on a module-by-module basis (currently, only the former is used). Don't print < > around names. The assembler can't take it. Print pseudoinstructions only as comments. The poor little assembler can't take that, either. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6789 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove usage of sys/unistd.hChris Lattner2003-06-192-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6788 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the functionality of InstCombine/call.llChris Lattner2003-06-191-1/+145
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6783 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a bunch of complicated code. The functionality is implemented in ↵Chris Lattner2003-06-191-118/+6
| | | | | | instcombine instead git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6782 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Target/X86/X86TargetMachine.{cpp,h}: Add initial versionBrian Gaeke2003-06-182-0/+15
| | | | | | | (non-working) of llc guts for X86, and add a prototype for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6779 91177308-0d34-0410-b5e6-96231b3b80d8