summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Constants.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Make ConstantAggregateZero::get return a ConstantAggregateZero*,Dan Gohman2008-12-081-1/+1
| | | | | | as suggested in PR3182. llvm-svn: 60691
* Fix unused variable warnings.Devang Patel2008-11-031-0/+12
| | | | llvm-svn: 58653
* Fix type-o in ExprMapKeyType::operator ==(). The "&&" was missing.Bill Wendling2008-10-261-1/+1
| | | | | | Patch by Frits van Bommel! llvm-svn: 58175
* Add a "loses information" return value to APFloat::convertDale Johannesen2008-10-091-10/+16
| | | | | | | and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. llvm-svn: 57329
* Fix ConstantExpr::getInsertElement.Gordon Henriksen2008-08-301-2/+1
| | | | | | | Breakage was exposed in the Ocaml bindings tests after Chris uncommented an assertion in r55084. llvm-svn: 55566
* the bug was apparently fixed long ago, reenable the assertionChris Lattner2008-08-231-2/+1
| | | | llvm-svn: 55224
* Accept NOT of a constant vector of int.Dale Johannesen2008-08-211-2/+4
| | | | llvm-svn: 55140
* Add a new ConstantExpr::getWithOperands that takes any array of operands Chris Lattner2008-08-201-4/+4
| | | | | | instead of requiring an std::vector. llvm-svn: 55084
* Fix several const-correctness issues, resolving some -Wcast-qual warnings.Dan Gohman2008-08-051-1/+2
| | | | llvm-svn: 54349
* Remove unnecessary implicit argumentNate Begeman2008-07-251-6/+8
| | | | llvm-svn: 54031
* Fix minor issues with VICmp/VFCmp constant expressionsNate Begeman2008-07-251-13/+16
| | | | llvm-svn: 54030
* InsertValue and ExtractValue constant expressions are alwaysDan Gohman2008-07-211-40/+6
| | | | | | | folded. Remove code that handled the case where they aren't folded, and remove bitcode reader/writer support for them. llvm-svn: 53887
* Fix a bunch of bugs handling vector compare constant expressions, fixingChris Lattner2008-07-141-34/+54
| | | | | | PR2317. llvm-svn: 53544
* Document and fix Constant::getVectorElements to return an empty vectorChris Lattner2008-07-141-12/+23
| | | | | | | | | when presented with a constant expr. If ConstantExpr::getV[IF]Cmp to work when ConstantFoldCompareInstruction returns an undef or constant expr. llvm-svn: 53541
* Use find instead of lower_bound.Dan Gohman2008-07-111-5/+4
| | | | llvm-svn: 53474
* SImplify ConstantVector::get a bit and make it turn a vectorChris Lattner2008-07-101-8/+18
| | | | | | of all undefs into a single undef value. llvm-svn: 53384
* add a helper method for code that wants to handle vectorChris Lattner2008-07-101-0/+25
| | | | | | constants by element without caring how they are formed. llvm-svn: 53381
* Add newline at the end of Constants.cpp.Matthijs Kooijman2008-07-031-1/+1
| | | | llvm-svn: 53092
* - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an ↵Evan Cheng2008-06-301-41/+1
| | | | | | | | empty string for ConstantAggregateZero case which surprises selectiondag. - Correctly handle memcpy from constant string which is zero-initialized. llvm-svn: 52891
* Revert (52748 and friends):Anton Korobeynikov2008-06-291-1/+41
| | | | | | | | | | | | Move GetConstantStringInfo to lib/Analysis. Remove string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. This unbreaks llvm-gcc bootstrap. llvm-svn: 52884
* Move GetConstantStringInfo to lib/Analysis. RemoveEric Christopher2008-06-261-41/+1
| | | | | | | | | string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. llvm-svn: 52748
* Use push_back rather than operator[], which is incorrect in this cases. ↵Owen Anderson2008-06-251-1/+1
| | | | | | | | Unfortunately, this slow the testcase down a little bit, but only marginally. llvm-svn: 52700
* In ConstantArray::getAsString(), we know the size of the resultant string in ↵Owen Anderson2008-06-241-1/+2
| | | | | | | | advance so we can pre-allocate it and just fill in the entries. This improves the time for the AsmPrinter on InstructionCombining.cpp from 0.4248s to 0.3370s. llvm-svn: 52690
* More changes from Chris' review: simplify getIndices and avoidDan Gohman2008-06-231-8/+6
| | | | | | copying its return value. llvm-svn: 52627
* Constant folding for insertvalue and extractvalue.Dan Gohman2008-06-031-1/+4
| | | | llvm-svn: 51889
* Fix some bugs with the handling of indices in insertvalue/extractvalue.Dan Gohman2008-05-311-3/+3
| | | | llvm-svn: 51820
* IR, bitcode reader, bitcode writer, and asmparser changes toDan Gohman2008-05-311-119/+97
| | | | | | | | | | | insertvalue and extractvalue to use constant indices instead of Value* indices. And begin updating LangRef.html. There's definately more to come here, but I'm checking this basic support in now to make it available to people who are interested. llvm-svn: 51806
* eliminate calls to deprecated Use::init() interfaceGabor Greif2008-05-261-25/+25
| | | | llvm-svn: 51570
* Add more IR support for the new extractvalue and insertvalueDan Gohman2008-05-231-12/+11
| | | | | | instructions. llvm-svn: 51461
* IR support for extractvalue and insertvalue instructions. Also, beginDan Gohman2008-05-151-6/+219
| | | | | | moving toward making structs and arrays first-class types. llvm-svn: 51157
* Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif2008-05-151-4/+7
| | | | | | makefile targets to find these better. llvm-svn: 51143
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-0/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Fix build breakageNate Begeman2008-05-121-1/+1
| | | | llvm-svn: 50986
* Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRefNate Begeman2008-05-121-6/+88
| | | | | | for details. CodeGen support coming in a follow up patch llvm-svn: 50985
* merge of use-diet branch to trunkGabor Greif2008-05-101-56/+126
| | | | llvm-svn: 50943
* add a simplified accessor for creating an fp constant of a Chris Lattner2008-04-091-13/+25
| | | | | | particular value but variable type. llvm-svn: 49416
* add a version of ConstantFP::get that doesn't take a redundant Type* value,Chris Lattner2008-04-091-21/+22
| | | | | | start migrating code over to use it. llvm-svn: 49413
* fix a warningGabor Greif2008-04-061-1/+1
| | | | llvm-svn: 49282
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-3/+44
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Fix comment typo.Duncan Sands2008-03-301-1/+1
| | | | llvm-svn: 48967
* Fix a typo in a comment.Dan Gohman2008-02-071-1/+1
| | | | llvm-svn: 46836
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-1/+1
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Implement address space attribute for LLVM pointer types. Address spaces are Christopher Lamb2007-12-111-1/+2
| | | | | | | | | | | | | | | | | regions of memory that have a target specific relationship, as described in the Embedded C Technical Report. This also implements the 2007-12-11-AddressSpaces test, which demonstrates how address space attributes can be used in LLVM IR. In addition, this patch changes the bitcode signature for stores (in a backwards compatible manner), such that the pointer type, rather than the pointee type, is encoded. This permits type information in the pointer (e.g. address space) to be preserved for stores. LangRef updates are forthcoming. llvm-svn: 44858
* Reverting dtor devirtualization patch.Gordon Henriksen2007-12-101-59/+114
| | | | | | | _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
* Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!Gordon Henriksen2007-12-091-114/+59
| | | | llvm-svn: 44747
* Add support for vectors to int <-> float casts.Nate Begeman2007-11-171-7/+19
| | | | llvm-svn: 44204
* Fix InstCombine/2007-10-31-StringCrash.ll by removing an obviousChris Lattner2007-11-011-12/+8
| | | | | | (in hindsight) infinite recursion. Simplify the code. llvm-svn: 43597
* this doesn't need dynamic_cast.Chris Lattner2007-10-181-1/+1
| | | | llvm-svn: 43133
* Define a helper function ConstantVector::getSplatValue for testing forDan Gohman2007-10-171-0/+11
| | | | | | and working with broadcasted constants. llvm-svn: 43076
OpenPOWER on IntegriCloud