summaryrefslogtreecommitdiff
path: root/include/llvm/Support/CallSite.h
Commit message (Collapse)AuthorAge
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement PR8644: forwarding a memcpy value to a byval,Chris Lattner2010-11-21
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119916 91177308-0d34-0410-b5e6-96231b3b80d8
* remove CallSite::get; it is still present (as protected) in the baseclass, ↵Gabor Greif2010-09-18
| | | | | | use one of the constructors intead git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114275 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the private hack from CallInst, it was not supposed to hit the branch ↵Gabor Greif2010-08-05
| | | | | | | | | anyway as a positive consequence the CallSite::getCallee() methods now can be rewritten to be a bit more efficient git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110380 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread const correctness through a bunch of AliasAnalysis interfaces andDan Gohman2010-08-03
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110155 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a layer of cruftGabor Greif2010-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109821 91177308-0d34-0410-b5e6-96231b3b80d8
* we are supposed to only create proper CallSites from an instruction (esp. ↵Gabor Greif2010-07-28
| | | | | | CallInst and InvokeInst) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109576 91177308-0d34-0410-b5e6-96231b3b80d8
* reintroduce original (asserting) semantics of CallSite(Instruction *II)Gabor Greif2010-07-27
| | | | | | | add instead a CallSite(Value* V) constructor that is consistent with ImmutableCallSize and use that one in client code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109553 91177308-0d34-0410-b5e6-96231b3b80d8
* remove bogus assert, use static_cast for additional checkingGabor Greif2010-07-27
| | | | | | left two new asserts commented out, because they would fire in clang, have to hunt those down first git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109544 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate CallInst::ArgOffsetGabor Greif2010-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108522 91177308-0d34-0410-b5e6-96231b3b80d8
* conditionalize on CallInst::ArgOffsetGabor Greif2010-07-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107766 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo 'getter' where 'setter' was intended.Nick Lewycky2010-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107635 91177308-0d34-0410-b5e6-96231b3b80d8
* reformulate CallSiteBase::getCallee to adapt to CallInst::ArgOffset, and ↵Gabor Greif2010-07-01
| | | | | | make it work even if CallInst::op_* are private git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107392 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-16
| | | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101434Gabor Greif2010-04-16
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-15
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-15
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a bunch of methods from CallSite to CallSiteBase, so that they canDan Gohman2010-04-14
| | | | | | | be used in ImmutableCallSite too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101292 91177308-0d34-0410-b5e6-96231b3b80d8
* Use FunTy instead of hard-coding Function.Dan Gohman2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101283 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, make these public.Dan Gohman2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101280 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getType() and getCaller() into CallSiteBase so thatDan Gohman2010-04-14
| | | | | | | ImmutableCallSite can use them too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101279 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use reserved identifiers.Dan Gohman2010-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100838 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce ImmutableCallSite, useful for contexts where no mutationGabor Greif2010-04-01
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100100 91177308-0d34-0410-b5e6-96231b3b80d8
* rename use_const_iterator to const_use_iterator for consistency's sakeGabor Greif2010-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99564 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r99451 with a fix to move the NoInline check to the cost functionsEric Christopher2010-03-25
| | | | | | | instead of InlineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99483 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert this, it's causing an issue with an internal project.Eric Christopher2010-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99451 91177308-0d34-0410-b5e6-96231b3b80d8
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-24
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
* add some accessors to callsite/callinst/invokeinst to checkChris Lattner2010-03-23
| | | | | | | | | for the noinline attribute, and make the inliner refuse to inline a call site when the call site is marked noinline even if the callee isn't. This fixes PR6682. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99341 91177308-0d34-0410-b5e6-96231b3b80d8
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-22
| | | | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99170 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r98957, it broke ↵Gabor Greif2010-03-19
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98958 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-19
| | | | | | | | | | | | | This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98957 91177308-0d34-0410-b5e6-96231b3b80d8
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-03
| | | | | | buildbot's stage 2 configure git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80871 91177308-0d34-0410-b5e6-96231b3b80d8
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-03
| | | | | | this time. I'll back out if needed... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80858 91177308-0d34-0410-b5e6-96231b3b80d8
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the default copy ctor and copy-assignment operators.Dan Gohman2009-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77793 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r66920. It was causing failures in the self-hosting buildbot (in releaseBill Wendling2009-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode). Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000004 start + 18446744073709543220 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000006 start + 18446744073709543222 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes --- Reverse-merging (from foreign repository) r66920 into '.': U include/llvm/Support/CallSite.h U include/llvm/Instructions.h U lib/Analysis/IPA/GlobalsModRef.cpp U lib/Analysis/IPA/Andersens.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp U lib/VMCore/Instructions.cpp U lib/VMCore/Verifier.cpp U lib/VMCore/AsmWriter.cpp U lib/Transforms/Utils/LowerInvoke.cpp U lib/Transforms/Scalar/SimplifyCFGPass.cpp U lib/Transforms/IPO/PruneEH.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66953 91177308-0d34-0410-b5e6-96231b3b80d8
* Second installment of "BasicBlock operands to the back"Gabor Greif2009-03-13
| | | | | | | | | | | | | | | | | | | changes. For InvokeInst now all arguments begin at op_begin(). The Callee, Cont and Fail are now faster to get by access relative to op_end(). This patch introduces some temporary uglyness in CallSite. Next I'll bring CallInst up to a similar scheme and then the uglyness will magically vanish. This patch also exposes all the reliance of the libraries on InvokeInst's operand ordering. I am thinking of taking care of that too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66920 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce a useful abstraction to find out if a Use is in the call position ↵Gabor Greif2009-01-22
| | | | | | of an instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62788 91177308-0d34-0410-b5e6-96231b3b80d8
* make comparisons a bist fasterGabor Greif2009-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62428 91177308-0d34-0410-b5e6-96231b3b80d8
* drats! remove tabsGabor Greif2009-01-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62056 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify CallSite helper class to not consult the Instruction'sGabor Greif2009-01-11
| | | | | | | | opcode on each delegation. Instead the information is cached on construction and the cached flag used thereafter. Introduced two predicates: isCall and isInvoke. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62055 91177308-0d34-0410-b5e6-96231b3b80d8
* Large mechanical patch.Devang Patel2008-09-25
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56513 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CallSite::getArgumentNo() to be able to translate an operand number into aMatthijs Kooijman2008-07-08
| | | | | | | argument number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53225 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CallSite::getArgumentOffset() to hide the differences in operands betwenMatthijs Kooijman2008-07-08
| | | | | | | | Call and Invoke in a single method instead of having it hardcoded in multiple places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53224 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some convenience methods for manipulatingDuncan Sands2008-07-08
| | | | | | | call attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53223 91177308-0d34-0410-b5e6-96231b3b80d8
* * Make CallSite::hasArgument const and let it take a const parameter.Matthijs Kooijman2008-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51989 91177308-0d34-0410-b5e6-96231b3b80d8