summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move the utility function UpdateTerminator() from CodePlacementOpt() intoJim Grosbach2009-11-121-0/+53
| | | | | | MachineBasicBlock so other passes can utilize it. llvm-svn: 86947
* Add support for tail duplication to BranchFolding, and extendDan Gohman2009-11-111-4/+1
| | | | | | | | | | | tail merging support to handle more cases. - Recognize several cases where tail merging is beneficial even when the tail size is smaller than the generic threshold. - Make use of MachineInstrDesc::isBarrier to help detect non-fallthrough blocks. - Check for and avoid disrupting fall-through edges in more cases. llvm-svn: 86871
* Make -print-machineinstrs more readable.Dan Gohman2009-10-311-13/+18
| | | | | | | | | | | | | | - Be consistent when referring to MachineBasicBlocks: BB#0. - Be consistent when referring to virtual registers: %reg1024. - Be consistent when referring to unknown physical registers: %physreg10. - Be consistent when referring to known physical registers: %RAX - Be consistent when referring to register 0: %reg0 - Be consistent when printing alignments: align=16 - Print jump table contents. - Don't print host addresses, in general. - and various other cleanups. llvm-svn: 85682
* Mention if a block has its address taken in debug output.Dan Gohman2009-10-301-0/+1
| | | | llvm-svn: 85571
* Initial target-independent CodeGen support for BlockAddresses.Dan Gohman2009-10-301-1/+2
| | | | llvm-svn: 85556
* remove std::ostream versions of printing stuff for MBB and MF,Chris Lattner2009-08-231-10/+1
| | | | | | upgrading a few things to use raw_ostream llvm-svn: 79811
* remove dead PrefixPrinter class.Chris Lattner2009-08-231-6/+4
| | | | llvm-svn: 79796
* random cleanups.Chris Lattner2009-08-231-25/+24
| | | | llvm-svn: 79794
* fix another bozo bugChris Lattner2009-08-181-2/+2
| | | | llvm-svn: 79313
* fix accidentally inverted conditional and add comment.Chris Lattner2009-08-181-1/+4
| | | | llvm-svn: 79312
* turn this conditional into something humans might actuallyChris Lattner2009-08-181-8/+25
| | | | | | be able to understand ;-) llvm-svn: 79311
* Re-apply LiveInterval index dumping patch, with fixes suggested by BillDavid Greene2009-08-031-4/+6
| | | | | | and others. llvm-svn: 78003
* Move more to raw_ostream, provide support for writing MachineBasicBlock,Daniel Dunbar2009-07-241-1/+11
| | | | | | LiveInterval, etc to raw_ostream. llvm-svn: 76965
* revert r76602, 76603, and r76615, pending design discussions.Chris Lattner2009-07-211-3/+1
| | | | llvm-svn: 76646
* Add PrefixPrinter arguments to the dump routines for MachineFunction andDavid Greene2009-07-211-1/+3
| | | | | | MachineBasicBlock. We'll use these shortly. llvm-svn: 76603
* If a MachineBasicBlock has multiple ways of reaching another block,Dan Gohman2009-05-051-4/+2
| | | | | | | | 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
* Reapply 68073, with fixes. EH Landing-pad basic blocks are notDan Gohman2009-03-311-0/+10
| | | | | | | | entered via fall-through. Don't miss fallthroughs from blocks terminated by conditional branches. Also, move isOnlyReachableByFallthrough out of line. llvm-svn: 68129
* Constify arguments in isSuccessor and isLayoutSuccessor.Dan Gohman2009-03-301-2/+2
| | | | llvm-svn: 68054
* Delete unnecessary parens around return values.Dan Gohman2009-01-081-1/+1
| | | | llvm-svn: 61950
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-1/+1
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Add a new MachineBasicBlock utility function, isLayoutSuccessor, thatDan Gohman2008-10-021-0/+5
| | | | | | | can be used when deciding if a block can transfer control to another via a fall-through instead of a branch. llvm-svn: 56968
* Remove isImm(), isReg(), and friends, in favor of Dan Gohman2008-09-131-1/+2
| | | | | | | | | 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
* Fold the useful features of alist and alist_node into ilist, andDan Gohman2008-07-281-24/+12
| | | | | | | | | | | | | | | | 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
* Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.Dan Gohman2008-07-171-0/+12
| | | | | | | Fix a leak that this turned up in LowerSubregs.cpp. And, comment a leak in LiveIntervalAnalysis.cpp. llvm-svn: 53746
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-53/+53
| | | | | | | | | | | 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
* Added addition atomic instrinsics and, or, xor, min, and max.Mon P Wang2008-05-051-0/+13
| | | | llvm-svn: 50663
* - Check if a register is livein before removing it. It may have already been ↵Evan Cheng2008-04-241-0/+5
| | | | | | | | removed. - Do not iterate over SmallPtrSet, the order of iteration is not deterministic. llvm-svn: 50209
* Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to ↵Evan Cheng2008-02-281-0/+1
| | | | | | 16-byte boundaries. llvm-svn: 47703
* Rename PrintableName to Name.Bill Wendling2008-02-261-1/+1
| | | | llvm-svn: 47629
* Change "Name" to "AsmName" in the target register info. Gee, a refactoring toolBill Wendling2008-02-261-1/+1
| | | | | | would have been a Godsend here! llvm-svn: 47625
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-7/+7
| | | | llvm-svn: 46930
* remove #includageChris Lattner2008-01-071-1/+1
| | | | llvm-svn: 45697
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-3/+3
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-4/+3
| | | | | | | | | | | | | | | 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
* Implement automatically updated def/use lists for all MachineInstr register Chris Lattner2008-01-011-4/+55
| | | | | | | operands. The lists are currently kept in MachineRegisterInfo, but it does not yet provide an iterator interface to them. llvm-svn: 45477
* properly encapsulate the parent field of MBB and MI with get/set accessors.Chris Lattner2007-12-311-19/+21
| | | | llvm-svn: 45469
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-301-3/+2
| | | | | | | | | | | | 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
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Use empty() member functions when that's what's being tested for insteadDan Gohman2007-10-031-1/+1
| | | | | | of comparing begin() and end(). llvm-svn: 42585
* Silence warning while compiling with gcc 4.2Anton Korobeynikov2007-09-021-1/+2
| | | | llvm-svn: 41676
* Fix misue of iterator pointing to erased object. Uncovered byDavid Greene2007-06-291-3/+3
| | | | | | _GLIBCXX_DEBUG. llvm-svn: 37793
* Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock ↵Evan Cheng2007-06-181-0/+60
| | | | | | method. llvm-svn: 37633
* Move ReplaceUsesOfBlockWith() out of BranchFolding into a MachineBasicBlock ↵Evan Cheng2007-06-041-0/+27
| | | | | | general facility. llvm-svn: 37408
* Move isSuccessor() offline, change it to use std::find.Evan Cheng2007-05-171-0/+6
| | | | llvm-svn: 37190
* print isLandingPad() for MBBsChris Lattner2007-04-301-3/+5
| | | | llvm-svn: 36600
* Print preds / succs BB numbers.Evan Cheng2007-03-091-2/+2
| | | | llvm-svn: 35040
* Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.Evan Cheng2007-02-191-1/+7
| | | | llvm-svn: 34428
* For PR1207:Reid Spencer2007-02-191-7/+1
| | | | | | | Revert patches that caused the problem. Evan, please investigate and reapply when you've discovered the problem. llvm-svn: 34399
* Added removeLiveIn.Evan Cheng2007-02-171-1/+7
| | | | llvm-svn: 34381
* Add live-ins to MachineBasicBlock.Evan Cheng2007-02-101-1/+22
| | | | llvm-svn: 34111
OpenPOWER on IntegriCloud