Commit Graph

54 Commits

Author SHA1 Message Date
Bill Wendling
5c7e326585 Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 05:15:13 +00:00
Jeff Cohen
4b607748d8 The best unbreakage yet, addressing Bill's concerns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32622 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:15:42 +00:00
Jeff Cohen
c21c5eeb4f An even better unbreakage...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32617 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 22:57:14 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Bill Wendling
b5ebf15b2b Added a temporary hack to get the llvm-streams to work for future checkins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:21:29 +00:00
Chris Lattner
9b9cc5ab71 MachineInstr includes this
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31858 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-18 21:48:05 +00:00
Chris Lattner
1ccc4684f3 Implement operator<< for machine basic blocks to make it easier to dump them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31857 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-18 21:47:36 +00:00
Chris Lattner
34ea07692f add two helper methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31143 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-23 23:35:35 +00:00
Chris Lattner
cd5bad3711 New, wonderful isSuccessor method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31103 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-21 06:50:05 +00:00
Chris Lattner
20a6d8e630 ADd a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30707 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 20:16:45 +00:00
Misha Brukman
ea61c35872 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21409 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:39:54 +00:00
Chris Lattner
bbec41dbac Improve spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19931 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30 00:13:34 +00:00
Chris Lattner
3cf8e6857e Adjust to ilist changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 18:41:12 +00:00
Chris Lattner
1fca5ff62b Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 16:14:51 +00:00
Chris Lattner
3dfbb558b5 Remove the unused MachineBasicBlock2IndexFunctor class.
Move method bodies that depend on <algorithm> out of line to
MachineBasicBlock.cpp.  Patch contributed by Morten Ofstad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 15:41:13 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Alkis Evlogimenos
6177d3f448 Add MachineBasicBlock2IndexFunctor. This is useful for densemaps from
MachineBasicBlocks to an arbitrary type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16068 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-27 04:00:26 +00:00
Chris Lattner
f24d879520 Expose some helpful methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 09:59:04 +00:00
Chris Lattner
dc4a4922d3 Add some machine CFG related stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 01:59:11 +00:00
Brian Gaeke
0bbcd6bfd1 Add a forwarding method pop_front() that allows you to delete instructions
from the beginning of a MBB.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14074 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-08 18:52:47 +00:00
Tanya Lattner
17fb34bf8c Moved MachineBasicBlock deconstructor to cpp file and removed it from LeakDetector to fix memory leak bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13718 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 07:14:35 +00:00
Tanya Lattner
792699c46e Added MachineFunction parent* to MachineBasicBlock. Customized ilist template
to set the parent when a MachineBasicBlock is added to a MachineFunction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13716 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-24 06:11:51 +00:00
Brian Gaeke
da86bdc75c Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13518 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:57:23 +00:00
Brian Gaeke
c07d8d8a26 Add a Number field w/ accessor method, for function-level unique numbering
of MBBs.

Add non-const MachineBasicBlock::getParent() accessor method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13512 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 21:35:20 +00:00
Brian Gaeke
3ec4f261d2 Chris told me to take these assertions out a few days ago, but I forgot to
check this in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13313 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 01:04:52 +00:00
Chris Lattner
0aef12a7a9 Move the GraphTraits for MachineBasicBlocks to the MachineBasicBlock file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13299 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 21:05:34 +00:00
Brian Gaeke
3707241f31 Add pred./succ. list size methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13214 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 04:46:35 +00:00
Brian Gaeke
8560af4f5f Move private methods to end of class decl at Chris's request
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13210 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 04:15:06 +00:00
Brian Gaeke
61d3d5c06b Fix thinkos that Chris caught for me.
Make pred mutators private.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13209 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 03:59:48 +00:00
Brian Gaeke
76456bc40c Add machine-code CFG support: MachineBasicBlocks may now have their own
predecessors and successors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13208 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 02:16:33 +00:00
Brian Gaeke
da44b15125 Add clear() forwarding method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12580 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 22:43:12 +00:00
Chris Lattner
83706a5a3a MachineBasicBlock::remove should not change the iterator passed into it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12569 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 21:58:50 +00:00
Alkis Evlogimenos
743d0a1f83 Refactor rewinding code for finding the first terminator of a basic
block into MachineBasicBlock::getFirstTerminator().

This also fixes a bug in the implementation of the above in both
RegAllocLocal and InstrSched, where instructions where added after the
terminator if the basic block's only instruction was a terminator (it
shouldn't matter for RegAllocLocal since this case never occurs in
practice).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11748 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 18:14:48 +00:00
Chris Lattner
5e61fa9519 Add a MachineBasicBlock::getParent() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 16:13:54 +00:00
Chris Lattner
9b2c31c5cb eliminate a pair of really inefficient methods now that noone uses them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11579 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 16:45:22 +00:00
Alkis Evlogimenos
aad5c05051 Add LeakDetection to MachineInstr.
Move out of line member functions of MachineBasicBlock to
MachineBasicBlock.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11497 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-16 07:17:43 +00:00
Alkis Evlogimenos
903b22cd51 Mark MachineBasicBlock::operator[] deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11392 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 20:05:56 +00:00
Brian Gaeke
f13a3f4dd1 Include <iosfwd>.
Add prototypes for MachineBasicBlock's dump() and print() methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11365 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 04:40:15 +00:00
Alkis Evlogimenos
94dc07728f Move ilist_trairs<MachineInstr> in MachineBasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11358 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 19:12:03 +00:00
Alkis Evlogimenos
ab8672c8bb Add parent pointer to MachineInstr that points to owning
MachineBasicBlock. Also change opcode to a short and numImplicitRefs
to an unsigned char so that overall MachineInstr's size stays the
same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11357 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:49:07 +00:00
Alkis Evlogimenos
c0b9dc5be7 Change MachineBasicBlock's vector of MachineInstr pointers into an
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11340 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 02:27:10 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Chris Lattner
1194e95019 Code generation phases are not allowed to modify the LLVM representation.
Because of this, we'll make the MBB->BB mapping const as it should be


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7351 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:30:37 +00:00
Chris Lattner
3153b35a52 Get rid of deprecated function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4997 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 07:30:45 +00:00
Chris Lattner
d0aa0cdbc6 Change MachineBasicBlock's to not be Annotations, instead they are kept as
part of a linked list tracked by MachineFunction.  MachineBasicBlock::get
is now linear time instead of constant time, and thus is deprecated!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4337 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 05:30:46 +00:00
Chris Lattner
8e7ae9860b Add BasicBlock list to MchineFunction that will eventually be the only
way to access MachineBasicBlocks.  For now, it is never filled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4324 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:08:43 +00:00
Chris Lattner
506676de32 Remvoe dead fixme and typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4320 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:55:26 +00:00
Chris Lattner
aec11f1dec MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4319 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:53:00 +00:00
Chris Lattner
51a8d85281 Inline some methods from .cpp files into .h files, minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4313 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:21:55 +00:00