summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Support/CallSite.h
Commit message (Collapse)AuthorAgeFilesLines
* [Modules] Move CallSite into the IR library where it belogs. It isChandler Carruth2014-03-041-347/+0
| | | | | | | abstracting between a CallInst and an InvokeInst, both of which are IR concepts. llvm-svn: 202816
* Implement inalloca codegen for x86 with the new inalloca designReid Kleckner2014-01-311-2/+3
| | | | | | | | | | | | | | | | Calls with inalloca are lowered by skipping all stores for arguments passed in memory and the initial stack adjustment to allocate argument memory. Now the frontend is responsible for the memory layout, and the backend doesn't have to do any work. As a result these changes are pretty minimal. Reviewers: echristo Differential Revision: http://llvm-reviews.chandlerc.com/D2637 llvm-svn: 200596
* Begin adding docs and IR-level support for the inalloca attributeReid Kleckner2013-12-191-0/+16
| | | | | | | | | | | | | | | | | | | The inalloca attribute is designed to support passing C++ objects by value in the Microsoft C++ ABI. It behaves the same as byval, except that it always implies that the argument is in memory and that the bytes are never copied. This attribute allows the caller to take the address of an outgoing argument's memory and execute arbitrary code to store into it. This patch adds basic IR support, docs, and verification. It does not attempt to implement any lowering or fix any possibly broken transforms. When this patch lands, a complete description of this feature should appear at http://llvm.org/docs/InAlloca.html . Differential Revision: http://llvm-reviews.chandlerc.com/D2173 llvm-svn: 197645
* Extend 'readonly' and 'readnone' to work on function arguments as well asNick Lewycky2013-07-061-0/+9
| | | | | | | functions. Make the function attributes pass add it to known library functions and when it can deduce it. llvm-svn: 185735
* Added support for the Builtin attribute.Michael Gottesman2013-06-271-0/+6
| | | | | | | | The Builtin attribute is an attribute that can be placed on function call site that signal that even though a function is declared as being a builtin, rdar://problem/13727199 llvm-svn: 185049
* Use only explicit bool conversion operatorsDavid Blaikie2013-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | BitVector/SmallBitVector::reference::operator bool remain implicit since they model more exactly a bool, rather than something else that can be boolean tested. The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. One behavior change (YAMLParser) was made, though no test case is included as I'm not sure how to reach that code path. Essentially any comparison of llvm::yaml::document_iterators would be invalid if neither iterator was at the end. This helped uncover a couple of bugs in Clang - test cases provided for those in a separate commit along with similar changes to `operator bool` instances in Clang. llvm-svn: 181868
* Remove unneeded #includes.Jakub Staszak2013-03-181-1/+0
| | | | llvm-svn: 177351
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-4/+4
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of ↵Bill Wendling2012-12-221-2/+2
| | | | | | attribute instead of the value of the attribute. llvm-svn: 170972
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-4/+4
| | | | | | single attribute in the future. llvm-svn: 170502
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-2/+2
| | | | | | in the near future. llvm-svn: 169651
* Sort the #include lines for the include/... tree with the script.Chandler Carruth2012-12-031-1/+1
| | | | | | | | | | AKA: Recompile *ALL* the source code! This one went much better. No manual edits here. I spot-checked for silliness and grep-checked for really broken edits and everything seemed good. It all still compiles. Yell if you see something that looks goofy. llvm-svn: 169133
* Use the attribute builder to add attributes to call/invoke instruction. No ↵Bill Wendling2012-10-091-8/+8
| | | | | | functionality change intended. llvm-svn: 165562
* Use the attribute enums to query if a function has an attribute.Bill Wendling2012-10-091-23/+2
| | | | llvm-svn: 165551
* Use the attribute enums to query if a parameter has an attribute.Bill Wendling2012-10-091-31/+5
| | | | llvm-svn: 165550
* Remove more uses of the attribute enums by supplying appropriate query ↵Bill Wendling2012-10-091-0/+21
| | | | | | | | methods for them. No functionality change intended. llvm-svn: 165466
* Add method to query for NoCapture attribute.Bill Wendling2012-10-041-2/+5
| | | | llvm-svn: 165212
* Add method to query for 'NoAlias' attribute on call/invoke instructions.Bill Wendling2012-10-041-0/+3
| | | | llvm-svn: 165208
* Add methods which query for the specific attribute instead of using theBill Wendling2012-10-031-0/+20
| | | | | | enums. This allows for better encapsulation of the Attributes class. llvm-svn: 165132
* Clean up.Chad Rosier2012-09-051-3/+3
| | | | llvm-svn: 163233
* add CallSite/CallInst/InvokeInst::hasFnAttr()Nuno Lopes2012-06-251-0/+5
| | | | llvm-svn: 159144
* Refactor code to use new attribute getters on CallSite for NoCapture and ByVal.Nick Lewycky2011-11-201-0/+10
| | | | | | | | Suggested in code review by Eli. That code in InstCombine looks kinda suspicious. llvm-svn: 145013
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-1/+1
| | | | llvm-svn: 135375
* Implement PR8644: forwarding a memcpy value to a byval,Chris Lattner2010-11-211-5/+0
| | | | | | | | | | | | allowing the memcpy to be eliminated. Unfortunately, the requirements on byval's without explicit alignment are really weak and impossible to predict in the mid-level optimizer, so this doesn't kick in much with current frontends. The fix is to change clang to set alignment on all byval arguments. llvm-svn: 119916
* remove CallSite::get; it is still present (as protected) in the baseclass, ↵Gabor Greif2010-09-181-12/+2
| | | | | | use one of the constructors intead llvm-svn: 114275
* remove the private hack from CallInst, it was not supposed to hit the branch ↵Gabor Greif2010-08-051-7/+4
| | | | | | | | | anyway as a positive consequence the CallSite::getCallee() methods now can be rewritten to be a bit more efficient llvm-svn: 110380
* Thread const correctness through a bunch of AliasAnalysis interfaces andDan Gohman2010-08-031-10/+11
| | | | | | | | | | | | eliminate several const_casts. Make CallSite implicitly convertible to ImmutableCallSite. Rename the getModRefBehavior for intrinsic IDs to getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite, which happens to be implicitly convertible to bool. llvm-svn: 110155
* remove a layer of cruftGabor Greif2010-07-291-9/+3
| | | | llvm-svn: 109821
* we are supposed to only create proper CallSites from an instruction (esp. ↵Gabor Greif2010-07-281-2/+2
| | | | | | CallInst and InvokeInst) llvm-svn: 109576
* reintroduce original (asserting) semantics of CallSite(Instruction *II)Gabor Greif2010-07-271-0/+2
| | | | | | | add instead a CallSite(Value* V) constructor that is consistent with ImmutableCallSize and use that one in client code llvm-svn: 109553
* remove bogus assert, use static_cast for additional checkingGabor Greif2010-07-271-5/+4
| | | | | | left two new asserts commented out, because they would fire in clang, have to hunt those down first llvm-svn: 109544
* eliminate CallInst::ArgOffsetGabor Greif2010-07-161-10/+6
| | | | llvm-svn: 108522
* conditionalize on CallInst::ArgOffsetGabor Greif2010-07-071-2/+2
| | | | llvm-svn: 107766
* Fix typo 'getter' where 'setter' was intended.Nick Lewycky2010-07-061-2/+2
| | | | llvm-svn: 107635
* reformulate CallSiteBase::getCallee to adapt to CallInst::ArgOffset, and ↵Gabor Greif2010-07-011-1/+3
| | | | | | make it work even if CallInst::op_* are private llvm-svn: 107392
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-5/+11
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-11/+5
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-5/+11
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-11/+5
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-5/+11
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-11/+5
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Move a bunch of methods from CallSite to CallSiteBase, so that they canDan Gohman2010-04-141-41/+95
| | | | | | be used in ImmutableCallSite too. llvm-svn: 101292
* Use FunTy instead of hard-coding Function.Dan Gohman2010-04-141-1/+1
| | | | llvm-svn: 101283
* Oops, make these public.Dan Gohman2010-04-141-8/+8
| | | | llvm-svn: 101280
* Move getType() and getCaller() into CallSiteBase so thatDan Gohman2010-04-141-8/+8
| | | | | | ImmutableCallSite can use them too. llvm-svn: 101279
* Don't use reserved identifiers.Dan Gohman2010-04-091-11/+11
| | | | llvm-svn: 100838
* Introduce ImmutableCallSite, useful for contexts where no mutationGabor Greif2010-04-011-112/+160
| | | | | | | | | 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
* Reapply r99451 with a fix to move the NoInline check to the cost functionsEric Christopher2010-03-251-0/+4
| | | | | | instead of InlineFunction. llvm-svn: 99483
* Temporarily revert this, it's causing an issue with an internal project.Eric Christopher2010-03-241-4/+0
| | | | llvm-svn: 99451
OpenPOWER on IntegriCloud