Commit Graph

509 Commits

Author SHA1 Message Date
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
Chris Lattner
0f0dc4e47c Remove exception specification. Only slows code down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@746 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:25:30 +00:00
Chris Lattner
c5a22ce2b9 Changes to compile with GCC 2.96
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@745 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:25:03 +00:00
Chris Lattner
a0d7f9dbb7 Add comment indicating semantics of indirect calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@744 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:24:35 +00:00
Chris Lattner
742b1461db New ctor for invoke inst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@743 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:24:10 +00:00
Chris Lattner
11a6d82447 Add support for indirect calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@742 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:23:14 +00:00
Chris Lattner
d97f802453 Add some casts to make GCC 2.96 happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@741 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:20:07 +00:00
Chris Lattner
004adcafec Add use_back() methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@740 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:18:19 +00:00
Chris Lattner
26e129e64f Add classof implementations for User
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@739 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:18:05 +00:00
Chris Lattner
067238d5d9 Expose typedefs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@738 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:17:50 +00:00
Chris Lattner
7502f635c6 Add support for module local constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@737 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:17:32 +00:00
Chris Lattner
72665af24d Add new opcode for Invoke instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@736 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:15:20 +00:00
Chris Lattner
9686fd11c4 Minor changes, add new ctor for invoke instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@735 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:14:53 +00:00
Chris Lattner
16ddd02545 Add assertions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@734 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:12:38 +00:00
Chris Lattner
30bdaaa3fc * Minor Formatting changes.
* MethodType now takes an explicit isVarArg arg instead of an implicit
  voidTy on the argument list


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@733 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:12:30 +00:00
Chris Lattner
5ef35fdb72 * Add destroyConstant stuff to handle module local constants
* Add classof implementations for more ConstPoolVal subclasses
* Pull null pointer implementation stuff out of ConstPoolPointer into
  a subclass ConstPoolPointerNull
* Implement ConstPoolPointerReference correctly and completely


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@732 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:11:10 +00:00
Ruchira Sasanka
598641b4ca --added support for implicit operands in machine instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@727 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-12 17:46:27 +00:00
Vikram S. Adve
a995e6086d Record implicitRefs for each machine instruction instead of
each VM instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@725 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-11 04:23:19 +00:00
Vikram S. Adve
a1d14f3555 Machine-independent code generation routines used in instruction
selection.  These used to live in several different places before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@719 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-10 20:50:43 +00:00
Vikram S. Adve
593da4acc5 Moved code generation support routines to InstrSelectionSupport.{h,cpp}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@718 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-10 20:50:20 +00:00
Chris Lattner
4387370c1c Factor parentness out of Module & GlobalVariable into GlobalValue
Implement SymbolTable debug/dump utility


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@710 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 19:28:15 +00:00
Chris Lattner
7323c69a31 Share ConstPoolPointer elements correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@706 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 15:38:36 +00:00
Chris Lattner
ef9c23f281 * Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@703 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 14:53:21 +00:00
Chris Lattner
f4ba6c710c First try at a horrible global value reference wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@701 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 06:12:09 +00:00
Chris Lattner
b00c582b6d Commit more code over to new cast style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-02 03:41:24 +00:00
Chris Lattner
1d87bcf490 Convert more code to use new style casts
Eliminate old style casts from value.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@696 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 20:11:19 +00:00
Chris Lattner
cfe26c930a Add more support for new style casts
Convert more code to use them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@695 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 18:26:53 +00:00
Chris Lattner
9636a91649 Add support for new style casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@694 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 16:18:37 +00:00
Chris Lattner
7295eb4ea3 Add support for newer cleaner isa, cast, dyn_cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@693 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 13:58:13 +00:00
Chris Lattner
6bad546c2a Update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@692 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 13:34:22 +00:00
Chris Lattner
f0604b84c7 Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
the BasicBlock class where they should be.  pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@691 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 13:19:53 +00:00
Chris Lattner
711774e169 Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
the BasicBlock class where they should be.  pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.

Also pull Interval stuff into the Interval class out of the global namespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@690 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 13:19:41 +00:00
Vikram S. Adve
2a97dd1fc3 Add vector `implicitUses' to class MachineCodeForVMInstr to hold values
that are used by the VM instruction but not explicit operands of the
m/c instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@684 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 00:18:12 +00:00
Ruchira Sasanka
e939ddb96b no major change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@674 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-30 23:22:45 +00:00
Ruchira Sasanka
06faeee041 added suggesting color suppor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@672 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-30 23:19:09 +00:00
Chris Lattner
4cfb153316 Implement a constant pointer value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@667 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-30 20:14:07 +00:00
Chris Lattner
7461bf5f8e Pull iterators out of CFG.h and genericize them with GraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@666 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 22:59:14 +00:00
Chris Lattner
3ff4387113 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@664 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 22:56:31 +00:00
Chris Lattner
41fbf305ee Initial support for construction of a call graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@660 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 00:08:15 +00:00
Chris Lattner
4a0cd6cada print out value's by pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@655 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 00:06:28 +00:00
Chris Lattner
6e9ff7ded6 Add capability to print out call graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@654 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 00:06:15 +00:00
Chris Lattner
6edcad89e7 Change debug info from #define to command line option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@646 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-19 16:26:10 +00:00
Chris Lattner
27cd2caca5 Remove debugging output stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@641 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-19 14:08:25 +00:00
Chris Lattner
8a28124a5f Add emitAssembly Method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@639 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-19 13:54:19 +00:00
Ruchira Sasanka
80acc6cf43 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@634 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 22:57:47 +00:00
Ruchira Sasanka
eda6806f6a --added methods to operand class to set/get registers after register allocation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@633 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 22:54:47 +00:00
Chris Lattner
6ec11d4eb0 Move operator << from Value.h to Assembly/Writer.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@626 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 17:03:14 +00:00
Chris Lattner
20f8d5d093 Remove operator << to Assembly/Writer.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@625 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 17:03:04 +00:00
Vikram S. Adve
e6cbbfeead Renamed files to match the primary classes they provide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@620 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 13:10:05 +00:00
Vikram S. Adve
8f3f5a87f9 Moved debugging interfaces for class Value to Value.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@604 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 12:43:15 +00:00
Vikram S. Adve
4bc86976bb Minor fixes: renamed target machine files; fold sched info into TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@603 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 12:41:43 +00:00
Vikram S. Adve
a578a6d054 Make class TargetMachine the common interface to all target-dependent
information, including instr, sched, and reg information.
Rename files to match the primary classes they provide.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@602 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 12:38:31 +00:00
Vikram S. Adve
0b5787ace8 Added debugging support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@601 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 12:23:40 +00:00
Chris Lattner
d70684f758 Add support for global constants, and for initializers for constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@598 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 04:01:05 +00:00
Ruchira Sasanka
475253b430 added a method to get reg num after register allocation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@596 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-15 21:11:48 +00:00
Ruchira Sasanka
427a527311 -modified machine operand class - took regNum out of union to set regNum after
retister allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@594 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-15 20:16:41 +00:00
Ruchira Sasanka
4d0d632927 -- debug messages dissabled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@589 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-15 16:54:40 +00:00
Ruchira Sasanka
c5258a4210 added reg alloc support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@588 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-15 00:34:31 +00:00
Ruchira Sasanka
1bf6d645cd --reg alloc code added
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@587 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-15 00:33:26 +00:00
Ruchira Sasanka
94d86e9677 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@579 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 20:31:39 +00:00
Chris Lattner
46cbff625e Chris seems fond of #include <vector>. Fix these. Also convert use list in
Value to a vector instead of a list.

Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@572 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 16:56:32 +00:00
Chris Lattner
7c94f9dc96 Minor reformatting, & protection fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@570 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 16:08:06 +00:00
Chris Lattner
5f3c2e566f Split Register specific stuff out from TargetMachine.h to RegInfo.h
Get rid of unneccesary #includes from TargetMachine.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@568 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 06:20:10 +00:00
Chris Lattner
e5bc8b0653 Split Target/Machine.h into three files:
* Machine.h
* InstInfo.h
* SchedInfo.h

TODO: Split out reg info stuff


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@567 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 06:08:03 +00:00
Chris Lattner
b26bcc5087 Make a new llvm/Target #include directory.
Move files from lib/CodeGen/TargetMachine to lib/Target
Move TargetData.h and TargetMachine.h to Target/{Data.h|Machine.h}
Prepare to split TargetMachine.h into several smaller files


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@566 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 05:34:53 +00:00
Chris Lattner
69db8da023 Checkin changes to:
1. Clean up the TargetMachine structure.  No more wierd pointers that have to
   be cast around and taken care of by the target.
2. Instruction Scheduling now takes the schedinfo as an argument.  The same
   should be done with the instinfo, it just isn't now.
3. Sparc.h is now just a factory method.  Eventually this file will dissapear,
   but probably not until we have more than one backend.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@564 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 04:32:38 +00:00
Chris Lattner
0e6530ee1b This checkin represents some cleanup of the backend, implementing the following things:
1. The TargetMachine structure is free to decide the process a particular target uses to generate code.
2. All of the gooee details of the sparc backend are now localized in the lib/CodeGen/TargetMAchine/Sparc directory.  The Sparc.h file that is globally visible is just a stub.
3. The Sparc.h file that esxists now will dissapear entirely someday when we have multiple backends chosen by a factory of some sort.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@559 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 03:37:52 +00:00
Chris Lattner
e710047854 Initial instruction tree support for the analysis library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@555 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 01:42:26 +00:00
Chris Lattner
07ea7d7f7e Generic k-way tree support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@554 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 01:42:01 +00:00
Chris Lattner
5f6baf78ea More cleanups, preparing to revamp InstrForest to, among other things,
not leak all its allocated memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@553 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-12 16:34:03 +00:00
Chris Lattner
4ddb4c82d7 * Clean up InstrForest
* Fix ins sel problem, test case:
void "foo" (int *%x, int *%y)

begin
        seteq int *%x, %y
        ret void
end


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@552 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-12 01:28:49 +00:00
Chris Lattner
d268ad6e2e Eliminate 'BasicNode' from InstrForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@551 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-11 23:52:11 +00:00
Chris Lattner
c2a2396e17 Eliminate MainTreeNode function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@550 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-11 23:22:43 +00:00
Chris Lattner
69f8ce051e Handle subtract in expression classifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@548 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-11 04:27:34 +00:00
Chris Lattner
871ffd7a2e Disable destructors on constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@547 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-11 04:27:19 +00:00
Chris Lattner
74f4a766c4 * Add capability of printing out a global variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@534 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 20:06:47 +00:00
Chris Lattner
be07811cd0 * Method::getType should return type cast as MethodType, eliminate getMethodType
* Make Type::*Ty not be const types
* Add a new Type.def file to provide info about types
* Add a full complement of casting methods to the Type class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@533 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 20:06:17 +00:00
Chris Lattner
746e0014a6 Update assertion to allow extra case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@532 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 20:02:12 +00:00
Chris Lattner
70cc3397f8 Implement global variable support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@530 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 07:58:01 +00:00
Chris Lattner
85cdba3bb6 Remove 3 gross global functions that don't belong here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@523 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 23:00:59 +00:00
Chris Lattner
74c2b7633f Rename contype to subtype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@522 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 22:26:58 +00:00
Chris Lattner
78914e772f Convert ConstRules to use annotations to clean it up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@514 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 21:00:23 +00:00
Chris Lattner
56786d268f Fix build breakage. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@511 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 19:52:23 +00:00
Chris Lattner
3533155dfb Remove extra #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@508 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 19:34:25 +00:00
Ruchira Sasanka
c866fe1949 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@507 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-08 17:23:06 +00:00
Ruchira Sasanka
0286ade27f *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@506 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-08 14:32:00 +00:00
Ruchira Sasanka
7cd2ca13c1 Committed for compliation. Not yet final.
--Ruchira


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@505 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-08 14:22:50 +00:00
Chris Lattner
04890ad7fb New file for supporting abstract types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@502 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 23:00:03 +00:00
Chris Lattner
c21708a4ea Provide a way to change the incoming value for a phi node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@495 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 22:19:55 +00:00
Chris Lattner
dcd2fb5f7b * Remove lots of unnecesary #includes
* Remove extra flyers
* Remove dependence on stringExtras by eliminating printIndent calls


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@486 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 21:18:16 +00:00
Chris Lattner
cffebdc390 * Remove lots of annoying extra #includes
* Elminate dependecy on stringextras.h by moving dump's into .cpp files
* Kill InOutIterator class because it breaks iterator semantics to work like that
   - Copy ctor on iterator doesn't work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@485 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 21:07:10 +00:00
Chris Lattner
f977bbcad6 * Add tag so emacs knows it's a c++ file
* Remove frivolous flyers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@484 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 21:04:59 +00:00
Chris Lattner
1b40a1bacd Add tags so emacs knows these are C++ files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@483 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 21:04:20 +00:00
Chris Lattner
8a17faaf07 Remove extra space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@482 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 21:03:14 +00:00
Chris Lattner
633bfa02d6 Remove ReversePostOrderTraversal declaration
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@481 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 21:02:50 +00:00
Chris Lattner
12a16341f6 * Don't predefine ReversePostOrderTraversal because it adds a dependence on vector
* static ctor/dtor is actually a REALLY good idea
* Remove explicit copy ctor and op=


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@480 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 21:02:14 +00:00
Chris Lattner
fcc8897ec1 NEw file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@478 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 19:29:23 +00:00
Chris Lattner
dfbaf73cf7 Follow the golden rule of the coding standards guide: Make the code look
like the rest of the system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@476 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 17:38:10 +00:00
Chris Lattner
f4f4c87037 Constant pool is eliminated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@473 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 17:08:28 +00:00
Chris Lattner
93f7fecc56 Add support for iteration through type graphs
Static constructors destroy genericity


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@472 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 17:04:29 +00:00
Chris Lattner
643afb3b01 * Fixed mapped_iterator to actually work with functors
* Implement mapto function that works like map in a functional programming language


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@439 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:30:28 +00:00
Chris Lattner
e05281537f Constant pools no longer exist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@438 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:29:55 +00:00
Chris Lattner
9152a47906 Eliminate DoConstantPoolMerging. ConstantPools no longer exist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@437 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:29:40 +00:00
Chris Lattner
539a4bf4b5 You no longer have to delete constants! They are located in a global
constant pool instead of in local ones.

Change bool handling to prevent modification of bool values


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@436 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:29:18 +00:00
Chris Lattner
5f30d24175 Annotations are now passed around as const objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@435 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:28:25 +00:00
Chris Lattner
368216420a Use a deque instead of a vector for greater efficiency writing bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@434 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:27:49 +00:00
Chris Lattner
740611a034 Clean stuff up.
Types are not named, they are described


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@433 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:27:25 +00:00
Chris Lattner
4c4007b3df Simplify SlotCalculator. SlotCalculator is now not a ModuleAnalyzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@432 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:27:05 +00:00
Chris Lattner
d5bbe381b9 Simplify analyzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@431 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:26:36 +00:00
Chris Lattner
b12dcd1c30 * Fix long standing problems that would affect inlining. How could this have worked?
* Update to new setName interface


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@430 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:26:13 +00:00
Chris Lattner
118630d924 Add assertion to check for
alloca [int]
for example


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@429 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:25:42 +00:00
Chris Lattner
9d3e9f93e5 * Values are AbstactTypeUsers to support abstract types
* SetName now takes extra parameter to support naming types and constants without handles


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@428 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:25:23 +00:00
Chris Lattner
d964e56a92 Remove extra whitespace at EOL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@427 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:24:35 +00:00
Chris Lattner
a797d28333 * Add support for Opaque & Abstract types.
* Remove silly enum values that are never going to be used
* What used to be a types "name" is now it's "description"
* Add a new iterator to type to allow users to iterate over subtypes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@426 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:23:59 +00:00
Chris Lattner
46b23d92e3 Support abstract types by keeping on the use list of the abstract type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@425 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:21:36 +00:00
Chris Lattner
810affe049 SymTabValues no longer hold constant pools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@424 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:21:04 +00:00
Chris Lattner
640040e1cf SymTabValue no longer includes ValueHolder for Module. Include it ourself
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@423 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:20:46 +00:00
Chris Lattner
f7bd639290 * Support new setName interface
* Make the iterator a little nicer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@422 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:20:18 +00:00
Chris Lattner
be4c4001f4 Support new setName interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@421 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:19:55 +00:00
Chris Lattner
2cac6d2ef4 * Add new DerivedType base class that goes between Type and the derived types
* Implement abstract types
* Add new Opaque derived type


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@420 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:19:29 +00:00
Chris Lattner
3e22bed211 Implement support for globally unique constants. Constants no longer live
in a module or method local pool, they are global to the llvm system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@419 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:18:19 +00:00
Chris Lattner
20b0010030 Add support for walking type graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@418 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:17:24 +00:00
Chris Lattner
2cb0722c00 Changing setName semantics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@417 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:16:57 +00:00
Chris Lattner
53aaefe18a Make annotations operations const with a mutable annotation list so that
we can annotate Types.  A better solution would be make types nonconst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@416 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:16:35 +00:00
Ruchira Sasanka
33b6e9f48b *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@411 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-31 20:30:42 +00:00
Vikram S. Adve
136c9f4062 Added function MachineInstr::operandIsDefined(i) and decl for
function PrintMachineInstructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@399 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 23:11:46 +00:00
Vikram S. Adve
24084be5f2 Extensive additions for supporting instruction scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@398 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 23:10:41 +00:00
Vikram S. Adve
bf24233691 Added class MachineSchedInfo and several supporting classes
as a machine description for instruction scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@397 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 23:09:36 +00:00
Vikram S. Adve
0e1158f340 Implementation of instruction scheduling for LLVM.
Currently schedules one basic block at a time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@396 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 23:07:19 +00:00
Vikram S. Adve
37866b3437 Class that encapsulates priority heuristics for instruction scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@395 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 23:06:49 +00:00
Vikram S. Adve
78ef1392f3 Scheduling DAG for instruction scheduling. Currently for a single basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@394 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 23:06:02 +00:00
Vikram S. Adve
71fc67c4b1 Simplification transformations to normalize the code for later passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@389 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 21:40:27 +00:00
Vikram S. Adve
81cd1e50ec Use const int instead of #define.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@388 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 21:35:26 +00:00
Vikram S. Adve
9827c6e315 Add copy and assignment operators for POIterator, and
static constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@387 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 21:34:56 +00:00
Chris Lattner
e7fb36030b Initial checkin of TargetData code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@384 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-27 16:00:15 +00:00
Chris Lattner
fed72d5973 Use the new TargetData class to factor out some of the shared code
between the static compilers and the interpreter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@379 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-27 15:50:12 +00:00
Chris Lattner
4647b1c3be Remove target specific method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@378 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-27 15:49:36 +00:00
Chris Lattner
231022954f Remove target specific code, move to TargetData.cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@377 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-27 15:49:16 +00:00
Chris Lattner
a0facd063b Extend annotations to pass data pointers around to the functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-27 05:17:47 +00:00
Chris Lattner
8dc89a330c Add annotation support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-23 17:07:56 +00:00
Chris Lattner
cda67e5086 Add annotation support to value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-23 17:06:21 +00:00
Chris Lattner
bd8364aed7 * Add assertions
* Add a nodeVisited method to the DF interator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-23 17:05:59 +00:00
Ruchira Sasanka
9166181257 LV info on machine instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-20 21:11:01 +00:00
Ruchira Sasanka
cc3a0dbb85 Corrected the compilation error by making the ValOperator class a friend of
MachineOperand class - Ruchira


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-13 16:54:48 +00:00
Vikram S. Adve
4f01c1ee99 Can't use ref to stack value!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-09 20:14:22 +00:00
Vikram S. Adve
98f2f8053b Needed old conditions as well as new in skipToNextVal()!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-09 19:18:33 +00:00
Vikram S. Adve
7c02601b58 Bug fix in ValOpIterator: not moving past operand with NULL Value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-08 00:15:42 +00:00
Ruchira Sasanka
0b03c6a492 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-07 21:01:23 +00:00
Ruchira Sasanka
773fc471bd Added isDef field to MachineOperand class - Ruchira
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-07 20:14:30 +00:00
Vikram S. Adve
6a0c6d82a9 Use extra operand for instructions that set a CC register that
was not explicit before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-06 21:05:39 +00:00
Vikram S. Adve
3929cf6779 Allow numOperands of -1 for variable #operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-31 21:55:51 +00:00
Vikram S. Adve
1885da4f49 Allow machine instructions with variable numbers of arguments.
This is used only by Phi for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-31 21:49:28 +00:00
Vikram S. Adve
0a229ed79a Added dummy Phi instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-31 21:48:23 +00:00
Vikram S. Adve
f6445837e9 Added class MachineCodeForBasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-30 18:49:07 +00:00
Vikram S. Adve
b63933975f Added vector of machine instructions for the basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-30 18:47:24 +00:00
Chris Lattner
0add2d33e4 Modify var names to make it apparant that the code is really generic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 17:43:45 +00:00
Vikram S. Adve
7d2a2518e8 Added function printIndent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 04:41:27 +00:00
Vikram S. Adve
bf2b7e8beb Added a pointer hash function object for use in pointer maps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 04:41:10 +00:00
Vikram S. Adve
8b6821732e Make a function const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 04:40:15 +00:00
Vikram S. Adve
670d0abe49 Added several SPARC instructions including conditional move and SETHI.
Added MachineInstrInfo class and subclass UltraSparcInstrInfo.
Added several fields to MachineInstrDescriptor (and renamed it from
MachineInstrInfo).  Latency fields are to support scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 04:26:42 +00:00
Vikram S. Adve
2e4d108495 Remove redundant and unused functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 04:20:33 +00:00
Vikram S. Adve
44a853cc53 Added MachineInstrInfo class and moved instruction-related members there.
Added several fields to MachineInstrDescriptor (and renamed it from
MachineInstrInfo.  Latency fields are to support scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 04:09:37 +00:00
Vikram S. Adve
6a175e01eb Eliminate separate enum for operand register type.
Use union for alternative data for different operand types.
Add iterator over Value* operands in a MachineInstr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 04:06:37 +00:00
Chris Lattner
a25809dda4 Add an arg to insertVal to allow us to prevent builtin types from being ignored
when they are inserted


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-26 16:28:18 +00:00
Chris Lattner
e5a57ee363 Add support for extern varargs methods & varargs method calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-25 22:47:55 +00:00
Ruchira Sasanka
683847fb75 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-24 17:14:13 +00:00
Chris Lattner
4bc3daaa3f Eliminated the Unique class in favor of NonCopyable and NonCopyableV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 18:26:21 +00:00
Chris Lattner
57dbb3ad63 Moved inline/llvm/Tools/* to include/llvm/Support/*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 17:46:59 +00:00
Chris Lattner
50d89859e2 Fix coding style issues to actually attempt to be somewhat uniform
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 05:03:15 +00:00
Chris Lattner
d8fa8e2aa1 Nonpolymorphic class, doesn't need a virtual dtor!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 03:57:05 +00:00
Chris Lattner
75279ccc75 Clean up hash table usage
Remove opaque pointer used for C compatibility which isn't an issue


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 03:50:57 +00:00
Chris Lattner
6c5a32d545 Removal of the redundant CompileContext wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 03:09:03 +00:00
Chris Lattner
8f367bd3c0 Large scale changes to implement new command line argument facility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 02:35:57 +00:00
Chris Lattner
3fcf6ec1e9 Add flag for emacs so it realizes it's C++ code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-22 05:15:16 +00:00
Chris Lattner
aceb9132b7 Privatize LLCOptions. It had no business being visible to the entire
program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-22 04:40:02 +00:00
Chris Lattner
c21d4fcb20 Move private header into private directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-22 03:59:25 +00:00
Chris Lattner
953e0d7076 Convert from using C style char*'s to strings.
Look ma, no strdups


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-22 03:57:31 +00:00
Chris Lattner
29f921ca75 Remove String file some more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-22 00:46:48 +00:00
Chris Lattner
7ac1040ece Destroy the StringUtils.h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-22 00:18:10 +00:00
Chris Lattner
68498cefe6 Eliminate lots of unnecessary #includes and forward decls
there are probably more to kill


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 23:24:48 +00:00
Chris Lattner
57738965f8 Exterminate nasty Cisms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 22:42:09 +00:00
Chris Lattner
7e583cfafe Renamed include/llvm/Codegen to include/llvm/CodeGen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 20:58:30 +00:00
Chris Lattner
87bdcaf2b8 More minor reorganizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 20:08:52 +00:00
Chris Lattner
cfad5df977 Remove getTempValuesForMachineCode from the Instruction interface
to remove dependency on <vector>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 20:04:10 +00:00
Chris Lattner
7e314d2042 Add support for casting operators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:10:33 +00:00
Chris Lattner
19f31f28d8 More functionality, renamed API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:07:19 +00:00
Chris Lattner
f98e88f745 Moved isIntegral to the Type system
Renamed equals(char) to equalsInt(char).  Made it a const memfunc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:02:43 +00:00
Vikram S. Adve
14bc392291 General support utilities like a program options class and a StringMap
class for mapping strings to arbitrary things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:40:18 +00:00
Vikram S. Adve
9ad9f09ef2 CompileContext and options class for the llc compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:39:30 +00:00
Vikram S. Adve
23ee550765 Header files for the target architecture description and for instruction
selection, and instances of these for the SPARC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:39:03 +00:00
Vikram S. Adve
230365abf7 Provide simpler ways to extract the value of an integer constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:11:07 +00:00
Vikram S. Adve
d01d99b2a0 Compute and cache information about the storage size and layout
of structures.  This information is machine-dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:09:17 +00:00
Vikram S. Adve
6575a1d134 Provide uniform access to the pointer operand and to the index
operands (if any) for different types of MemAccessInst's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:07:06 +00:00
Vikram S. Adve
3344615555 Added a representation of the machine instructions generated
for a VM instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:05:02 +00:00
Chris Lattner
369bbeb62c Start of expression analysis support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:17:55 +00:00
Chris Lattner
ba7cf16dbb Header to raise and lower representation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:17:47 +00:00
Chris Lattner
a137f87051 Add multiply as a supported constant propogation operation
Include the LevelChange.h header in AllOpts.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:14:41 +00:00
Chris Lattner
e3ad3575b0 New function: WriteAsOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:14:01 +00:00
Chris Lattner
2ce0cbbbe1 Add new base class ConstPoolInt, useful for dealing with integral constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:13:28 +00:00
Chris Lattner
646ffa4919 Add new method, ensureTypeAvailable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:13:04 +00:00
Chris Lattner
edde66d9e0 Change is*Type to be a casting convertion operator
Add a new isIntegral virtual function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:12:34 +00:00
Chris Lattner
781532e45b Add an function to BinaryOperator to swap the two operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:09:33 +00:00
Chris Lattner
94572e0c93 Add short forms of the get*Type methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:09:11 +00:00
Chris Lattner
083735d582 Fixed typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-16 16:17:18 +00:00
Chris Lattner
52f2750ddb Rename 'isMethodExternal' to 'isExternal'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 06:35:24 +00:00
Chris Lattner
2e35bedc82 Add a function to convert a double to a string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 00:16:38 +00:00
Chris Lattner
d2fdd91c66 Add support to write and read a fixed amount of raw data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 00:16:22 +00:00
Chris Lattner
644dc172f5 * The parent of a constant pool is a SymTabValue, not a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:08:51 +00:00
Chris Lattner
dc4c3f2f5f Made the following changes:
* ValueHolder became a 3 argument template.  This allows for BasicBlock to
  use the value holder arg as a typesafe parent pointer.
* SymTabValue no longer inherits from Value
* Method does not inherit from only SymTabValue.  Now it inherits from both
  STV & Value.
* Module does not inherit from only SymTabValue.  Now it inherits from both
  STV & Value.
* Updated the SymTabValue.h file to reference SymTabValue instead of STDef
  in several places
* Added isArraySelector & isStructSelector to GetElementPtr instruction


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:07:58 +00:00
Chris Lattner
ec0c497877 Made it not inline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-12 23:35:11 +00:00
Chris Lattner
b144fb872c Add DebugValue global function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-12 23:33:53 +00:00
Chris Lattner
282072869e hasSideEffects should be marked virtual
stores and free's have sideeffects


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-09 19:38:26 +00:00
Chris Lattner
fb3f24fd57 Fix stupid typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-09 16:54:29 +00:00
Chris Lattner
ab5ac6bb38 Implementation of Store & GetElementPtr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 23:22:50 +00:00
Chris Lattner
027dcc5b22 Implemented shl, shl, & load instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 21:10:27 +00:00
Chris Lattner
71496b3b50 Moved Cast from being a Unary instruction to being an "Other" instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 19:03:27 +00:00
Chris Lattner
cbab0f7edd Add a new "addOperand" method to User.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 18:38:18 +00:00
Chris Lattner
0908309e3c Neg instruction removed. Cast instruction implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 04:57:15 +00:00
Chris Lattner
9f3d27654a Convert BinaryOperand and UnaryOperator to only take instruction types of
the appropriate enum


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 20:17:23 +00:00
Chris Lattner
a41f50dea8 Broad superficial changes:
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 19:24:15 +00:00