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
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
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
Argument.h
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
CMakeLists.txt
Constant.h
Constants.h
DerivedTypes.h
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
GlobalValue.h
GlobalVariable.h
InlineAsm.h
InstrTypes.h Eliminate the unused Context argument on one of the ICmpInst and FCmpInst 2009-08-25 23:17:54 +00:00
Instruction.def
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
Intrinsics.td Reapply 79977. 2009-08-28 23:24:31 +00:00
IntrinsicsAlpha.td
IntrinsicsARM.td
IntrinsicsBlackfin.td
IntrinsicsCellSPU.td
IntrinsicsPowerPC.td
IntrinsicsX86.td
IntrinsicsXCore.td
LinkAllPasses.h Create a ScalarEvolution-based AliasAnalysis implementation. 2009-08-26 14:53:06 +00:00
LinkAllVMCore.h
Linker.h Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
LLVMContext.h
Metadata.h Reapply 79977. 2009-08-28 23:24:31 +00:00
Module.h
ModuleProvider.h
OperandTraits.h
Operator.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassManagers.h
PassSupport.h Remove some unused fields. 2009-08-29 23:34:14 +00:00
SymbolTableListTraits.h
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
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
Value.h Rename Instruction::isIdenticalTo to Instruction::isIdenticalToWhenDefined, 2009-08-25 22:11:20 +00:00
ValueSymbolTable.h