summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/UnreachableBlockElim.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-4/+4
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-8/+8
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Fix PR10029 - VerifyCoalescing failure on patterns_dfa.c of 445.gobmk.Cameron Zwarich2011-05-271-2/+5
| | | | llvm-svn: 132181
* Make more passes preserve dominators (or state that they preserve dominators ifCameron Zwarich2011-01-081-0/+2
| | | | | | | | | | they all ready do). This removes two dominator recomputations prior to isel, which is a 1% improvement in total llc time for 403.gcc. The only potentially suspect thing is making GCStrategy recompute dominators if it used a custom lowering strategy. llvm-svn: 123064
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-2/+2
| | | | llvm-svn: 115996
* UnreachableBlockElim could incorrectly return false when it had not modified ↵Owen Anderson2010-09-291-1/+4
| | | | | | the CFG, but HAD modified some PHI nodes. Fixes PR8174. llvm-svn: 115083
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-231-3/+2
| | | | | | passes over to the new registration API. llvm-svn: 111815
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-3/+3
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-3/+3
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-3/+3
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* revert r98550, it isn't necessary or sufficient.Chris Lattner2010-03-151-15/+3
| | | | llvm-svn: 98558
* don't eliminate address-taken blocks here.Chris Lattner2010-03-151-3/+15
| | | | llvm-svn: 98550
* eliminate InvalidateLabel and LabelIDList from MMI and replaceChris Lattner2010-03-141-14/+2
| | | | | | them with a counter. llvm-svn: 98462
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-4/+2
| | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. llvm-svn: 95687
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-3/+2
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Preserve ProfileInfo.Andreas Neustifter2009-09-091-1/+9
| | | | llvm-svn: 81360
* Make UnreachableMachineBlockElim preserve MachineDominatorTree andDan Gohman2009-08-011-0/+15
| | | | | | | | | MachineLoopInfo. llc now runs MachineLoopInfo and MachineDominatorTree only twice, instead of three times. llvm-svn: 77759
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-1/+1
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-1/+1
| | | | llvm-svn: 76702
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-1/+1
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-1/+1
| | | | llvm-svn: 63198
* Invalidate debug/eh/gc labels when unreachable MBB is deleted.Anton Korobeynikov2008-10-311-13/+27
| | | | | | Based on patch by Martin Nowack! llvm-svn: 58536
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-1/+1
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Remove isImm(), isReg(), and friends, in favor of Dan Gohman2008-09-131-1/+1
| | | | | | | | | 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
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-2/+2
| | | | llvm-svn: 55779
* Remove more uses of std::set.Owen Anderson2008-08-141-6/+8
| | | | llvm-svn: 54787
* Reduce the entries in a phi before testing it for deadness, because removing ↵Owen Anderson2008-08-081-7/+7
| | | | | | the entries might make it dead. llvm-svn: 54535
* SDISel's constant branch folding can fold away self-loops, which doesn't ↵Owen Anderson2008-08-061-15/+40
| | | | | | | | result in any dead blocks, but rather an incorrect phi input. Add code to UnreachableMachineBlockElim to get rid of these entries. llvm-svn: 54432
* Fix breakage on ARM/2008-04-10-ScavengerAssert.ll.Owen Anderson2008-08-051-1/+2
| | | | llvm-svn: 54378
* Correctly handle replacement and removal of PHIs with one incoming register.Owen Anderson2008-08-051-1/+7
| | | | llvm-svn: 54374
* Remove unneeded iteration. Thanks to Dan for the feedback.Owen Anderson2008-08-051-16/+2
| | | | llvm-svn: 54337
* - Fix SelectionDAG to generate correct CFGs.Owen Anderson2008-08-041-3/+87
| | | | | | | | - Add a basic machine-level dead block eliminator. These two have to go together, since many other parts of the code generator are unable to handle the unreachable blocks otherwise created. llvm-svn: 54333
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-3/+3
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* 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
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29911
* Use hidden visibility to make symbols in an anonymous namespace getChris Lattner2006-06-281-1/+2
| | | | | | dropped. This shrinks libllvmgcc.dylib another 67K llvm-svn: 28975
* Remove trailing whitespaceMisha Brukman2005-04-211-3/+3
| | | | llvm-svn: 21420
* Fix the missing symbols problem Bill was hitting. Patch contributed byChris Lattner2005-03-171-0/+1
| | | | | | Bill Wendling!! llvm-svn: 20649
* Changes For Bug 352Reid Spencer2004-09-011-1/+1
| | | | | | | | 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/. llvm-svn: 16137
* Fix #includes of i*.h => Instructions.h as per PR403:Chris Lattner2004-07-291-1/+1
| | | | | | http://llvm.cs.uiuc.edu/PR403 . llvm-svn: 15333
* Fix a bug in the unreachable block elim pass. Dropping all references on aChris Lattner2004-07-061-4/+11
| | | | | | | | basic block clear()'s all of the operands lists, including phis. This caused removePredecessor to get confused later. Because of this, we just nuke (without prejudice) PHI nodes in unreachable blocks. llvm-svn: 14635
* Add a trivially simple pass to delete unreachable blocks from the CFG. ThisChris Lattner2004-07-021-0/+68
pass is required to paper over problems in the code generator (primarily live variables and its clients) which doesn't really have any well defined semantics for unreachable code. The proper solution to this problem is to have instruction selectors not select blocks that are unreachable. Until we have a instruction selection framework available for use, however, we can't expect all instruction selector writers to do this. Until then, this pass should be used. llvm-svn: 14563
OpenPOWER on IntegriCloud