summaryrefslogtreecommitdiff
path: root/lib/VMCore/BasicBlock.cpp
Commit message (Collapse)AuthorAge
* The (negative) offset from a SymbolTableListTraits-using ilist to its containerChris Lattner2007-04-17
| | | | | | | | | | object is always constant. As such, evaluate it at compile time instead of storing it as an ivar in SymbolTableListTraits. This shrinks every SymbolTableListTraits ilist by a word, shrinking BasicBlock from 44->40 bytes, Function from 96->88 bytes, and Module from 60->52 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36189 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor SymbolTableListTraits to only have a single pointer in it, insteadChris Lattner2007-04-17
| | | | | | | | | of two. This shrinkifies Function by 8 bytes (104->96) and Module by 8 bytes (68->60). On a testcase of mine, this reduces the memory used to read a module header from 565680b to 561024, a little over 4K. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36188 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-12
| | | | | | | | | | std::map<std::string, Value*> as its main datastructure. There are many improvements yet to be made, but this speeds up opt --std-compile-opts on 447.dealII by 7.3%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
* add method, correct commentChris Lattner2006-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30584 91177308-0d34-0410-b5e6-96231b3b80d8
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911 91177308-0d34-0410-b5e6-96231b3b80d8
* Use hidden visibility to reduce codesizeChris Lattner2006-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28974 91177308-0d34-0410-b5e6-96231b3b80d8
* When asked not to delete useless PHIs, really don't delete them, no matter howOwen Anderson2006-06-14
| | | | | | | redundant they are. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28777 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Vladimir Prus2006-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28725 91177308-0d34-0410-b5e6-96231b3b80d8
* New method BasicBlock::getFirstNonPHI.Vladimir Prus2006-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28724 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a helper methodChris Lattner2005-08-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an iterator invalidation problem when we decide a phi has a constant valueChris Lattner2005-08-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22675 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that hasConstantValue is more careful w.r.t. returning values that onlyChris Lattner2005-08-05
| | | | | | | | dominate the PHI node, this code can go away. This also makes passes more aggressive, e.g. implementing Transforms/CondProp/phisimplify2.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22670 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization intoNate Begeman2005-08-04
| | | | | | | | | BasicBlock's removePredecessor routine. This requires shuffling around the definition and implementation of hasContantValue from Utils.h,cpp into Instructions.h,cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22664 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate tabs and trailing spacesJeff Cohen2005-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21480 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve doxygen, from part of Evan's patch that didn't apply.Chris Lattner2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21394 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve doxygen documentation, patch contributed by Evan Jones!Chris Lattner2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21393 91177308-0d34-0410-b5e6-96231b3b80d8
* add an argument to allow avoiding deleting phi nodes.Chris Lattner2005-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21255 91177308-0d34-0410-b5e6-96231b3b80d8
* remove all of the various setName implementations, consolidating them intoChris Lattner2005-03-05
| | | | | | | Value::setName, which is no longer virtual. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20464 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the 2nd argument to Value::setNameChris Lattner2005-03-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20458 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new method.Chris Lattner2005-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20293 91177308-0d34-0410-b5e6-96231b3b80d8
* make this more efficient. Scan up to 16 nodes, not the whole list.Chris Lattner2005-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20289 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce the amount of searching this assertion does. On a testcase of mine,Chris Lattner2005-02-23
| | | | | | | this reduces the time for -simplifycfg in a debug build from 106s to 14.82s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20286 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve conformance with the Misha spelling benchmark suiteChris Lattner2005-01-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19930 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to ilist changes.Chris Lattner2005-01-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to changes in User class.Chris Lattner2005-01-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19892 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in the file I forgot last night, to solve all of the crashes in everyChris Lattner2004-12-11
| | | | | | | test in the suite. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18804 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement remove/eraseFromParent methodsChris Lattner2004-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16922 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | 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/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix #includes of i*.h files => Instructions.h as per PR403Misha Brukman2004-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15327 91177308-0d34-0410-b5e6-96231b3b80d8
* Find bugs sooner rather than later. In this case, don't allow the creationChris Lattner2004-07-06
| | | | | | | of instructions that don't have a first-class or void type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14646 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix GCC warningsChris Lattner2004-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14044 91177308-0d34-0410-b5e6-96231b3b80d8
* As much as I dislike doing this, it's the only fix for VC8.0 that I can comeChris Lattner2004-06-05
| | | | | | | up with, even though it's perfectly conformant code. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14034 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix retriving parent Function.Misha Brukman2004-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13001 91177308-0d34-0410-b5e6-96231b3b80d8
* Assert if deleting BasicBlock before removing it from Function.Misha Brukman2004-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12983 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove obsolete methodChris Lattner2004-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11302 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to the new BB ctorChris Lattner2004-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11113 91177308-0d34-0410-b5e6-96231b3b80d8
* When splitting a basic block, insert the new half immediately after the firstChris Lattner2004-02-04
| | | | | | | half. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11110 91177308-0d34-0410-b5e6-96231b3b80d8
* In BasicBlock::splitBasicBlock, just use islist::splice to move the ↵Chris Lattner2004-02-03
| | | | | | | | | | | | instructions, instead of a loop that is really inefficient with large basic blocks. This speeds up the inliner pass on the testcase in PR209 from 13.8s to 2.24s which still isn't exactly speedy, but is a lot better. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11105 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups and simplificationsChris Lattner2003-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10127 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using the nicer terminator auto-insertion APIChris Lattner2003-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10111 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Make code gcc 3.4 cleanChris Lattner2003-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9719 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-20
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use BasicBlock::succ_iteratorChris Lattner2003-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8700 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow specifying the name for the newly split basic blockChris Lattner2003-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8097 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug that occurred when removing the last predecessor INTO anChris Lattner2003-04-25
| | | | | | | infinite loop git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5953 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecesary &*'sChris Lattner2003-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5872 91177308-0d34-0410-b5e6-96231b3b80d8
* - Eliminated the deferred symbol table stuff in Module & Function, it reallyChris Lattner2002-11-20
| | | | | | | wasn't an optimization and it was causing lots of bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
* - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd toChris Lattner2002-10-13
| | | | | | | reflect the fact that it's a range being defined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4147 91177308-0d34-0410-b5e6-96231b3b80d8