summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Function.cpp
Commit message (Collapse)AuthorAgeFilesLines
* mark a large static table static. Pointed out by Michael Ilseman!Chris Lattner2011-04-251-1/+1
| | | | llvm-svn: 130160
* Remove the code from Function::dropAllReferences which replacedDan Gohman2010-12-071-13/+4
| | | | | | | | | uses of the function's blocks with undef. This code isn't needed, because BasicBlock's destructor handles such uses. Also, undef isn't correct, since blockaddresses may still be used for comparisons with null. llvm-svn: 121170
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120298
* Introduce ImmutableCallSite, useful for contexts where no mutationGabor Greif2010-04-011-1/+1
| | | | | | | | | is necessary. Inherits from new templated baseclass CallSiteBase<> which is highly customizable. Base CallSite on it too, in a configuration that allows full mutation. Adapt some call sites in analyses to employ ImmutableCallSite. llvm-svn: 100100
* rename use_const_iterator to const_use_iterator for consistency's sakeGabor Greif2010-03-251-1/+1
| | | | llvm-svn: 99564
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-241-4/+8
| | | | | | | | | | | | I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. llvm-svn: 99399
* add assert in argpromotion, which cannot triggerGabor Greif2010-03-231-2/+2
| | | | | | | | if Function::hasAddressTaken works as advertised also included some cosmetic cleanups llvm-svn: 99276
* Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move someDuncan Sands2010-02-161-1/+1
| | | | | | methods to try to have the type predicates be more logically positioned. llvm-svn: 96349
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-5/+5
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-1/+1
| | | | | | dereference the type pointer. llvm-svn: 92726
* add a layer of accessors around the Value::SubClassData member, and use Chris Lattner2009-12-291-2/+3
| | | | | | | | | | | a convention (shadowing the setter with private forwarding function) to prevent subclasses from accidentally using it. This exposed some bogosity in ConstantExprs, which was propaging the opcode of the constant expr into the NUW/NSW/Exact field in the getWithOperands/getWithOperandReplaced methods. llvm-svn: 92239
* Qualify a bunch of explicit template instantiations to satisfy clang++.John McCall2009-12-191-2/+2
| | | | llvm-svn: 91736
* Add utility method for determining whether a function argumentDuncan Sands2009-12-111-0/+7
| | | | | | has the 'nest' attribute. llvm-svn: 91109
* when we tear down a module, we need to be careful to Chris Lattner2009-10-281-1/+14
| | | | | | zap BlockAddress values. llvm-svn: 85366
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-1/+1
| | | | llvm-svn: 78948
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-2/+2
| | | | | | own struct type. llvm-svn: 78610
* Move types back to the 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77516
* Initial update to VMCore to use Twines for string arguments.Daniel Dunbar2009-07-251-2/+2
| | | | | | | - The only meat here is in Value.{h,cpp} the rest is essential 'const std::string &' -> 'const Twine &'. llvm-svn: 77048
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-4/+2
| | | | llvm-svn: 76702
* LLVMContext-ification.Owen Anderson2009-07-071-3/+6
| | | | llvm-svn: 74973
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-4/+4
| | | | llvm-svn: 74931
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-061-1/+1
| | | | llvm-svn: 74878
* More LLVMContext-ification.Owen Anderson2009-07-051-2/+2
| | | | llvm-svn: 74807
* Add an accessor to Function so that Passes can easily get access to the context.Owen Anderson2009-07-021-0/+6
| | | | llvm-svn: 74714
* Simplify.Owen Anderson2009-06-181-15/+7
| | | | llvm-svn: 73723
* Move Threading.[h|cpp] from Support to System.Owen Anderson2009-06-181-1/+1
| | | | llvm-svn: 73707
* Reapply r73647 in a non-broken form.Owen Anderson2009-06-171-15/+25
| | | | llvm-svn: 73662
* Protect the GC table in Function.cppOwen Anderson2009-06-171-19/+25
| | | | llvm-svn: 73647
* Implement and use new method Function::hasAddressTaken().Jay Foad2009-06-101-0/+11
| | | | llvm-svn: 73164
* further simplifications arising from peruse of the more declarative interfaceGabor Greif2009-03-071-7/+0
| | | | llvm-svn: 66333
* Another sentinel optimization. This one should alwaysGabor Greif2009-03-011-7/+0
| | | | | | be a win, since almost every interesting function has at least one Argument. llvm-svn: 65778
* Reuse a technique (pioneered for BasicBlocks) of superposing ilist withGabor Greif2009-03-011-7/+0
| | | | | | | | | | | | its sentinel. This is quite a win when a function really has a basic block. When the function is just a declaration (and stays so) the old way did not allocate a sentinel. So this change is most beneficial when the ratio of function definition to declaration is high. I.e. linkers etc. Incidentally these are the most resource demanding applications, so I expect that the reduced malloc traffic, locality and space savings outweigh the cost of addition of two pointers to Function. llvm-svn: 65776
* Added support to have TableGen provide information if an intrinsic (coreMon P Wang2009-02-241-0/+10
| | | | | | or target) can be overloaded or not. llvm-svn: 65404
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-051-5/+7
| | | | llvm-svn: 63812
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-041-7/+5
| | | | | | and llvm-gcc. llvm-svn: 63786
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-041-5/+7
| | | | | | | | | target directories themselves. This also means that VMCore no longer needs to know about every target's list of intrinsics. Future work will include converting the PowerPC target to this interface as an example implementation. llvm-svn: 63765
* make tblgen emit the entire Intrinsic::getAttributes method, Chris Lattner2009-01-121-10/+1
| | | | | | not a random piece of it. No functionality change. llvm-svn: 62066
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-051-1/+0
| | | | llvm-svn: 61715
* tighten up return type checkChris Lattner2009-01-051-4/+2
| | | | llvm-svn: 61677
* Don't analyze arguments already marked 'nocapture'.Duncan Sands2008-12-311-0/+7
| | | | llvm-svn: 61532
* Now Attributes are divided in three groupsDevang Patel2008-09-261-1/+1
| | | | | | | | | | | | | - return attributes - inreg, zext and sext - parameter attributes - function attributes - nounwind, readonly, readnone, noreturn Return attributes use 0 as the index. Function attributes use ~0U as the index. This patch requires corresponding changes in llvm-gcc and clang. llvm-svn: 56704
* Large mechanical patch.Devang Patel2008-09-251-20/+20
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* s/ParamAttrsWithIndex/FnAttributeWithIndex/gDevang Patel2008-09-241-1/+1
| | | | llvm-svn: 56535
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-5/+5
| | | | llvm-svn: 56513
* Use parameter attribute store (soon to be renamed) forDevang Patel2008-09-231-1/+0
| | | | | | Function Notes also. Function notes are stored at index ~0. llvm-svn: 56511
* Initialize function notes.Devang Patel2008-09-021-0/+2
| | | | llvm-svn: 55645
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-30/+32
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. llvm-svn: 54899
* Added support for overloading intrinsics (atomics) based on pointersMon P Wang2008-07-301-2/+7
| | | | | | | to different address spaces. This alters the naming scheme for those intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32 llvm-svn: 54195
* Add some helpers for manipulating functionDuncan Sands2008-07-081-13/+7
| | | | | | parameter attributes. llvm-svn: 53228
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-1/+1
| | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). llvm-svn: 52044
OpenPOWER on IntegriCloud