summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BranchFolding.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-6/+6
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Be more aggressive about tail-merging small blocksDale Johannesen2008-05-121-1/+12
| | | | | | | if those blocks consist entirely of common instructions; merging will not add an extra branch in this case. llvm-svn: 51006
* Further rework of tail merge algorithm. Not quiteDale Johannesen2008-05-121-111/+77
| | | | | | | | semantically identical, but little difference in either results or execution speed; but it's much easier to read, at least IMO. llvm-svn: 50999
* Remove an evil vector bool. Cosmetic refactoring,Dale Johannesen2008-05-091-62/+85
| | | | | | no functional change. llvm-svn: 50921
* Rewrite tail merging algorithm to handle theDale Johannesen2008-05-091-87/+115
| | | | | | | | case where there are multiple blocks with a large number of common tail instructions more efficiently (compile time optimization). llvm-svn: 50916
* Make several variable declarations static.Dan Gohman2008-05-061-1/+1
| | | | llvm-svn: 50696
* Teach branch folding pass about implicit_def instructions. Unfortunately we ↵Evan Cheng2008-04-101-1/+56
| | | | | | can't just eliminate them since register scavenger expects every register use to be defined. However, we can delete them when there are no intra-block uses. Carefully removing some implicit def's which enable more blocks to be optimized away. llvm-svn: 49461
* Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to ↵Evan Cheng2008-02-281-1/+1
| | | | | | 16-byte boundaries. llvm-svn: 47703
* PR1909: Tail merging pass ran wild. It makes no sense to merge blocks in ↵Evan Cheng2008-02-191-3/+12
| | | | | | order to save a single instruction since a branch will be inserted for each BB. llvm-svn: 47301
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-2/+2
| | | | llvm-svn: 46930
* Use empty() instead of comparing size() with zero.Dan Gohman2008-01-291-1/+1
| | | | llvm-svn: 46514
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-5/+5
| | | | | | | 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-14/+11
| | | | | | | | | | | | | | | 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
* rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.Chris Lattner2008-01-061-1/+1
| | | | llvm-svn: 45667
* rename isStore -> mayStore to more accurately reflect what it captures.Chris Lattner2008-01-061-1/+1
| | | | llvm-svn: 45656
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-301-7/+5
| | | | | | | | | | | | 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
* Improve branch folding by recgonizing that explict successor relationships ↵Christopher Lamb2007-12-101-0/+5
| | | | | | impact the value of fall-through choices. llvm-svn: 44785
* Changed XXX to FIXME, and added comment to the README fileBill Wendling2007-10-251-1/+1
| | | | llvm-svn: 43359
* Added comment explaining why we are doing this check.Bill Wendling2007-10-251-0/+5
| | | | llvm-svn: 43353
* Don't branch fold inline asm statements.Bill Wendling2007-10-191-1/+2
| | | | llvm-svn: 43191
* More explicit keywords.Dan Gohman2007-08-021-1/+1
| | | | llvm-svn: 40757
* If assertions are not enabled, we should return False here.Duncan Sands2007-07-111-5/+4
| | | | llvm-svn: 38535
* Make this work with GLIBCXX_DEBUG.David Greene2007-07-101-1/+8
| | | | llvm-svn: 38516
* Fix misue of iterator pointing to erased object. Uncovered byDavid Greene2007-06-291-4/+5
| | | | | | _GLIBCXX_DEBUG. llvm-svn: 37793
* Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock ↵Evan Cheng2007-06-181-75/+4
| | | | | | method. llvm-svn: 37633
* Make throttle a hidden parameter, per review.Dale Johannesen2007-06-081-6/+11
| | | | llvm-svn: 37511
* Throttle tail merging; handling blocks with large numbers of predecessorsDale Johannesen2007-06-081-2/+6
| | | | | | is too slow. llvm-svn: 37509
* Tail merging wasn't working for predecessors of landing pads. PR 1496.Dale Johannesen2007-06-041-0/+22
| | | | llvm-svn: 37427
* Move ReplaceUsesOfBlockWith() out of BranchFolding into a MachineBasicBlock ↵Evan Cheng2007-06-041-40/+2
| | | | | | general facility. llvm-svn: 37408
* Fix CorrectExtraCFGEdges to allow for multiple LandingPad targets.Dale Johannesen2007-06-021-9/+6
| | | | llvm-svn: 37394
* Implement smarter algorithm for choosing which blocks to tail-merge.Dale Johannesen2007-06-011-28/+43
| | | | | | | | See test/CodeGen/X86/test-pic-jtbl.ll for a case where it works well; shaves another 10K off our favorite benchmark. I was hesitant about this because of compile speed, but seems to do OK on a bootstrap. llvm-svn: 37392
* Arrange for only 1 of multiple branches to landing pad to be kept.Dale Johannesen2007-05-311-4/+13
| | | | | | Do not remove empty landing pads (EH table needs to be updated) llvm-svn: 37375
* Changed per review comment.Dale Johannesen2007-05-301-3/+2
| | | | llvm-svn: 37355
* Make stable_sort in tail merging actually be stable (it never was, but didn'tDale Johannesen2007-05-291-1/+16
| | | | | | matter until my last change). Reenable tail merging by default. llvm-svn: 37354
* Blocks that cond-br and uncond-br/fallthrough to same block should haveDale Johannesen2007-05-241-1/+4
| | | | | | only one successor. llvm-svn: 37324
* Fix for PR1444: do not create two successors to the same block.Dale Johannesen2007-05-241-2/+10
| | | | | | | Temporarily, this breaks CodeGen/Generic/2006-02-12-InsertLibraryCall.ll by exposing an unrelated latent problem; working on that. llvm-svn: 37323
* Two tail merging improvements:Dale Johannesen2007-05-231-40/+44
| | | | | | | | | When considering blocks with more than 2 predecessors, merge the block with the largest number of matching insns, rather than the first block found. Considering that 1 matching insn is enough to show a win for candidates that already end with a branch. llvm-svn: 37315
* Make tail merging the default, except on powerPC. There was no prior artDale Johannesen2007-05-221-4/+13
| | | | | | | for a target-dependent default with a command-line override; this way should be generally usable. llvm-svn: 37285
* Remove some unneeded branches. (spotted by Evan, thanks)Dale Johannesen2007-05-181-0/+1
| | | | llvm-svn: 37198
* Remove extra CFG edges before doing these passes; it makes them happier.Dale Johannesen2007-05-151-1/+16
| | | | llvm-svn: 37089
* Do not generate branches to entry block. This fixes several test suiteDale Johannesen2007-05-101-4/+19
| | | | | | failures on PPC (can happen only when prologue code is null) llvm-svn: 36979
* Make tail merging handle many more cases (all it can, I think).Dale Johannesen2007-05-101-32/+91
| | | | llvm-svn: 36966
* Handle some non-exit blocks in tail merging.Dale Johannesen2007-05-071-11/+81
| | | | llvm-svn: 36907
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* Fix PR1228 and CodeGen/Generic/2007-04-30-LandingPadBranchFolding.llChris Lattner2007-04-301-2/+8
| | | | llvm-svn: 36602
* maintain LiveIn when splitting blocks (register scavenging needs it)Dale Johannesen2007-03-201-1/+22
| | | | llvm-svn: 35226
* Remove isAccessable.Jim Laskey2007-02-221-4/+4
| | | | llvm-svn: 34497
OpenPOWER on IntegriCloud