summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Constants.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert the addition of hasNoPointerOverflow to GEPOperator.Dan Gohman2009-07-201-5/+2
| | | | | | | | | | | | 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
* Make GetElementPtr ConstantExprs default to having no pointer overflow.Dan Gohman2009-07-181-1/+5
| | | | llvm-svn: 76280
* Fix compile warning.Daniel Dunbar2009-07-171-0/+2
| | | | llvm-svn: 76210
* Privatize the MDNode uniquing table.Owen Anderson2009-07-161-28/+3
| | | | llvm-svn: 76126
* Privatize the MDString uniquing table.Owen Anderson2009-07-161-26/+1
| | | | llvm-svn: 76113
* Privatize the ConstantFP table. I'm on a roll!Owen Anderson2009-07-161-70/+0
| | | | llvm-svn: 76097
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-61/+0
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* Move a few more convenience factory functions from Constant to LLVMContext.Owen Anderson2009-07-151-5/+0
| | | | llvm-svn: 75840
* Move the ConstantStruct factory methods over to LLVMContext.Owen Anderson2009-07-151-8/+0
| | | | llvm-svn: 75830
* Revert 75798 to fix llvm build.Rafael Espindola2009-07-151-0/+14
| | | | llvm-svn: 75805
* The static function TypeToFloatSemantics is nowDuncan Sands2009-07-151-14/+0
| | | | | | unused - remove it. llvm-svn: 75798
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-51/+2
| | | | llvm-svn: 75703
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-5/+5
| | | | | | | | | 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
* Move more functionality over to LLVMContext.Owen Anderson2009-07-131-54/+0
| | | | llvm-svn: 75559
* Move a bit more functionality to LLVMContext, which apparently wasn't being ↵Owen Anderson2009-07-131-18/+0
| | | | | | used anyways. llvm-svn: 75546
* As Chris pointed out, this doesn't actually need an LLVMContext to operate.Owen Anderson2009-07-131-4/+4
| | | | llvm-svn: 75508
* Move more functionality over to LLVMContext.Owen Anderson2009-07-131-31/+0
| | | | llvm-svn: 75497
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-104/+28
| | | | | | | | | 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
* Remove extra \n from LLVM_UNREACHABLE calls.Torok Edwin2009-07-121-1/+1
| | | | llvm-svn: 75416
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-4/+4
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-2/+2
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-120/+7
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-12/+12
| | | | llvm-svn: 74931
* Make this const.Owen Anderson2009-06-261-1/+1
| | | | llvm-svn: 74317
* Add constructor to create MDString using std::stringDevang Patel2009-06-241-0/+11
| | | | llvm-svn: 74133
* Revert r73790, and replace it with a significantly less ugly solution. ↵Owen Anderson2009-06-201-316/+226
| | | | | | | | | Rather than trying to make the global reader-writer lock work, create separate recursive mutexes for each value map. The recursive-ness fixes the double-acquiring issue, which having one per ValueMap lets us continue to maintain some concurrency. llvm-svn: 73801
* Fix a serious bug that would cause deadlock during abstract type refinement. ↵Owen Anderson2009-06-191-221/+302
| | | | | | | | | | The constant creation gets involved, and we end up trying to recursively acquire a writer lock. The fix for this is slightly horrible, and involves passing a boolean "locked" parameter around in Constants.cpp, but it's better than having locked and unlocked versions of most of the code. llvm-svn: 73790
* Forgot to remove some explicit locking when it became implicit in the ValueMap.Owen Anderson2009-06-191-3/+5
| | | | llvm-svn: 73778
* Simplify a lot of code by using a R/W mutex that becomes a no-op when ↵Owen Anderson2009-06-181-168/+88
| | | | | | multithreading is disabled. llvm-svn: 73714
* Move Threading.[h|cpp] from Support to System.Owen Anderson2009-06-181-1/+1
| | | | llvm-svn: 73707
* Factor out some common code.Owen Anderson2009-06-171-44/+30
| | | | llvm-svn: 73631
* Add an RAII ScopedWriter, which allows one to acquire a writer lock for the ↵Owen Anderson2009-06-171-41/+58
| | | | | | | | duration of a scope. Simplify a lot of uses of writer locks in Constants.cpp by using it. llvm-svn: 73630
* Simplify the locking on the Constants tables, and make it more efficient, by ↵Owen Anderson2009-06-171-106/+136
| | | | | | | | pushing it into the ValueMap from the callers. Document those ValueMap functions that are _not_ locked, so that callers are aware that they need to do the locking themselves. llvm-svn: 73628
* Type safety for Constants.cpp! Some of this is temporary, as I'm planning ↵Owen Anderson2009-06-171-46/+208
| | | | | | to push some of the R/W locking into FoldingSet. llvm-svn: 73624
* Use Type::isIntOrIntVector and Type::isFPOrFPVector.Dan Gohman2009-06-151-11/+7
| | | | llvm-svn: 73433
* Support vector casts in more places, fixing a variety of assertionDan Gohman2009-06-151-28/+86
| | | | | | | | | | | | | | | failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. llvm-svn: 73431
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-8/+41
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky2009-05-301-2/+2
| | | | llvm-svn: 72610
* Add a getAlignOf helper for getting the ABI alignment of aDuncan Sands2009-05-211-0/+11
| | | | | | | | | type as a target independent constant expression. I confess that I didn't check that this method works as intended (though I did test the equivalent hand-written IR a little). But what could possibly go wrong! llvm-svn: 72213
* Make MDNode use CallbackVH. Also change MDNode to store Value* instead ofNick Lewycky2009-05-101-22/+20
| | | | | | | Constant* in preperation of a future change to support holding non-Constants in an MDNode. llvm-svn: 71407
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-041-0/+80
| | | | | | | | Constant, MDString and MDNode which can only be used by globals with a name that starts with "llvm." or as arguments to a function with the same naming restriction. llvm-svn: 68420
* Fix infinite loopingAnton Korobeynikov2009-03-301-0/+2
| | | | llvm-svn: 68034
* Properly propagate Kind.Anton Korobeynikov2009-03-301-1/+1
| | | | llvm-svn: 68033
* Extend the relocation tracker handler, so we can filter on different 'kinds' ↵Anton Korobeynikov2009-03-291-5/+20
| | | | | | of relocations required. llvm-svn: 68004
* add a fastpath to ConstantExpr::getBitCast to handle the case when an obviouslyChris Lattner2009-03-211-0/+5
| | | | | | | | | unneeded bitcast is requested. This is common for frontends who just unconditionally cast even if the target is often the right type already. THis prevents going into getFoldedCast which switches on the opcode and does a bunch of other stuff before doing the same opzn. llvm-svn: 67435
* Apply a patch by Micah Villmow to fix AsmParser to accept vectorDan Gohman2009-03-141-1/+1
| | | | | | | shift constant expressions, and add support for folding vector shift constant expressions. This fixes PR3802. llvm-svn: 67010
* fix typoChris Lattner2009-03-081-1/+1
| | | | llvm-svn: 66367
* Fix a bunch of Doxygen syntax issues. Escape special characters,Dan Gohman2009-03-031-9/+9
| | | | | | and put @file directives on their own comment line. llvm-svn: 65920
* Add suppport for ConstantExprs of shufflevectors whose result type is not ↵Nate Begeman2009-02-121-2/+9
| | | | | | | | equal to the type of the vectors being shuffled. llvm-svn: 64401
* select constant exprs should have the same constraints as select instructions,Chris Lattner2008-12-291-3/+1
| | | | | | notably, they should support vectors and aggregates. llvm-svn: 61462
OpenPOWER on IntegriCloud