llvm-6502/include/llvm
Chris Lattner be577659d3 Step #1 to giving Callgraph some sane invariants. The problems with callgraph
stem from the fact that we have two types of passes that need to update it:

1. callgraphscc and module passes that are explicitly aware of it
2. Functionpasses (and loop passes etc) that are interlaced with CGSCC passes
   by the CGSCC Passmgr.

In the case of #1, we can reasonably expect the passes to update the call
graph just like any analysis.  However, functionpasses are not and generally
should not be CG aware.  This has caused us no end of problems, so this takes
a new approach.  Logically, the CGSCC Pass manager can rescan every function 
after it runs a function pass over it to see if the functionpass made any 
updates to the IR that affect the callgraph.  This allows it to catch new calls
introduced by the functionpass.

In practice, doing this would be slow.  This implementation keeps track of
whether or not the current scc is dirtied by a function pass, and, if so, 
delays updating the callgraph until it is actually needed again.  This was
we avoid extraneous rescans, but we still have good invariants when the
callgraph is needed.

Step #2 of the "give Callgraph some sane invariants" is to change CallGraphNode
to use a CallBackVH for the callsite entry of the CallGraphNode.  This way
we can immediately remove entries from the callgraph when a FunctionPass is
active instead of having dangling pointers.  The current pass tries to tolerate
these dangling pointers, but it is just an evil hack.

This is related to PR3601/4835/4029.  This also reverts r80541, a hack working
around the sad lack of invariants.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80566 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 07:23:46 +00:00
..
ADT make DenseMap::clear() early exit if there is nothing to do. 2009-08-30 05:55:04 +00:00
Analysis Step #1 to giving Callgraph some sane invariants. The problems with callgraph 2009-08-31 07:23:46 +00:00
Assembly eliminate the std::ostream form of WriteAsOperand and update clients. 2009-08-23 05:17:37 +00:00
Bitcode Clean up the minor mess I caused with removing iterator.h. I shall take care of 80-col violations and the FIXME later. (Thanks goodness that I live in another continent, so the monkeypox did not strike me :-) 2009-08-27 06:41:46 +00:00
CodeGen Nuke moribund "std::string" version of EOL(..., Encoding). 2009-08-30 00:28:57 +00:00
CompilerDriver eliminate all 80-col violations that I have introduced in my recent checkins (and some others more) 2009-08-27 23:44:33 +00:00
Config re-apply r80197, now that iterator.h is not mentioned any more 2009-08-27 17:07:35 +00:00
Debugger Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
ExecutionEngine This void is implicit in C++. 2009-08-12 22:10:57 +00:00
MC Tweak comment. 2009-08-30 21:14:05 +00:00
Support hopefully unbreak the build by making this-> explicit for dependent 2009-08-30 17:44:10 +00:00
System Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
Target - Add target lowering methods to get the preferred format for the FDE and LSDA 2009-08-29 12:20:54 +00:00
Transforms Fix some nasty callgraph dangling pointer problems in 2009-08-31 00:19:58 +00:00
AbstractTypeUser.h Another attempt at fixing PR2975. 2009-04-07 17:23:02 +00:00
Argument.h Initial update to VMCore to use Twines for string arguments. 2009-07-25 04:41:11 +00:00
Attributes.h Add an 'inline hint' attribute to represent source 2009-08-26 01:08:21 +00:00
AutoUpgrade.h Reapply 79977. 2009-08-28 23:24:31 +00:00
BasicBlock.h Remove all the LLVM_COMPACTIFY_SENTINELS-related macro magic as discussed with Chris on IRC. Anybody wanting to debug sentinel dereferencing problems must revert this patch and perform the indicated modifications. 2009-08-26 19:16:32 +00:00
CallGraphSCCPass.h Fix some nasty callgraph dangling pointer problems in 2009-08-31 00:19:58 +00:00
CallingConv.h Address review comments: add 3 ARM calling conventions. 2009-06-16 18:50:49 +00:00
CMakeLists.txt CMake: Have generated Xcode projects also contain the LLVM header files. 2009-04-01 15:40:21 +00:00
Constant.h Make LLVMContext and LLVMContextImpl classes instead of structs. 2009-08-11 17:45:13 +00:00
Constants.h Add helper functions to ConstantInt and ConstantFP to accept strings. 2009-08-16 23:36:33 +00:00
DerivedTypes.h Actually privatize a IntegerTypes, and fix a few bugs exposed by this. 2009-08-13 23:27:32 +00:00
Function.h Remove all the LLVM_COMPACTIFY_SENTINELS-related macro magic as discussed with Chris on IRC. Anybody wanting to debug sentinel dereferencing problems must revert this patch and perform the indicated modifications. 2009-08-26 19:16:32 +00:00
GlobalAlias.h Finish migrating VMCore to StringRef/Twine based APIs. 2009-07-25 06:02:13 +00:00
GlobalValue.h Finish migrating VMCore to StringRef/Twine based APIs. 2009-07-25 06:02:13 +00:00
GlobalVariable.h Make LLVMContext and LLVMContextImpl classes instead of structs. 2009-08-11 17:45:13 +00:00
InlineAsm.h Finish migrating VMCore to StringRef/Twine based APIs. 2009-07-25 06:02:13 +00:00
InstrTypes.h Eliminate the unused Context argument on one of the ICmpInst and FCmpInst 2009-08-25 23:17:54 +00:00
Instruction.def Remove the vicmp and vfcmp instructions. Because we never had a release with 2009-07-08 03:04:38 +00:00
Instruction.h Rename Instruction::isIdenticalTo to Instruction::isIdenticalToWhenDefined, 2009-08-25 22:11:20 +00:00
Instructions.h add getPointerAddressSpace() to GEP instruction, use the method 2009-08-30 20:06:40 +00:00
IntrinsicInst.h Reapply 79977. 2009-08-28 23:24:31 +00:00
Intrinsics.h Make LLVMContext and LLVMContextImpl classes instead of structs. 2009-08-11 17:45:13 +00:00
Intrinsics.td Reapply 79977. 2009-08-28 23:24:31 +00:00
IntrinsicsAlpha.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsARM.td Add new intrinsics for Neon vldN_lane and vstN_lane operations. 2009-08-22 02:28:46 +00:00
IntrinsicsBlackfin.td Remove unneeded intrinsics from Blackfin backend. 2009-08-02 21:49:05 +00:00
IntrinsicsCellSPU.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsPowerPC.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsX86.td Add sse4.2 string/text processing intrinsics. We'll select these later. 2009-08-14 20:27:57 +00:00
IntrinsicsXCore.td Add XCore intrinsics for getid (returns thread id) and bitrev (reverses 2008-11-14 10:12:16 +00:00
LinkAllPasses.h Create a ScalarEvolution-based AliasAnalysis implementation. 2009-08-26 14:53:06 +00:00
LinkAllVMCore.h Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
Linker.h Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
LLVMContext.h Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
Metadata.h Reapply 79977. 2009-08-28 23:24:31 +00:00
Module.h remove the std::ostream version of module and type printing. 2009-08-23 04:52:46 +00:00
ModuleProvider.h
OperandTraits.h Remove some dead functions, patch by Ryan Flynn! 2009-07-14 18:58:35 +00:00
Operator.h Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrap 2009-08-20 17:11:38 +00:00
Pass.h Change Pass::print to take a raw ostream instead of std::ostream, 2009-08-23 06:03:38 +00:00
PassAnalysisSupport.h Simplify assertion message to avoid confusion. 2009-06-02 17:26:29 +00:00
PassManager.h
PassManagers.h Fix a bunch of namespace pollution. 2009-08-07 01:32:21 +00:00
PassSupport.h Remove some unused fields. 2009-08-29 23:34:14 +00:00
SymbolTableListTraits.h simplify the way how traits get hold of the symbol table 2009-03-07 12:33:24 +00:00
Type.h Clean up the minor mess I caused with removing iterator.h. I shall take care of 80-col violations and the FIXME later. (Thanks goodness that I live in another continent, so the monkeypox did not strike me :-) 2009-08-27 06:41:46 +00:00
TypeSymbolTable.h Don't search the entire type table just to delete a type by name. 2009-08-06 06:04:35 +00:00
Use.h eliminate all 80-col violations that I have introduced in my recent checkins (and some others more) 2009-08-27 23:44:33 +00:00
User.h Remove some dead functions, patch by Ryan Flynn! 2009-07-14 18:58:35 +00:00
Value.h Rename Instruction::isIdenticalTo to Instruction::isIdenticalToWhenDefined, 2009-08-25 22:11:20 +00:00
ValueSymbolTable.h revert r78048, it isn't worth using assertingvh here. 2009-08-04 23:07:12 +00:00