summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Value.cpp
Commit message (Collapse)AuthorAgeFilesLines
* rewrite Value::takeName to take advantage of the new symtab stuff. ThisChris Lattner2007-02-151-6/+55
| | | | | | | causes it to require no allocations and no symtab lookups in the common case. This speeds up instcombine 9.2% on 447.dealII. llvm-svn: 34324
* Add a new Value::getNameStr method, which is preferred over getName.Chris Lattner2007-02-151-1/+1
| | | | llvm-svn: 34310
* add a setName variant that takes a null-terminated string. This can beChris Lattner2007-02-131-0/+4
| | | | | | used to avoid std::string allocations in common cases. llvm-svn: 34232
* Add new setName accessor which doesn't require creating a string.Chris Lattner2007-02-121-20/+28
| | | | llvm-svn: 34197
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-121-19/+50
| | | | | | | | | 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%. llvm-svn: 34193
* fix uninitialized variableChris Lattner2007-02-111-0/+1
| | | | llvm-svn: 34182
* add an optimization for the case where the src has no nameChris Lattner2007-02-111-0/+6
| | | | llvm-svn: 34174
* add a helper method: Value::takeNameChris Lattner2007-02-111-12/+26
| | | | llvm-svn: 34171
* eliminate ValueSymbolTable::rename, it has no advantage over using ↵Chris Lattner2007-02-071-1/+3
| | | | | | | | remove+insert. Make insert/remove assert if used incorrectly instead of returning a bool. llvm-svn: 33988
* For PR411:Reid Spencer2007-02-051-6/+9
| | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. llvm-svn: 33918
* For PR411:Reid Spencer2007-01-061-4/+4
| | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. llvm-svn: 32956
* Removed iostream #includes. Replaced std::cerr with DOUT.Bill Wendling2006-11-171-4/+4
| | | | llvm-svn: 31814
* Change the signature of replaceUsesOfWithOnConstant. The bool was alwaysChris Lattner2005-10-041-1/+1
| | | | | | | true dynamically. Finally, pass the Use* that replaceAllUsesWith has into the method for future use. llvm-svn: 23626
* Remove trailing whitespaceMisha Brukman2005-04-211-6/+6
| | | | llvm-svn: 21427
* This fixes PR531, a crash when running the CBE on a bytecode file.Chris Lattner2005-03-061-4/+14
| | | | | | | | | | | | | | | | | | The problem is that Function::renameLocalSymbols is iterating through the symbol table planes, occasionally calling setName to rename a value (which used to do a symbol table remove/insert pair). The problem is that if there is only a single value in a particular type plane that the remove will nuke the symbol table plane, and the insert will create and insert a new one. This hoses Function::renameLocalSymbols because it has an iterator to the old plane, under the (very reasonable) assumption that simply renaming a value won't cause the type plane to disappear. This patch fixes the bug by making the rename operation a single atomic operation, which has a side effect of making the whole thing faster too. :) llvm-svn: 20469
* remove all of the various setName implementations, consolidating them intoChris Lattner2005-03-051-3/+28
| | | | | | Value::setName, which is no longer virtual. llvm-svn: 20464
* new methodChris Lattner2005-02-231-0/+13
| | | | llvm-svn: 20288
* Initialize new field.Chris Lattner2005-02-051-1/+2
| | | | llvm-svn: 20044
* Updates for new use list changes.Chris Lattner2005-02-011-6/+23
| | | | llvm-svn: 19961
* Add a space between the type and name of value when printing error messageMisha Brukman2004-10-151-1/+1
| | | | llvm-svn: 17022
* 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
* Use name.empty() instead of testing against equality with the emptyAlkis Evlogimenos2004-07-251-1/+1
| | | | | | string. llvm-svn: 15191
* Disallow creation of named values of type void.Alkis Evlogimenos2004-07-251-0/+2
| | | | llvm-svn: 15190
* bug 122:Reid Spencer2004-07-181-2/+7
| | | | | | - Correct isa<Constant> for GlobalValue subclass llvm-svn: 14933
* Fix regressions in these testcases:Chris Lattner2004-07-071-1/+2
| | | | | | | | | Regression.Assembler.2002-01-24-BadSymbolTableAssert Regression.Assembler.2002-01-24-ValueRefineAbsType Found through the nightly tester :) llvm-svn: 14671
* Find bugs sooner rather than later. In this case, don't allow the creationChris Lattner2004-07-061-0/+3
| | | | | | of instructions that don't have a first-class or void type. llvm-svn: 14646
* - #include <iostream> since its not in Value.h any more.Reid Spencer2004-07-041-0/+1
| | | | llvm-svn: 14617
* User ctor is now inlineChris Lattner2004-06-271-4/+0
| | | | llvm-svn: 14431
* Instancevar was renamedChris Lattner2004-06-261-3/+2
| | | | llvm-svn: 14428
* Finegrainify namespacificationChris Lattner2003-11-211-4/+1
| | | | llvm-svn: 10131
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* If we're not checking, don't check!Chris Lattner2003-11-051-1/+1
| | | | llvm-svn: 9732
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Completely rewrite support for the Value::use_* list. Now, all operations onChris Lattner2003-10-161-37/+11
| | | | | | | | | | | | | | | | | | | this list (except use_size()) are constant time. Before the killUse method (used whenever something stopped using a value) was linear time, and thus very very slow for large programs. This speeds GCCAS up _substantially_ on large programs: almost 2x for 176.gcc: 176.gcc: 77.07s -> 37.38s 177.mesa: 7.59s -> 5.57s 252.eon: 21.02s -> 19.52s (*) 253.perlbmk: 11.40s -> 13.05s 254.gap: 7.25s -> 7.42s 252.eon would speed up a whole lot more, but optimization time is being dominated by the inlining pass, which needs to be fixed. llvm-svn: 9160
* Users can never be nullChris Lattner2003-10-061-1/+1
| | | | llvm-svn: 8895
* There is no reason for Value to be an AbstractTypeUser. This just makes thingsChris Lattner2003-10-021-14/+2
| | | | | | | significantly more complete. Instead, just make DerivedType's AbstractTypeUser's, and make Value contain a PATypeHolder. llvm-svn: 8828
* Fix bug: Linker/2003-08-28-TypeResolvesGlobal3.llChris Lattner2003-08-291-1/+1
| | | | | | Use new replaceAllUsesWith stuff in a way that works even though types have not yet been propagated llvm-svn: 8210
* Refactor code to make it useful outside of Constants.cppChris Lattner2003-08-291-0/+20
| | | | llvm-svn: 8205
* Make assertion more descriptiveChris Lattner2003-06-241-1/+1
| | | | llvm-svn: 6889
* This speeds up processing LLVM a _lot_, 17% in the case of loading and ↵Chris Lattner2003-02-131-1/+2
| | | | | | destroying "vortex" llvm-svn: 5553
* - Make Value::replaceAllUsesWith work with constants correctly. This fixesChris Lattner2002-10-091-16/+18
| | | | | | bug FuncResolve/2002-08-19-ResolveGlobalVars.ll and gzip looks better. llvm-svn: 4103
* - Remove Value::use_removeChris Lattner2002-10-091-7/+0
| | | | llvm-svn: 4090
* Fix NASTY N^2 behavior that was causing the gzip benchmark to take forever toChris Lattner2002-10-081-6/+12
| | | | | | | assemble. Now we scan the use-list from the back when removing users instead of from the front. llvm-svn: 4086
* Enable "garbage detection" of LLVM objects. Now users should be obnoxiousChris Lattner2002-09-081-0/+4
| | | | | | warnings. If they accidentally leak LLVM Value's. llvm-svn: 3620
* *** empty log message ***Chris Lattner2002-07-241-13/+7
| | | | llvm-svn: 3065
* *** empty log message ***Chris Lattner2002-06-301-1/+1
| | | | llvm-svn: 2813
* changes for 64bit gccAnand Shukla2002-06-251-1/+1
| | | | llvm-svn: 2801
* The contents of the SymTabValue class have been incorporated into theChris Lattner2002-04-281-41/+1
| | | | | | Module and Function classes directly. llvm-svn: 2356
* Fix pure virtual function called exception!Chris Lattner2002-04-121-2/+1
| | | | llvm-svn: 2229
* Move include/llvm/ValueHolderImpl.h to lib/VMCore/ValueHolderImpl.hChris Lattner2002-04-081-1/+0
| | | | llvm-svn: 2156
OpenPOWER on IntegriCloud