Commit Graph

2024 Commits

Author SHA1 Message Date
Chris Lattner
fdd13f6afe Expose a pass ID for lower-invoke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11377 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:16:35 +00:00
Brian Gaeke
a0031cc08c Update the example here in the header file.
I don't know about you guys, but I rarely read the .html manuals :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 04:49:04 +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
Chris Lattner
0eb51b440c Add support for the llvm.memmove intrinsic.
Patch graciously contributed by Reid Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11354 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:10:10 +00:00
Chris Lattner
5ab827ff4a Urg, check in header I forgot. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 17:57:11 +00:00
Chris Lattner
2a90ba6017 Rename the opCode instance variable to Opcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11348 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 16:09:53 +00:00
Chris Lattner
9fc77d1358 Remove a dead field from MachineInstr!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11347 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 16:05:03 +00:00
Alkis Evlogimenos
024126ee23 Change interface so that we can add to the end of a basic block
without getting an assertion from ilist that we are dereferencing
ilist<T>::end().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11345 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 08:11:04 +00:00
Brian Gaeke
0eda78a372 Add one more doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11344 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 04:26:49 +00:00
Brian Gaeke
56aa531f93 Express one of MachineOperand's many constructors in terms of another, by means of default arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11343 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 04:15:00 +00:00
Brian Gaeke
2d58f0691e Remove these MachineOpCodeFlags and their accessor - they are never set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11341 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 04:00:55 +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
cd0b3a90aa Remove getOpCode(). Help doxygenify some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11338 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 01:34:03 +00:00
Chris Lattner
6a6dd6f487 If a node has more than 64 outgoing edges, make the edges go from the 'truncated' block,
instead of dropping them entirely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11334 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 20:44:17 +00:00
Brian Gaeke
e28adaa633 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11333 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 19:47:43 +00:00
Chris Lattner
54a6662da3 Add an important prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11320 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 06:11:06 +00:00
Chris Lattner
bc44aa61c4 Factor this code out of llvm-prof
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11314 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 05:54:25 +00:00
Chris Lattner
ed97ad63c2 Remove long obsolete method. switch instructions are first class entities in the CFG, and have been for a LOOOONG time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11303 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 01:17:58 +00:00
Chris Lattner
171de656eb An initial implementation of an LLVM ProfileInfo class which is designed to
eventually allow Passes to use profiling information to direct them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 22:11:42 +00:00
Misha Brukman
acddebd5bb Sprinkle liberally with comments, saute with doxygen until readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11293 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:49:59 +00:00
Misha Brukman
5e871dadae Doxygenify comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11292 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:48:12 +00:00
Chris Lattner
d6b5e5f637 Urg, the X86 backend DOES use virtual register operands. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11288 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:43:11 +00:00
Chris Lattner
376ad9fa9f Remove and simplify some of the bewildering collection of isFOORegister
methods which have strangely different semantics in different backends,
and noone knew what any did.

Getting rid of these ALSO allows the dependence of MachineInstr.h on
MRegisterInfo.h to be removed, which makes me much happier, and probably
alkis too.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11287 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:21:17 +00:00
Chris Lattner
2b38c0d94b Remove some unneeded stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:19:49 +00:00
Chris Lattner
9f42dd5472 Eliminate MachineOperand::isPhysicalRegister. The X86 backend should use
MRegisterInfo::isPhysicalRegister(MO.getReg()) and the Sparc backend should
use isMachineRegister()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11279 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:42:11 +00:00
Chris Lattner
b2e5db94cf Simplify condition, this does not change the predicate at all though
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11275 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 20:30:40 +00:00
Misha Brukman
991c76ca97 * Added class comments
* Doxygenified existing comments
* Compactified code to be more consistent


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11268 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 18:44:16 +00:00
Misha Brukman
c6f7591f5a Doxygen-ify comments, make function prototypes more consistent in format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11259 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 16:39:05 +00:00
Alkis Evlogimenos
71be6db3ef Add global methods that prevent us from using ilist::iterators as
random access iterators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11248 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 22:40:50 +00:00
Brian Gaeke
f7ecb9548d SchedGraph doesn't need to be friends with SchedGraphNodeCommon anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11240 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 18:43:06 +00:00
Chris Lattner
f32f56862a Now that all of the derived types have disciplined interfaces, we can eliminate
all of the ad-hoc storage of contained types.  This allows getContainedType to
not be virtual, and allows us to entirely delete the TypeIterator class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11230 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 05:40:24 +00:00
Chris Lattner
037b8b70d0 Increase encapsulation of the StructType class, eliminating the getElementTypes() member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11227 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 04:36:50 +00:00
Chris Lattner
36cb08ae5b Improve encapsulation in the FunctionType class, by adding param_(iterator/begin/end)
members, and eliminating the getParamTypes() method, and the associated typedef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11223 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 04:12:57 +00:00
Chris Lattner
aeb2a1d708 rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 21:44:31 +00:00
Chris Lattner
4ff0b9636d Substantially improve the DSA code by removing 'forwarding' nodes from
DSGraphs while they are forwarding.  When the last reference to the forwarding
node is dropped, the forwarding node is autodeleted.  This should simplify
removeTriviallyDead nodes, and is only (efficiently) possible because we are
using an ilist of dsnodes now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11175 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 01:27:18 +00:00
Chris Lattner
28897e1784 Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11173 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 00:53:26 +00:00
Chris Lattner
2cca3008e8 One of the 'annoying' things about ilists is that the iterators don't behave
quite the same as for non-intrusive lists of pointers to nodes.  To support
transitioning code bases, add a new 'compatibility' iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11172 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 00:51:31 +00:00
Chris Lattner
04364fb01e Change to use iterators instead of direct access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11170 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 00:22:41 +00:00
Chris Lattner
e187d56520 Abstract out the Nodes collection. Instead of providing a getNodes() method,
provide node_begin/end iterators, which are only guaranteed to be
bidirectional, not random access.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11165 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 23:57:09 +00:00
Chris Lattner
bee5ff3ae2 Actually USE isForwarding method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11160 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 23:02:32 +00:00
Chris Lattner
d1d2be3c16 As Alkis pointed out to me, I forgot to commit this... :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 22:54:19 +00:00
Brian Gaeke
5616dc9ea6 Use autoconf answers from config.h (FIXME, should autoconf this file
directly instead).

Fix LockHolder/MutexLocker typo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11156 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-06 22:33:17 +00:00
Misha Brukman
dadf3853e7 Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11153 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-06 18:40:35 +00:00
Alkis Evlogimenos
14be64018f Modify the two address instruction pass to remove the duplicate
operand of the instruction and thus simplify the register allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11124 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 22:17:40 +00:00
Brian Gaeke
fc1f6e835c Include <iosfwd> and <string> instead of <iostream>.
Take away the default iostream argument of createMachineFunctionPrinterPass(),
at Chris's request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11121 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 21:41:10 +00:00
Chris Lattner
cb2b3e5005 Check in header file I forgot before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11115 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 03:59:08 +00:00
Chris Lattner
3fb57b691d Delete the BasicBlock ctor that only takes a BasicBlock to insert before. This
fails when the basic block points to the function->end.  Instead, require that
the client pass in the function AND the basicblock to insert into.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11112 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 03:57:34 +00:00
Alkis Evlogimenos
4e7854407c When an instruction like: A += B had both A and B virtual registers
spilled, A was loaded from its stack location twice. This fixes the bug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11093 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-03 01:13:07 +00:00