1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

84 Commits

Author SHA1 Message Date
Dan Gohman
6b7d1390d7 Initial target-independent CodeGen support for BlockAddresses.
llvm-svn: 85556
2009-10-30 01:27:03 +00:00
Chris Lattner
9a542aae19 remove std::ostream versions of printing stuff for MBB and MF,
upgrading a few things to use raw_ostream

llvm-svn: 79811
2009-08-23 03:13:20 +00:00
Chris Lattner
85bc7f732b remove dead PrefixPrinter class.
llvm-svn: 79796
2009-08-23 00:47:04 +00:00
Chris Lattner
f1c8c46e95 random cleanups.
llvm-svn: 79794
2009-08-23 00:35:30 +00:00
Chris Lattner
4efe44f456 fix another bozo bug
llvm-svn: 79313
2009-08-18 04:34:36 +00:00
Chris Lattner
64ac9ab553 fix accidentally inverted conditional and add comment.
llvm-svn: 79312
2009-08-18 04:33:15 +00:00
Chris Lattner
6270a4cc48 turn this conditional into something humans might actually
be able to understand ;-)

llvm-svn: 79311
2009-08-18 04:30:35 +00:00
David Greene
070216fa44 Re-apply LiveInterval index dumping patch, with fixes suggested by Bill
and others.

llvm-svn: 78003
2009-08-03 21:55:09 +00:00
Daniel Dunbar
339c88008f Move more to raw_ostream, provide support for writing MachineBasicBlock,
LiveInterval, etc to raw_ostream.

llvm-svn: 76965
2009-07-24 10:36:58 +00:00
Chris Lattner
135caf1a2b revert r76602, 76603, and r76615, pending design discussions.
llvm-svn: 76646
2009-07-21 21:12:58 +00:00
David Greene
979d7aa03a Add PrefixPrinter arguments to the dump routines for MachineFunction and
MachineBasicBlock.  We'll use these shortly.

llvm-svn: 76603
2009-07-21 18:27:05 +00:00
Dan Gohman
5e839321f2 If a MachineBasicBlock has multiple ways of reaching another block,
allow it to have multiple CFG edges to that block. This is needed
to allow MachineBasicBlock::isOnlyReachableByFallthrough to work
correctly. This fixes PR4126.

llvm-svn: 71018
2009-05-05 21:10:19 +00:00
Dan Gohman
86e4d0130c Reapply 68073, with fixes. EH Landing-pad basic blocks are not
entered via fall-through. Don't miss fallthroughs from blocks
terminated by conditional branches. Also, move
isOnlyReachableByFallthrough out of line.

llvm-svn: 68129
2009-03-31 18:39:13 +00:00
Dan Gohman
abcfb30fc2 Constify arguments in isSuccessor and isLayoutSuccessor.
llvm-svn: 68054
2009-03-30 20:06:29 +00:00
Dan Gohman
321b716d84 Delete unnecessary parens around return values.
llvm-svn: 61950
2009-01-08 22:19:34 +00:00
Dan Gohman
30c5ce1b7d Switch the MachineOperand accessors back to the short names like
isReg, etc., from isRegister, etc.

llvm-svn: 57006
2008-10-03 15:45:36 +00:00
Dan Gohman
bf63ae1e29 Add a new MachineBasicBlock utility function, isLayoutSuccessor, that
can be used when deciding if a block can transfer control to another
via a fall-through instead of a branch.

llvm-svn: 56968
2008-10-02 22:09:09 +00:00
Dan Gohman
fa32c7c6d9 Remove isImm(), isReg(), and friends, in favor of
isImmediate(), isRegister(), and friends, to avoid confusion
about having two different names with the same meaning. I'm
not attached to the longer names, and would be ok with
changing to the shorter names if others prefer it.

llvm-svn: 56189
2008-09-13 17:58:21 +00:00
Dan Gohman
9653b21dc2 Fold the useful features of alist and alist_node into ilist, and
a new ilist_node class, and remove them. Unlike alist_node,
ilist_node doesn't attempt to manage storage itself, so it avoids
the associated problems, including being opaque in gdb.

Adjust the Recycler class so that it doesn't depend on alist_node.
Also, change it to use explicit Size and Align parameters, allowing
it to work when the largest-sized node doesn't have the greatest
alignment requirement.

Change MachineInstr's MachineMemOperand list from a pool-backed
alist to a std::list for now.

llvm-svn: 54146
2008-07-28 21:51:04 +00:00
Dan Gohman
f38f99ccc5 Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.
Fix a leak that this turned up in LowerSubregs.cpp.
And, comment a leak in LiveIntervalAnalysis.cpp.

llvm-svn: 53746
2008-07-17 23:49:46 +00:00
Dan Gohman
cd25487258 Pool-allocation for MachineInstrs, MachineBasicBlocks, and
MachineMemOperands. The pools are owned by MachineFunctions.

This drastically reduces the number of calls to malloc/free made
during the "Emit" phase of scheduling, as well as later phases
in CodeGen. Combined with other changes, this speeds up the
"instruction selection" phase of CodeGen by 10% in some cases.

llvm-svn: 53212
2008-07-07 23:14:23 +00:00
Mon P Wang
84a269e023 Added addition atomic instrinsics and, or, xor, min, and max.
llvm-svn: 50663
2008-05-05 19:05:59 +00:00
Evan Cheng
1a97cb159e - Check if a register is livein before removing it. It may have already been removed.
- Do not iterate over SmallPtrSet, the order of iteration is not deterministic.

llvm-svn: 50209
2008-04-24 09:06:33 +00:00
Evan Cheng
f8b1257d2e Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to 16-byte boundaries.
llvm-svn: 47703
2008-02-28 00:43:03 +00:00
Bill Wendling
8fb166bf6c Rename PrintableName to Name.
llvm-svn: 47629
2008-02-26 21:47:57 +00:00
Bill Wendling
50f5c4be14 Change "Name" to "AsmName" in the target register info. Gee, a refactoring tool
would have been a Godsend here!

llvm-svn: 47625
2008-02-26 21:11:01 +00:00
Dan Gohman
cabaec582f Rename MRegisterInfo to TargetRegisterInfo.
llvm-svn: 46930
2008-02-10 18:45:23 +00:00
Chris Lattner
f4f5495b06 remove #includage
llvm-svn: 45697
2008-01-07 07:42:25 +00:00
Chris Lattner
f83aae613c rename TargetInstrDescriptor -> TargetInstrDesc.
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.

llvm-svn: 45695
2008-01-07 07:27:27 +00:00
Chris Lattner
f7f96d818f Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects
that it is cheap and efficient to get.

Move a variety of predicates from TargetInstrInfo into 
TargetInstrDescriptor, which makes it much easier to query a predicate
when you don't have TII around.  Now you can use MI->getDesc()->isBranch()
instead of going through TII, and this is much more efficient anyway. Not
all of the predicates have been moved over yet.

Update old code that used MI->getInstrDescriptor()->Flags to use the
new predicates in many places.

llvm-svn: 45674
2008-01-07 01:56:04 +00:00
Chris Lattner
39b56ec51b Implement automatically updated def/use lists for all MachineInstr register
operands.  The lists are currently kept in MachineRegisterInfo, but it does
not yet provide an iterator interface to them.

llvm-svn: 45477
2008-01-01 01:12:31 +00:00
Chris Lattner
d8b7ecd871 properly encapsulate the parent field of MBB and MI with get/set accessors.
llvm-svn: 45469
2007-12-31 04:56:33 +00:00
Chris Lattner
9e5cc35593 Add new shorter predicates for testing machine operands for various types:
e.g. MO.isMBB() instead of MO.isMachineBasicBlock().  I don't plan on 
switching everything over, so new clients should just start using the 
shorter names.

Remove old long accessors, switching everything over to use the short
accessor: getMachineBasicBlock() -> getMBB(), 
getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc.

llvm-svn: 45464
2007-12-30 23:10:15 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Dan Gohman
30ba45b569 Use empty() member functions when that's what's being tested for instead
of comparing begin() and end().

llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Anton Korobeynikov
5b49f44609 Silence warning while compiling with gcc 4.2
llvm-svn: 41676
2007-09-02 22:11:14 +00:00
David Greene
ad230f223f Fix misue of iterator pointing to erased object. Uncovered by
_GLIBCXX_DEBUG.

llvm-svn: 37793
2007-06-29 02:45:24 +00:00
Evan Cheng
978058bcd7 Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.
llvm-svn: 37633
2007-06-18 22:43:58 +00:00
Evan Cheng
0dbe4d04db Move ReplaceUsesOfBlockWith() out of BranchFolding into a MachineBasicBlock general facility.
llvm-svn: 37408
2007-06-04 06:44:01 +00:00
Evan Cheng
b4cc6606d5 Move isSuccessor() offline, change it to use std::find.
llvm-svn: 37190
2007-05-17 23:58:53 +00:00
Chris Lattner
c7f45f4572 print isLandingPad() for MBBs
llvm-svn: 36600
2007-04-30 23:12:53 +00:00
Evan Cheng
e7ba7ee5d8 Print preds / succs BB numbers.
llvm-svn: 35040
2007-03-09 08:29:08 +00:00
Evan Cheng
e4ab9c032b Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
llvm-svn: 34428
2007-02-19 21:49:54 +00:00
Reid Spencer
b27fcf3482 For PR1207:
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.

llvm-svn: 34399
2007-02-19 03:20:00 +00:00
Evan Cheng
d45a3628a2 Added removeLiveIn.
llvm-svn: 34381
2007-02-17 11:10:48 +00:00
Evan Cheng
6dc088ffd4 Add live-ins to MachineBasicBlock.
llvm-svn: 34111
2007-02-10 02:38:19 +00:00
Jeff Cohen
c396e18e8e The best unbreakage yet, addressing Bill's concerns.
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Jeff Cohen
03161dd132 An even better unbreakage...
llvm-svn: 32617
2006-12-15 22:57:14 +00:00
Bill Wendling
4d1444725b Removed more <iostream> includes
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Evan Cheng
98fa7ab4d7 Change MachineInstr ctor's to take a TargetInstrDescriptor reference instead
of opcode and number of operands.

llvm-svn: 31947
2006-11-27 23:37:22 +00:00