summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Function.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add functions to enable adding a single attribute to a function andEric Christopher2008-05-161-0/+6
| | | | | | its associated call site. llvm-svn: 51204
* Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif2008-05-151-1/+2
| | | | | | makefile targets to find these better. llvm-svn: 51143
* Make StripPointerCast a common function (should we mak it method of Value ↵Anton Korobeynikov2008-05-061-24/+0
| | | | | | instead?) llvm-svn: 50775
* Expose parameter attributes via C bindings.Gordon Henriksen2008-04-281-0/+11
| | | | | | Patch by Anders Johnsen! llvm-svn: 50360
* Convenience method for setting the nounwindDuncan Sands2008-04-081-0/+9
| | | | | | attribute for a function. llvm-svn: 49373
* Make sure that intrinsics automagically get theDuncan Sands2008-04-071-3/+5
| | | | | | | right parameter attributes no matter how they are obtained. llvm-svn: 49335
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-1/+1
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* move a bunch of trivial methods to be inline.Chris Lattner2008-03-131-36/+0
| | | | llvm-svn: 48326
* Reimplement the parameter attributes support, phase #1. hilights:Chris Lattner2008-03-121-31/+6
| | | | | | | | | | | | | | | | | | | | | | | 1. There is now a "PAListPtr" class, which is a smart pointer around the underlying uniqued parameter attribute list object, and manages its refcount. It is now impossible to mess up the refcount. 2. PAListPtr is now the main interface to the underlying object, and the underlying object is now completely opaque. 3. Implementation details like SmallVector and FoldingSet are now no longer part of the interface. 4. You can create a PAListPtr with an arbitrary sequence of ParamAttrsWithIndex's, no need to make a SmallVector of a specific size (you can just use an array or scalar or vector if you wish). 5. All the client code that had to check for a null pointer before dereferencing the pointer is simplified to just access the PAListPtr directly. 6. The interfaces for adding attrs to a list and removing them is a bit simpler. Phase #2 will rename some stuff (e.g. PAListPtr) and do other less invasive changes. llvm-svn: 48289
* s/isReturnStruct()/hasStructRetAttr()/gDevang Patel2008-03-031-4/+4
| | | | llvm-svn: 47857
* If a function uses multive values in ret instruction then itDevang Patel2008-03-031-1/+2
| | | | | | is returning a struct value. llvm-svn: 47848
* Split ParameterAttributes.h, putting the complicatedDale Johannesen2008-02-221-1/+1
| | | | | | | stuff into ParamAttrsList.h. Per feedback from ParamAttrs changes. llvm-svn: 47504
* Pass alignment on ByVal parameters, from FE, allDale Johannesen2008-02-221-0/+5
| | | | | | the way through. It is now used for codegen. llvm-svn: 47484
* Use isa<> instead of getTypeID() to check StructType.Devang Patel2008-02-211-1/+1
| | | | llvm-svn: 47460
* What if functions can return aggregate values ?Devang Patel2008-02-201-1/+2
| | | | | | One small step towards multiple return value support. llvm-svn: 47406
* Expand ParameterAttributes to 32 bits (in preparationDale Johannesen2008-02-191-3/+3
| | | | | | | for adding alignment info, not there yet). Clean up interfaces to reference ParameterAttributes consistently. llvm-svn: 47342
* I got the predicate backwards in my last patch. The comment is correct, the ↵Owen Anderson2008-02-181-1/+1
| | | | | | code was not. llvm-svn: 47264
* Duncan pointed out that we can fast fail here, because the sret parameter ofOwen Anderson2008-02-181-1/+2
| | | | | | a function must be the first parameter. llvm-svn: 47254
* Add a predicate to Argument to check for the StructRet attribute.Owen Anderson2008-02-171-0/+7
| | | | llvm-svn: 47248
* Add hasByValAttr() and hasNoAliasAttr() methods to the Argument class.Chris Lattner2008-01-241-0/+31
| | | | llvm-svn: 46314
* Remove the function attr cache for intrinsics. This does not maintain the Chris Lattner2008-01-031-7/+1
| | | | | | | refcount on these correctly, and can end up referring to deleted attributes. This fixes PR1881. llvm-svn: 45525
* Split param attr implementation out from Function.cpp into itsChris Lattner2008-01-021-213/+34
| | | | | | | own file. Don't #include ParameterAttributes.h into any major public header files: just move methods out of line as appropriate. llvm-svn: 45517
* Fix a build issue on cygwinChris Lattner2008-01-021-6/+3
| | | | llvm-svn: 45506
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* When inlining through an 'nounwind' call, mark inlinedDuncan Sands2007-12-191-0/+26
| | | | | | | | | calls 'nounwind'. It is important for correct C++ exception handling that nounwind markings do not get lost, so this transformation is actually needed for correctness. llvm-svn: 45218
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-1/+2
| | | | | | 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
* Delete the CollectorNamePool if it should become empty.Gordon Henriksen2007-12-101-0/+4
| | | | llvm-svn: 44775
* Adding a collector name attribute to Function in the IR. These Gordon Henriksen2007-12-101-0/+39
| | | | | | | | | | | | | | | | | | | | methods are new to Function: bool hasCollector() const; const std::string &getCollector() const; void setCollector(const std::string &); void clearCollector(); The assembly representation is as such: define void @f() gc "shadow-stack" { ... The implementation uses an on-the-side table to map Functions to collector names, such that there is no overhead. A StringPool is further used to unique collector names, which are extremely likely to be unique per process. llvm-svn: 44769
* Reverting dtor devirtualization patch.Gordon Henriksen2007-12-101-7/+6
| | | | | | | _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-6/+7
| | | | llvm-svn: 44747
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-4/+29
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* Small optimization of parameter attribute lookup.Duncan Sands2007-11-301-1/+1
| | | | llvm-svn: 44458
* Add a convenience method for modifying parameterDuncan Sands2007-11-301-1/+59
| | | | | | | | attributes. While there, I noticed that not all attribute methods returned a pointer-to-constant, so I fixed that. llvm-svn: 44457
* Add some convenience methods for querying attributes, andDuncan Sands2007-11-281-7/+0
| | | | | | use them. llvm-svn: 44403
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-5/+29
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* Fix PR1816. If a bitcast of a function only exists because of aDuncan Sands2007-11-251-1/+44
| | | | | | | | | trivial difference in function attributes, allow calls to it to be converted to direct calls. Based on a patch by Török Edwin. While there, move the various lists of mutually incompatible parameters etc out of the verifier and into ParameterAttributes.h. llvm-svn: 44315
* Rename the 'const' parameter attribute to 'readnone',Duncan Sands2007-11-221-4/+4
| | | | | | | and the 'pure' parameter attribute to 'readonly'. Names suggested by DannyB. llvm-svn: 44273
* In order for parameter attribute uniquing to makeDuncan Sands2007-11-201-2/+6
| | | | | | | | | | | | any sense it is important that ParamAttr::None gets treated the same as not supplying an attribute at all. Rather than stripping ParamAttr::None out of the list of attributes, assert if ParamAttr::None is seen. Fix up the bitcode reader which liked to insert ParamAttr::None all over the place. Patch based on one by Török Edwin. llvm-svn: 44250
* Add pure/const attributes. Documentation will follow.Anton Korobeynikov2007-11-141-0/+4
| | | | llvm-svn: 44109
* Two ParamAttrsVectors which differ by a permutationDuncan Sands2007-09-111-0/+4
| | | | | | | | | | of their elements do not yield the same ParamAttrsList, though they should. On the other hand, everyone seems to pass such vectors with elements ordered by increasing index, so rather than sorting the elements simply assert that the elements are ordered in this way. llvm-svn: 41845
* When Intrinsic::getName is constructing names for overloaded intrinsics,Dan Gohman2007-08-201-1/+2
| | | | | | | | use the ValueType name instead of the llvm type name, to match what the verifier expects. For integers these are the same, but for floating-point values the intrinsics use f32/f64 instead of float/double. llvm-svn: 41189
* Compute the argument list as lazily as possible. This ensures that clientsChris Lattner2007-08-181-7/+24
| | | | | | | | that don't use it don't have to pay the memory cost for the arguments. This allows us to avoid creating Argument nodes for many prototypes and for clients who lazily deserialize code from a bytecode file. llvm-svn: 41166
* Support for trampolines, except for X86 codegen which isDuncan Sands2007-07-271-0/+2
| | | | | | still under discussion. llvm-svn: 40549
* For PR1553:Reid Spencer2007-07-191-2/+2
| | | | | | | | Change the keywords for the zext and sext parameter attributes to be zeroext and signext so they don't conflict with the keywords for the instructions of the same name. This gets around the ambiguity. llvm-svn: 40069
* Add the byval attributeRafael Espindola2007-07-061-0/+2
| | | | llvm-svn: 37940
* Fix a user-reported error building with GCC 3.4.4 on Cygwin.Chris Lattner2007-06-051-1/+1
| | | | llvm-svn: 37445
* Commit first round work of PR1373. "noalias" is now fully supported inZhou Sheng2007-06-051-0/+2
| | | | | | | VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll updated also. llvm-svn: 37432
* simplify some codeChris Lattner2007-04-251-5/+2
| | | | llvm-svn: 36427
* For PR1136:Reid Spencer2007-04-221-0/+18
| | | | | | | Add reference counting to ParamAttrsList and make use of it in Function, CallInst and InvokeInst classes. llvm-svn: 36346
* For PR1146:Reid Spencer2007-04-221-27/+22
| | | | | | | | Make ParamAttrsList objects unique. You can no longer directly create or destroy them but instead must go through the ParamAttrsList::get() interface. llvm-svn: 36327
OpenPOWER on IntegriCloud