summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Value.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Factorize code: remove variants of "strip offDuncan Sands2008-10-011-8/+21
| | | | | | | | | | | pointer bitcasts and GEP's", and centralize the logic in Value::getUnderlyingObject. The difference with stripPointerCasts is that stripPointerCasts only strips GEPs if all indices are zero, while getUnderlyingObject strips GEPs no matter what the indices are. llvm-svn: 56922
* Make pointer parameter const for isUsedInBasicBlock.Bill Wendling2008-09-251-1/+1
| | | | llvm-svn: 56625
* backing out my last commit, it was not intended to go on the trunkGabor Greif2008-09-191-2/+2
| | | | llvm-svn: 56349
* first shot at removing Use::ValGabor Greif2008-09-191-2/+2
| | | | | | untested, Use::swap() is definitely not done yet llvm-svn: 56348
* Rename instance variables, parameter argument names to eliminate a bunch of ↵Evan Cheng2008-07-241-5/+5
| | | | | | compilation warnings with -Wshadow. llvm-svn: 53970
* fix some warnings when assertions are disabled.Chris Lattner2008-06-211-1/+1
| | | | llvm-svn: 52587
* Do not speculatively execute an instruction by hoisting it to its ↵Evan Cheng2008-06-121-0/+11
| | | | | | predecessor BB if any of its operands are defined but not used in BB. The transformation will prevent the operand from being sunk into the use block. llvm-svn: 52244
* Move the operator new and operator delete out of line. This fixes an issue withNate Begeman2008-05-151-0/+19
| | | | | | | operator new() referring to the static initTags function, which has to be in the same linkage unit as any file including User.h. llvm-svn: 51136
* Turn StripPointerCast() into a methodAnton Korobeynikov2008-05-071-28/+24
| | | | llvm-svn: 50836
* Make StripPointerCast a common function (should we mak it method of Value ↵Anton Korobeynikov2008-05-061-0/+28
| | | | | | instead?) llvm-svn: 50775
* fix a bug in my previous patch, a classic =/== bug.Chris Lattner2008-04-301-1/+1
| | | | llvm-svn: 50483
* add a method for comparing to see if a value has a specified name.Chris Lattner2008-04-301-0/+7
| | | | llvm-svn: 50465
* Print the name, not a pointer.Nick Lewycky2008-03-011-1/+1
| | | | llvm-svn: 47796
* Let invoke return aggregate value.Devang Patel2008-02-211-1/+1
| | | | llvm-svn: 47425
* Let function call return aggregate.Devang Patel2008-02-211-1/+6
| | | | | | Now, we have very first multiple return value testcase! llvm-svn: 47424
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-1/+1
| | | | | | annoying warnings. llvm-svn: 47367
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Reverting dtor devirtualization patch.Gordon Henriksen2007-12-101-200/+8
| | | | | | | _sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed _sabre_: the vtable lives to fight another day llvm-svn: 44760
* fix some warnings.Chris Lattner2007-12-101-15/+12
| | | | llvm-svn: 44756
* Fix a big problem in the recent dtor refactoring work, now it passes ↵Chris Lattner2007-12-101-50/+14
| | | | | | 2007-11-19-InlineAsm.ll llvm-svn: 44755
* Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!Gordon Henriksen2007-12-091-8/+239
| | | | llvm-svn: 44747
* Use empty() member functions when that's what's being tested for insteadDan Gohman2007-10-031-2/+2
| | | | | | of comparing begin() and end(). llvm-svn: 42585
* Make Value::getNameLen not crash on an empty name, fixing PR1712.Chris Lattner2007-09-281-1/+1
| | | | llvm-svn: 42444
* simplify code, improve a comment.Chris Lattner2007-08-211-6/+6
| | | | llvm-svn: 41205
* add Value::getNameStart/getNameLen() accessors.Chris Lattner2007-08-101-0/+15
| | | | llvm-svn: 40989
* Fix a nasty memory leak, caused by my revamp of the value symbol table.Chris Lattner2007-03-201-0/+5
| | | | llvm-svn: 35195
* Unbreak VC++ build.Jeff Cohen2007-03-051-1/+1
| | | | llvm-svn: 34917
* 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
OpenPOWER on IntegriCloud