llvm-6502/include/llvm
Andrew Lenharth 701f5ac73c Random sampling (aka Arnold and Ryder) profiling. This is still preliminary, but it works on spec on x86 and alpha. The idea is to allow profiling passes to remember what profiling they inserted, then a random sampling framework is inserted which consists of duplicated basic blocks (without profiling), such that at each backedge in the program and entry into every function, the framework chooses whether to use the instrumented code or the instrumentation free code. The goal of such a framework is to make it reasonably cheap to do random sampling of very expensive profiling products (such as load-value profiling).
The code is organized into 3 parts (2 passes)
1) a linked set of profiling passes, which implement an analysis group (linked, like alias analysis are).  These insert profiling into the program, and remember what they inserted, so that at a later time they can be queried about any instruction.

2) a pass that handles inserting the random sampling framework.  This also has options to control how random samples are choosen.  Currently implemented are Global counters, register allocated global counters, and read cycle counter (see? there was a reason for it).

The profiling passes are almost identical to the existing ones (block, function, and null profiling is supported right now), and they are valid passes without the sampling framework (hence the existing passes can be unified with the new ones, not done yet).

Some things are a bit ugly still, but that should be fixed up soon enough.

Other todo? making the counter values not "magic 2^16 -1" values, but dynamically choosable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24493 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-28 00:58:09 +00:00
..
ADT Fix comment. 2005-10-26 15:02:21 +00:00
Analysis Fix the dominates method to return true if the two nodes are the same. Add 2005-11-18 07:27:33 +00:00
Assembly Give the asmparser the ability to parse strings, patch contributed by 2005-05-20 03:25:29 +00:00
Bytecode Remove vim settings from source code; people should use llvm/utils/vim/vimrc 2005-05-05 22:33:09 +00:00
CodeGen Check in code to scalarize arbitrarily wide packed types for some simple 2005-11-22 18:16:00 +00:00
Config add malloc_zone_statistics, remove mstats 2005-11-14 07:24:17 +00:00
Debugger Remove trailing whitespace 2005-04-21 20:39:54 +00:00
ExecutionEngine For PR540: 2005-07-12 15:51:55 +00:00
Support Allow per-character control over what target assemblers allow in symbol 2005-11-10 21:39:12 +00:00
System For PR616: 2005-08-24 10:07:20 +00:00
Target Teach the type lowering code about turning packed types into vector types. 2005-11-17 21:44:42 +00:00
Transforms Random sampling (aka Arnold and Ryder) profiling. This is still preliminary, but it works on spec on x86 and alpha. The idea is to allow profiling passes to remember what profiling they inserted, then a random sampling framework is inserted which consists of duplicated basic blocks (without profiling), such that at each backedge in the program and entry into every function, the framework chooses whether to use the instrumented code or the instrumentation free code. The goal of such a framework is to make it reasonably cheap to do random sampling of very expensive profiling products (such as load-value profiling). 2005-11-28 00:58:09 +00:00
AbstractTypeUser.h remove a dead method 2005-11-12 08:42:30 +00:00
Argument.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
BasicBlock.h Remove some dead argument names which irritates GCC at certain warning levels. 2005-10-25 17:59:28 +00:00
CallGraphSCCPass.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
CallingConv.h New file 2005-05-06 19:59:08 +00:00
Constant.h Remove some dead argument names which irritates GCC at certain warning levels. 2005-10-25 17:59:28 +00:00
Constants.h Change the signature of replaceUsesOfWithOnConstant to take a Use* and not 2005-10-04 18:12:13 +00:00
DerivedTypes.h Shrink derived types by 8 bytes each by not having to have 2 vtables pointers 2005-11-13 03:26:12 +00:00
Function.h Add a missing Module::setTargetTriple method. 2005-10-25 17:58:00 +00:00
GlobalValue.h Add support for putting globals in a particular section 2005-11-12 00:09:49 +00:00
GlobalVariable.h Change the signature of replaceUsesOfWithOnConstant to take a Use* and not 2005-10-04 18:12:13 +00:00
InstrTypes.h allow these to take a generic Value* 2005-04-24 07:28:04 +00:00
Instruction.def improve comments 2005-06-24 18:17:33 +00:00
Instruction.h Remove some dead argument names which irritates GCC at certain warning levels. 2005-10-25 17:59:28 +00:00
Instructions.h add an accessor 2005-11-05 21:58:30 +00:00
IntrinsicInst.h Convert tabs to spaces 2005-04-22 03:18:56 +00:00
Intrinsics.h Add support for a cycle counter intrinsic. As basically all processors have 2005-11-11 16:45:18 +00:00
Linker.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
Module.h Add a missing Module::setTargetTriple method. 2005-10-25 17:58:00 +00:00
ModuleProvider.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
Pass.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
PassAnalysisSupport.h Older compilers won't like the inline virtual destructor in the header file 2005-04-25 01:01:35 +00:00
PassManager.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
PassSupport.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
SymbolTable.h Some cleanups for compilation with GCC 4.0.0 to remove warnings: 2005-05-15 16:13:11 +00:00
SymbolTableListTraits.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
Type.h Shrink derived types by 8 bytes each by not having to have 2 vtables pointers 2005-11-13 03:26:12 +00:00
Use.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
User.h Remove trailing whitespace 2005-04-21 20:19:05 +00:00
Value.h remove a comma to compile with pedantic gcc 2005-10-08 01:24:19 +00:00