search for: instcount

Displaying 20 results from an estimated 32 matches for "instcount".

2009 Feb 17
2
[LLVMdev] InstCount
Hello, I'm trying to print the instruction count of a bytecode file using the 2.4 release of LLVM. I found llvm-2.4/lib/Analysis/Instcount.cpp but I'm not sure what to do with it. I also looked at llvm-bcanalyzer. The documentation says this command is supposed to print the instruction count in the summary, but it doesn't seem to be doing so. Does anyone know what I should be doing? --Patrick
2009 Feb 17
0
[LLVMdev] InstCount
Patrick Simmons wrote: > Hello, > > I'm trying to print the instruction count of a bytecode file using the > 2.4 release of LLVM. I found llvm-2.4/lib/Analysis/Instcount.cpp but > I'm not sure what to do with it. I also looked at llvm-bcanalyzer. The > documentation says this command is supposed to print the instruction > count in the summary, but it doesn't seem to be doing so. > > Does anyone know what I should be doing? > Lookin...
2005 Apr 07
1
[LLVMdev] Questions !!
Thanks for the reply, Actually I m aiming towards determining two values: - number of basic blocks in a program For this I have used Statistic facility provided in llvm and increasing the counter for each basic block for each function.but for some reason , I m getting different number everytime !! Is Statistic is the right way to do it ? - Average basic block size in a program ( in bytes)
2005 Jul 25
1
[LLVMdev] LLVM beginner question
...loop which increments a variable until a particular iteration. main() { int a,b,c; a=0; b=0; c=1; a=b+c; for (a=1;a<=10;a++) c++; printf("\nhello\n"); } I want to do the following. Generate instruction mix across the basic blocks or loop bodies. I have tried the following. analyze -instcount -stats hello.bc it has generated Printing analysis 'Counts the various types of Instructions' for function 'main': ===-------------------------------------------------------------------------=== ... Statistics Collected ... ===----------------------------...
2005 Jul 25
0
[LLVMdev] Re: Help regarding llvm tool
...to analyse a simple hello.c program with llvm. i used > llvm-gcc to generate the .bc file and output file. I am trying to use > it to generate instruction counts, stats, basic block instruction > count and identification of natural loops in the program. > > I used command analyze -instcount hello.bc. however, the outp[ut it > generates is "printing analyzis 'counts the various types of > instructions' for function 'main' :" > > It does not give me any further details. could you help me as to how > to configure the tool to obtain the stats. I t...
2005 Apr 08
2
[LLVMdev] Questions !!
...unction.but for some reason , I m getting different > number everytime !! Is Statistic is the right way to do it ? That should work fine. Remember that statistics accumulate across the whole execution of the tool though, they are not reset per function. Also, you might want to check out the -instcount pass. It prints BB counts among other things. For a small .ll file, it prints: $ llvm-as < t.ll | analyze -instcount -stats Printing analysis 'Counts the various types of Instructions' for function 'test': ===-------------------------------------------------------------------...
2016 Mar 15
7
RFC: DenseMap grow() slowness
...we don’t have to rehash. 32 bits more per entry (or whatever), and it might not help that much, since we still have to do the whole reinsertion routine. 3. Pre-calculate an estimate as to the map size we need. For example, in EarlyCSE, this is possibly gross overestimate of size needed: unsigned InstCount = 0; unsigned LoadCount = 0; unsigned CallCount = 0; for (inst_iterator FI = inst_begin(F), FE = inst_end(F); FI != FE; ++FI) { if (FI->mayReadOrWriteMemory()) ++LoadCount; else if (isa<CallInst>(*FI)) ++CallCount; else ++InstCount; } AvailableValues...
2014 Nov 07
2
[LLVMdev] Fwd: LLVM Help
> Hi All, > Attached above my InstCount.cpp after modification. I did simple > modification which is the following (The statements between the > ************** ) : > bool InstCount::runOnFunction(Function &F) { > unsigned StartMemInsts = > NumGetElementPtrInst + NumLoadInst + NumStoreInst + NumCallInst + > NumInvok...
2016 Mar 15
2
RFC: DenseMap grow() slowness
...bits more per entry (or whatever), and it might not help that much, since we still have to do the whole reinsertion routine. >> 3. Pre-calculate an estimate as to the map size we need. For example, in EarlyCSE, this is possibly gross overestimate of size needed: >> >> unsigned InstCount = 0; >> unsigned LoadCount = 0; >> unsigned CallCount = 0; >> for (inst_iterator FI = inst_begin(F), FE = inst_end(F); FI != FE; ++FI) { >> if (FI->mayReadOrWriteMemory()) >> ++LoadCount; >> else if (isa<CallInst>(*FI)) >>...
2016 Mar 15
2
RFC: DenseMap grow() slowness
...o rehash. 32 bits more per entry (or whatever), and it might not help that much, since we still have to do the whole reinsertion routine. > 3. Pre-calculate an estimate as to the map size we need. For example, in EarlyCSE, this is possibly gross overestimate of size needed: > > unsigned InstCount = 0; > unsigned LoadCount = 0; > unsigned CallCount = 0; > for (inst_iterator FI = inst_begin(F), FE = inst_end(F); FI != FE; ++FI) { > if (FI->mayReadOrWriteMemory()) > ++LoadCount; > else if (isa<CallInst>(*FI)) > ++CallCount; > else...
2017 Jun 08
2
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
...age > NotEligibleToImport: true > Live: false > cold: > - GUID: 11668175513417606517 > Kind: Function > Linkage: ExternalLinkage > NotEligibleToImport: true > Live: false > InstCount: 5 > Calls: > - Name: puts > GUID: 8979701042202144121 > Hotness: Unknown > fib: > - GUID: 8667248078361406812 > Kind: Function > Linkage: ExternalLinkage &g...
2017 Jun 07
2
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
...ge > NotEligibleToImport: false > Live: false > AliaseeGUID: 1881667236089500162 > afun: > - Kind: Function > Linkage: ExternalLinkage > NotEligibleToImport: false > Live: false > InstCount: 2 > testtest: > - Kind: Function > Linkage: ExternalLinkage > NotEligibleToImport: false > Live: false > InstCount: 2 > Calls: > - Function: 14471680721094503013 > TypeIdMap: &gt...
2002 Dec 08
1
[LLVMdev] Helpful (?) hints
Here's some stuff that may be useful for your papers n stuph: * Analyze has a pass "-instcount" written by Dinakar, which will tell you things like the number of functions, basic blocks, and instructions are in a program. It will even classify the instructions into different opcodes, if you want to report things like #loads+#stores or something. * Most of the olden benchmarks ca...
2009 Mar 30
2
[LLVMdev] Instruction Count in llvm-bcanalyzer
Dear All, Does llvm-bcanalyzer still print the number of instructions in a bitcode file, or has that functionality been removed? -- John T.
2009 Mar 30
0
[LLVMdev] Instruction Count in llvm-bcanalyzer
On Mar 30, 2009, at 12:08 PM, John Criswell wrote: > Dear All, > > Does llvm-bcanalyzer still print the number of instructions in a > bitcode > file, or has that functionality been removed? Try the "opt -instcount -stats" option, -Chris
2011 Nov 02
0
[LLVMdev] debugger doesn't go inside the bitecode file
Hello, I am using gdb to debug the -instcount pass. The steps I followed were: 1. gdb opt 2. break llvm::PassManager::run 3. run -stats -analyze -instcount filename.bc I got the bc file using -emit-llvm option as following: llvm-gcc -O3 -emit-llvm filename.c -c -o filename.bc But when I started debugging, the debugger never really went into m...
2012 Jun 27
1
[LLVMdev] Instcombine increases the number of instructions?
I perform the Instcombine pass over Rijndael benchmark from Mibench ( suite of benchmarks). For compile, I use "-Instcount" for counting the instructions. Comparing the bench without transformation with the bench transformed by instcombine, I perceived a 10% of increase in the number of instructions. This is possible? On Wed, Jun 27, 2012 at 4:57 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Rafael...
2006 Jun 01
1
[LLVMdev] Extracting ILP from bytecode/*.ll
By using analyze -stats -instcounts <bytecode> I can get the total number of instructions but I want to extract instruction level parallelism . That is I want to know number of add instruction that can be executed in parallel, similarly for multiply ... This would give me an idea what is upper limit of adders ( and multipliers...
2017 Jul 17
3
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
...>>> - GUID: 11668175513417606517 >>>>> Kind: Function >>>>> Linkage: ExternalLinkage >>>>> NotEligibleToImport: true >>>>> Live: false >>>>> InstCount: 5 >>>>> Calls: >>>>> - Name: puts >>>>> GUID: 8979701042202144121 >>>>> Hotness: Unknown >>>>> fib: >>>>> - GUID: 8667248...
2010 Apr 14
1
[LLVMdev] Most efficient way to count # of intrcutions in a module ?
I need to count the total number of instructions in a given module. The only way I found is using the obvious double iteration as seen below. Is there any more efficient way to achieve this ? I don't like the fact that simple calculation like that has performance of o(F*B) (# of functions * # of blocks per function) unsigned int calcSize(Module* mod) { unsigned int size = 0; for