summaryrefslogtreecommitdiff
path: root/include/llvm/Function.h
Commit message (Collapse)AuthorAge
* 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
* back this out for now. Growing Function is not good.Jim Grosbach2010-01-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94097 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that landing pad entries in the EH call site table are in the properJim Grosbach2010-01-21
| | | | | | order for SjLj style exception handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94055 91177308-0d34-0410-b5e6-96231b3b80d8
* add a layer of accessors around the Value::SubClassData member, and use Chris Lattner2009-12-29
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92239 91177308-0d34-0410-b5e6-96231b3b80d8
* mark getIntrinsicID() 'readonly'. This allows various classof methods Chris Lattner2009-11-15
| | | | | | | | | | (like DbgDeclareInst's) to shrink substantially. It sucks that we have to pull Compiler.h into such a public header, but at least Compiler.h doesn't pull anything else in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88863 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
* Remove all the LLVM_COMPACTIFY_SENTINELS-related macro magic as discussed ↵Gabor Greif2009-08-26
| | | | | | with Chris on IRC. Anybody wanting to debug sentinel dereferencing problems must revert this patch and perform the indicated modifications. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80128 91177308-0d34-0410-b5e6-96231b3b80d8
* re-committing yesterday's r79938.Gabor Greif2009-08-25
| | | | | | | | | | | | This time there is no additional include of llvm/Config/config.h at all. Instead I use a hard-coded preprecessor symbol: LLVM_COMPACTIFY_SENTINELS (should this work on the self-hosting buildbot, then cleanups come next) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80035 91177308-0d34-0410-b5e6-96231b3b80d8
* --- Reverse-merging r79938 into '.':Bill Wendling2009-08-25
| | | | | | | | | | | | | | | U include/llvm/BasicBlock.h U include/llvm/ADT/ilist_node.h U include/llvm/ADT/ilist.h U include/llvm/CodeGen/SelectionDAG.h U include/llvm/CodeGen/MachineFunction.h U include/llvm/CodeGen/MachineBasicBlock.h U include/llvm/Function.h Revert r79938. It was causing self-hosting build failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79960 91177308-0d34-0410-b5e6-96231b3b80d8
* Resubmit an earlier patch of mine:Gabor Greif2009-08-24
| | | | | | | | | | | | | | | | | | | | | | reduce the size of relevant "ghostly" sentinels by a pointer. This attempt now makes the compactification dependent on the configure variable LLVM_COMPACT_SENTINELS and should not cause any bootstrap failures for llvm-gcc any more. Please note that this is not yet the final version, and (as settled with Chris) I shall take out the autofoo/cmake portions in the next days. This will also lose the assertability on sentinel dereferencing and operator++, but that seems an acceptable price to pay for the simplified build logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79938 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some of the constants+context related code out into a separate ↵Owen Anderson2009-08-04
| | | | | | | | | header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsageDan Gohman2009-07-31
| | | | | | | | | shouldn't do AU.setPreservesCFG(), because even though CodeGen passes don't modify the LLVM IR CFG, they may modify the MachineFunction CFG, and passes like MachineLoop are registered with isCFGOnly set to true. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77691 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and manyDaniel Dunbar2009-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | failures when building assorted projects with clang. --- Reverse-merging r77654 into '.': U include/llvm/CodeGen/Passes.h U include/llvm/CodeGen/MachineFunctionPass.h U include/llvm/CodeGen/MachineFunction.h U include/llvm/CodeGen/LazyLiveness.h U include/llvm/CodeGen/SelectionDAGISel.h D include/llvm/CodeGen/MachineFunctionAnalysis.h U include/llvm/Function.h U lib/Target/CellSPU/SPUISelDAGToDAG.cpp U lib/Target/PowerPC/PPCISelDAGToDAG.cpp U lib/CodeGen/LLVMTargetMachine.cpp U lib/CodeGen/MachineVerifier.cpp U lib/CodeGen/MachineFunction.cpp U lib/CodeGen/PrologEpilogInserter.cpp U lib/CodeGen/MachineLoopInfo.cpp U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp D lib/CodeGen/MachineFunctionAnalysis.cpp D lib/CodeGen/MachineFunctionPass.cpp U lib/CodeGen/LiveVariables.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77661 91177308-0d34-0410-b5e6-96231b3b80d8
* Manage MachineFunctions with an analysis Pass instead of the AnnotableDan Gohman2009-07-31
| | | | | | | | mechanism. To support this, make MachineFunctionPass a little more complete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77654 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial update to VMCore to use Twines for string arguments.Daniel Dunbar2009-07-25
| | | | | | | | - The only meat here is in Value.{h,cpp} the rest is essential 'const std::string &' -> 'const Twine &'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77048 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the Pass+Context magic.Owen Anderson2009-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74878 91177308-0d34-0410-b5e6-96231b3b80d8
* More LLVMContext-ification.Owen Anderson2009-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74807 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an accessor to Function so that Passes can easily get access to the context.Owen Anderson2009-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74714 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement and use new method Function::hasAddressTaken().Jay Foad2009-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73164 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r67844. This fixes the llvm-gcc-4.2 build on Darwin.Dan Gohman2009-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67856 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r66415, which was reverted in r66426 forDuncan Sands2009-03-27
| | | | | | | | | | causing a bootstrap failure. Bootstraps here on x86-32-linux and x86-64-linux. Requested by the author Gabor Greif who says that a bug that might have been causing the failure has since been fixed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67844 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r66415. It's causing failures during bootstrap builds:Bill Wendling2009-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__muldi3': /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:567: internal compiler error: Bus error Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__lshrdi3': /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:421: internal compiler error: Bus error Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. make[5]: *** [libgcc/./_lshrdi3.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[5]: *** [libgcc/./_muldi3.o] Error 1 make[5]: *** [libgcc/./_negdi2.o] Error 1 --- Reverse-merging (from foreign repository) r66415 into '.': U include/llvm/BasicBlock.h U include/llvm/ADT/ilist_node.h U include/llvm/CodeGen/SelectionDAG.h U include/llvm/CodeGen/MachineFunction.h U include/llvm/CodeGen/MachineBasicBlock.h U include/llvm/Function.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66426 91177308-0d34-0410-b5e6-96231b3b80d8
* in builds without asserts we do not need to allocate the Next pointer in ↵Gabor Greif2009-03-09
| | | | | | "ghostly" sentinels git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66415 91177308-0d34-0410-b5e6-96231b3b80d8
* further simplifications arising from peruse of the more declarative interfaceGabor Greif2009-03-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66333 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the burden of dealing with list offsetsGabor Greif2009-03-07
| | | | | | | | | from SymbolTableListTraits' clients, and intead request a nice declarative interface. Cleans up an IMHO ugly wart. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66331 91177308-0d34-0410-b5e6-96231b3b80d8
* ooops, forgot to include the pointless-write eliminator in my previous checkinGabor Greif2009-03-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66081 91177308-0d34-0410-b5e6-96231b3b80d8
* Give sentinel traits the right to determine the policy where the sentinel is ↵Gabor Greif2009-03-04
| | | | | | | | kept. This should result in less indirect memory accesses, less dead writes and tighter code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66061 91177308-0d34-0410-b5e6-96231b3b80d8
* Declare Sentinel fragments as mutable to get ridGabor Greif2009-03-02
| | | | | | | | | of some pointless casting. This fragment logically does not belong to ilist anyway, but to "ghostly" NodeType. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65843 91177308-0d34-0410-b5e6-96231b3b80d8
* Another sentinel optimization. This one should alwaysGabor Greif2009-03-01
| | | | | | be a win, since almost every interesting function has at least one Argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65778 91177308-0d34-0410-b5e6-96231b3b80d8
* Reuse a technique (pioneered for BasicBlocks) of superposing ilist withGabor Greif2009-03-01
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65776 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a commentGabor Greif2009-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65768 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63812 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-04
| | | | | | | | and llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63786 91177308-0d34-0410-b5e6-96231b3b80d8
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-04
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63765 91177308-0d34-0410-b5e6-96231b3b80d8
* Add utility functions for marking parameters as noalias or nocapture.Nick Lewycky2009-01-04
| | | | | | | | Clean up some of the existing code by making it use hasFnAttr/addFnAttr and round it off by creating removeFnAttr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61627 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix disagreement about where the attributes areEric Christopher2008-10-07
| | | | | | | | ~0 != ~0U. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57268 91177308-0d34-0410-b5e6-96231b3b80d8
* comment cleanupsChris Lattner2008-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57058 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix grammer.Devang Patel2008-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56795 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement function notes as function attributes. Devang Patel2008-09-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56716 91177308-0d34-0410-b5e6-96231b3b80d8
* Now Attributes are divided in three groupsDevang Patel2008-09-26
| | | | | | | | | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56704 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
* Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.Devang Patel2008-09-23
| | | | | | | Do not check isDeclaration() in hasNote(). It is clients' responsibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56524 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs.Devang Patel2008-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56515 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
* Use parameter attribute store (soon to be renamed) forDevang Patel2008-09-23
| | | | | | | | Function Notes also. Function notes are stored at index ~0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56511 91177308-0d34-0410-b5e6-96231b3b80d8
* Add hasNote() to check note associated with a function.Devang Patel2008-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56477 91177308-0d34-0410-b5e6-96231b3b80d8
* s/FP_AlwaysInline/FN_NOTE_AlwaysInline/gDevang Patel2008-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55676 91177308-0d34-0410-b5e6-96231b3b80d8
* Getter and setter for function notes.Devang Patel2008-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55638 91177308-0d34-0410-b5e6-96231b3b80d8