summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Value.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add llvm::Metadata to manage metadata used in a context. Devang Patel2009-09-161-0/+5
| | | | | | This interface will be used to attach metadata with an instruction. llvm-svn: 82060
* Teach getUnderlyingObject and skipPointerCasts about GlobalAliases.Dan Gohman2009-08-271-0/+8
| | | | llvm-svn: 80265
* Add a fast path for setName("") on an unnamed value.Daniel Dunbar2009-08-191-0/+4
| | | | llvm-svn: 79492
* Make a SmallVector size more reasonable.Daniel Dunbar2009-08-191-1/+1
| | | | llvm-svn: 79403
* Privatize the ValueHandle global map. Because this is used so heavily ↵Owen Anderson2009-08-181-21/+15
| | | | | | | | throughout the code base, locking all accesses to it is not practical performance-wise. llvm-svn: 79355
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-3/+6
| | | | llvm-svn: 78948
* Fix a typo in an assertion string.Dan Gohman2009-08-111-1/+1
| | | | llvm-svn: 78671
* revert r78048, it isn't worth using assertingvh here.Chris Lattner2009-08-041-8/+8
| | | | llvm-svn: 78119
* switch ValueMap to using AssertingVH. This is an old patch I had layingChris Lattner2009-08-041-8/+8
| | | | | | around in a tree I forgot about. llvm-svn: 78048
* Keep track of named mdnodes in a Module using an ilist.Devang Patel2009-07-291-0/+4
| | | | llvm-svn: 77476
* Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel2009-07-281-1/+1
| | | | | | New name is Metadata.h. llvm-svn: 77370
* Make sure getName().data() is always null terminated.Daniel Dunbar2009-07-261-1/+4
| | | | llvm-svn: 77149
* Rewrite getName{Start,End,Len} in terms of getName(), instead of vice-versa.Daniel Dunbar2009-07-261-13/+3
| | | | llvm-svn: 77105
* Simplify.Daniel Dunbar2009-07-261-12/+5
| | | | llvm-svn: 77102
* Remove Value::setName(const char*, unsigned).Daniel Dunbar2009-07-261-7/+7
| | | | llvm-svn: 77100
* Remove Value::setName(const char*).Daniel Dunbar2009-07-261-7/+1
| | | | | | | | - Split into a separate patch because there is a slight functionality change, it is no longer valid to call setName(0), which was equivalent to setName(""). I'm hoping no one depends on this... llvm-svn: 77099
* Remove Value::{isName, getNameRef}.Daniel Dunbar2009-07-251-12/+0
| | | | | | Also, change MDString to use a StringRef. llvm-svn: 77098
* Initial update to VMCore to use Twines for string arguments.Daniel Dunbar2009-07-251-2/+5
| | | | | | | - The only meat here is in Value.{h,cpp} the rest is essential 'const std::string &' -> 'const Twine &'. llvm-svn: 77048
* Move more to raw_ostream.Daniel Dunbar2009-07-241-4/+4
| | | | llvm-svn: 76964
* Add llvm::Value::getNameRef, for help in API migration.Daniel Dunbar2009-07-231-1/+6
| | | | llvm-svn: 76893
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-221-1/+4
| | | | | | | Derive MDString directly from MetadataBase. Introduce new bitcode block to hold metadata. llvm-svn: 76759
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-0/+2
| | | | llvm-svn: 76702
* Revert the addition of hasNoPointerOverflow to GEPOperator.Dan Gohman2009-07-201-2/+0
| | | | | | | | | | | | Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. llvm-svn: 76437
* Fix this accidentally inverted condition.Dan Gohman2009-07-181-1/+1
| | | | llvm-svn: 76278
* Convert more code to use Operator instead of explicitly handling bothDan Gohman2009-07-171-20/+9
| | | | | | | ConstantExpr and Instruction. This involves duplicating some code between GetElementPtrInst and GEPOperator, but it's not a lot. llvm-svn: 76265
* Make BasicAliasAnalysis and Value::getUnderlyingObject useDan Gohman2009-07-171-8/+6
| | | | | | | | GEPOperator's hasNoPointer0verflow(), and make a few places in instcombine that create GEPs that may overflow clear the NoOverflow value. Among other things, this partially addresses PR2831. llvm-svn: 76252
* Add a SubclassOptionalData field to Value. See the doxygen comment forDan Gohman2009-07-171-1/+2
| | | | | | details. llvm-svn: 76189
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-1/+1
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Fix the AssertingVH unittests.Jeffrey Yasskin2009-07-081-2/+1
| | | | llvm-svn: 75060
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-2/+3
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Start converting to new error handling API.Torok Edwin2009-07-081-2/+3
| | | | | | | cerr+abort -> llvm_report_error assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included) llvm-svn: 75018
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-3/+3
| | | | llvm-svn: 74931
* Simplify by using no-op-when-not-multithreaded locks.Owen Anderson2009-06-181-13/+8
| | | | llvm-svn: 73719
* Move Threading.[h|cpp] from Support to System.Owen Anderson2009-06-181-1/+1
| | | | llvm-svn: 73707
* Protect the ValueHandle table.Owen Anderson2009-06-171-2/+19
| | | | llvm-svn: 73620
* Use true instead of 1 for a boolean value. And fix a copy+pastoDan Gohman2009-05-041-3/+3
| | | | | | in a comment. llvm-svn: 70882
* Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from meDan Gohman2009-05-021-2/+10
| | | | | | | to make the copy constructor and destructor protected, and corresponding adjustments to the unittests. llvm-svn: 70644
* Limit the number of times we're willing to chase pointers. Removes an O(n^2)Nick Lewycky2009-04-151-1/+3
| | | | | | problem from instcombine. llvm-svn: 69151
* Add two new classes: WeakVH and AssertingVH. These are both "ValueHandles", Chris Lattner2009-03-311-2/+165
| | | | | | | | | | | | | | | | | | which are effectively smart pointers to Value*'s. They are both very light weight and simple, and react to values being destroyed or being RAUW'd. WeakVN does a best effort to follow a value around, including through RAUW operations and will get nulled out of the value is destroyed. This is useful for the eventual "metadata that references a value" work, because it is a reference to a value that does not show up on its use_* list. AssertingVH is a pointer that compiles down to a dumb raw pointer when assertions are disabled. When enabled, it emits an assertion if the pointed-to value is destroyed while it is still being referenced. This is very useful for Maps and other things, and should have caught the recent bugs in CallGraph and Reassociate, for example. llvm-svn: 68149
* Rearrange operands of the BranchInst, to be able toGabor Greif2009-03-121-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | access each with a fixed negative index from op_end(). This has two important implications: - getUser() will work faster, because there are less iterations for the waymarking algorithm to perform. This is important when running various analyses that want to determine callers of basic blocks. - getSuccessor() now runs faster, because the indirection via OperandList is not necessary: Uses corresponding to the successors are at fixed offset to "this". The price we pay is the slightly more complicated logic in the operator User::delete, as it has to pick up the information whether it has to free the memory of an original unconditional BranchInst or a BranchInst that was originally conditional, but has been shortened to unconditional. I was not able to come up with a nicer solution to this problem. (And rest assured, I tried *a lot*). Similar reorderings will follow for InvokeInst and CallInst. After that some optimizations to pred_iterator and CallSite will fall out naturally. llvm-svn: 66815
* Make stripPointerCasts and getUnderlyingObjectDuncan Sands2008-12-291-26/+39
| | | | | | non-recursive. llvm-svn: 61479
* These messages should always be emitted when NDEBUG is unset, not whenChris Lattner2008-12-131-2/+2
| | | | | | NDEBUG is unset and -debug is passed. llvm-svn: 60986
* Comment typeo fix, thanks Duncan!Chris Lattner2008-12-021-1/+1
| | | | llvm-svn: 60429
* add a little helper function that does PHI translation.Chris Lattner2008-12-021-0/+13
| | | | llvm-svn: 60405
* 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
OpenPOWER on IntegriCloud