Commit Graph

328 Commits

Author SHA1 Message Date
Chris Lattner
9245fc75a4 Fix bug exposed by this testcase:
declare int "call_operand"      (%rtx_def*, int)        ;; Prototype for: call_operand
declare int "restore_operand"   (%rtx_def*, int)        ;; Prototype for: restore_operand

%rtx_def = type opaque
%rtx_def = type int
implementation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@934 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 04:55:44 +00:00
Ruchira Sasanka
b3b6f5338c Added support for both call/jmpl instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@930 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-21 16:43:41 +00:00
Ruchira Sasanka
33eb292e12 Added code to Initialize (MachineOperand) to initialize regNum to -1 -- Ruchira
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@919 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-19 18:17:49 +00:00
Chris Lattner
1992ce1ee4 Refactor code into Assembly & bytecode libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@903 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:31:54 +00:00
Chris Lattner
b44405a90d initial checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@902 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:31:42 +00:00
Chris Lattner
986fced5f9 move llvm/Transforms/Pass.h to the top level llvm/Pass.h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@901 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:19:09 +00:00
Chris Lattner
399376b53b Initial Checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@896 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:05:30 +00:00
Chris Lattner
3923140a4d Pull bytecode writing out of Module writer pass. Prepare to move to seperate file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@895 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:05:07 +00:00
Chris Lattner
c148d4e073 Add operator[] accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@894 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 20:04:40 +00:00
Vikram S. Adve
d8b5168a08 Add option to print per module instead of per method, so that
global declarations are also printed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@891 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 18:13:49 +00:00
Vikram S. Adve
07b877eb5d Add option to print as bytecode instead of assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@887 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 13:47:49 +00:00
Chris Lattner
a36941c069 Convert to new simpler Pass structure
Componentize better


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@879 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 05:22:27 +00:00
Chris Lattner
9797a51771 Convert to new simpler Pass structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@878 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 05:22:15 +00:00
Chris Lattner
b44523bd9d Convert to new simpler pass structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@877 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 05:21:56 +00:00
Chris Lattner
edcf6491a8 Simplify Pass by removing silly subclasses
Fix an iterator problem


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@876 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 05:20:53 +00:00
Chris Lattner
dea6b3cea9 Fix minor bug, update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@875 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 01:49:48 +00:00
Chris Lattner
989305bb23 Pass's return true if they make a modification, not if they fail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@872 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 01:32:17 +00:00
Chris Lattner
475369e255 Convert optimizations to use the Pass infrastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@871 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 01:31:58 +00:00
Vikram S. Adve
5684c4e2b4 Added virtual function to generate an instruction sequence to
load a constant into a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@862 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 00:02:06 +00:00
Vikram S. Adve
f60b1f479f 1. Add a bottom-up pass on BURG trees that is used to fix constant operands.
Needs to be bottom up because constant values may be forward-substituted
   to their uses (i.e., into the parent in the BURG tree).
2. Move most of the constant-fixup code into machine-indepedent file
   InstrSelectionSupport.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@860 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-17 23:59:09 +00:00
Vikram S. Adve
00de509022 Remove extra assert in dyn_cast_or_null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@856 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-17 22:39:50 +00:00
Ruchira Sasanka
618155f6c8 added initializing regNum to -1 in both constructors of MachineOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@851 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-16 16:36:34 +00:00
Ruchira Sasanka
c4d4b76efb Added support for caller saving
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@847 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-16 01:23:19 +00:00
Chris Lattner
634b352fa6 Print Debug Code to stderr instead of stdout so that it doesn't mess up the assembly output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@841 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 18:30:06 +00:00
Chris Lattner
2db4b72017 ConcretePass should not be a templated class!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@838 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 17:47:13 +00:00
Chris Lattner
1bffea0341 Add new Pass infrastructure and some examples
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@836 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 17:31:51 +00:00
Chris Lattner
25979243fe Convert to use Pass infrastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@834 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 17:30:18 +00:00
Chris Lattner
81564a018f File moved to: llvm/Transforms/HoistPHIConstants.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@833 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 17:30:06 +00:00
Ruchira Sasanka
f125525e3b --changed Sugesting colors for method calls/return values etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@829 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 16:23:48 +00:00
Ruchira Sasanka
21721b63c3 fixed a coalscing bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@828 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 16:22:44 +00:00
Chris Lattner
ec0a95f4e4 Be const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@826 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 15:54:43 +00:00
Chris Lattner
3ef77fcd55 Add cast_or_null & dyn_cast_or_null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@824 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 13:41:37 +00:00
Chris Lattner
c18545dc9e Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@822 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 13:21:42 +00:00
Chris Lattner
2a72820b43 Improve error messages on assertion failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@821 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 13:13:32 +00:00
Chris Lattner
3f04045e5a *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@813 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:34:12 +00:00
Chris Lattner
349d591161 Update comment, remove misleading method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@806 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:26:24 +00:00
Chris Lattner
cbf0c2c3e3 Initializers are not const even if the GV is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@805 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:24:46 +00:00
Vikram S. Adve
46c6371141 Cast NULL when requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@803 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:21:06 +00:00
Vikram S. Adve
c649458d18 Added getEntryNode() and getExitNode() functions.
The latter are actually bogus and will be fixed by me soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@802 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:20:44 +00:00
Vikram S. Adve
bc4ecce4a9 Insert code to trace values at basic block and method exits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@801 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:19:02 +00:00
Vikram S. Adve
c9abc6528d Added routine to create a char array for a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@798 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:16:27 +00:00
Chris Lattner
f96315e985 Use the instruction.def file to remain up to date with future instruction
changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@792 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 17:24:50 +00:00
Chris Lattner
2b49e336b6 New file to define instructions...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@791 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 17:24:33 +00:00
Chris Lattner
1166b00316 New module linking functionality prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@789 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 16:57:49 +00:00
Chris Lattner
704037f024 Dang, I screwed up the merge. This should be better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@785 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 07:18:40 +00:00
Chris Lattner
2f004fdf18 Fix filename in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@751 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:32:42 +00:00
Chris Lattner
432b0a7e3d Better linux support. This file still sucks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@750 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:31:55 +00:00
Chris Lattner
6fed025318 Fix broken #endif
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@749 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:31:00 +00:00
Chris Lattner
0b693fb125 not is a keyword in Ansi C++. Avoid it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@748 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:30:39 +00:00
Chris Lattner
da47526737 Clean up initializers for GCC 2.96
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@747 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:30:10 +00:00