Displaying 20 results from an estimated 20000 matches similar to: "count how many basic block executed"
2018 Jan 27
0
count how many basic block executed
On 1/26/18 1:04 AM, Linhai Song via llvm-dev wrote:
>
> Hello everyone,
>
>
> I am writing a pass to instrument program and count how many basic
> block executed. What I have tried is to instrument a local counter
> inside each function, add 1 to the local counter inside each basic
> block, and save the counter value to a global counter. The current
> runtime
2018 Jan 28
1
count how many basic block executed
Hi John,
Thanks a lot for the reply! I try mem2reg opt and also implement the algorithm proposed in "Efficiently Counting Program Events with Support for On-line Queries" to place the local counter smarter. If I build the executable by using -O0, the overhead would be 20% - 30%. But if I build the executable by using -O2, the overhead would be more than 3X. I feel instrumenting counter
2015 Feb 27
2
[LLVMdev] Getting basic block address offset from its parent function
Hi, all
Is there a way of getting the basic block offset from its parent function ?
What I'm trying to do is to get an execution count of each basic blocks, so
I need to know the starting address of each basic blocks. Obviously we
can't get the absolute address before linking the program, but the offset
relative to parent function should be available so I can take it and get
the function
2015 Feb 28
2
[LLVMdev] Getting basic block address offset from its parent function
Hi John
Thanks for your suggestions, they all sound reasonable to me. The way I'm
thinking right now is to write a MachineFuncionPass that iterate through
each MachinBasicBlock, for each MBB, adds up the instructions counts of
previous MBBs, that number multiply by 4 should be the offset of that MBB
from its MachineFunction. In order to correctly count the instructions,
this pass should be
2015 Feb 28
0
[LLVMdev] Getting basic block address offset from its parent function
On 2/27/15 6:30 PM, Ziqiang Patrick Huang wrote:
> Hi, all
>
> Is there a way of getting the basic block offset from its parent
> function ?
At the LLVM IR level, no. At the code generator layer
(MachineFunctionPass layer or the MC layer), probably yes.
>
> What I'm trying to do is to get an execution count of each basic
> blocks, so I need to know the starting
2014 Oct 05
2
[LLVMdev] extending LLVM - basic block reordering
Hi.
I want to change order of code basic blocks in memory. I visited "
http://llvm.org/docs/ExtendingLLVM.html" page and it advised me to ask it
before any effort.
What parts of LLVM help me and how? I am a newbie on LLVM.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2015 Mar 01
1
[LLVMdev] Getting basic block address offset from its parent function
On Sat, Feb 28, 2015 at 7:39 AM, Ziqiang Patrick Huang <
ziqiang.huang1001 at gmail.com> wrote:
> Hi John
>
> Thanks for your suggestions, they all sound reasonable to me. The way I'm
> thinking right now is to write a MachineFuncionPass that iterate through
> each MachinBasicBlock, for each MBB, adds up the instructions counts of
> previous MBBs, that number multiply
2017 Nov 29
2
How to count instructions in a function?
Hello,
I am trying to count IR instructions in a function for static analysis
using llvm pass. In contrast with existing examples, I am trying to include
instruction counts of all the callees of the function.
Counting the instructions of a function is easy using passes, but iterating
through the module's CallGraph is proving to be confusing. I believe I have
to use CallGraphWrapperPass to
2010 Apr 27
1
[LLVMdev] The nearest basic block being dominated by all used values.
Hello,
Presumably I have two value v1 and v2 from two different basic block A
and B. Now I need to insert to a printf to print those two values at
the same time.
This means I need to find a basic block to insert such a calling
isntruction and at the same time, the basic block should be dominated
by v1 and v2. Is there any easy way to find such a basic block?
Cheers,
Zheng
2011 Sep 19
2
[LLVMdev] copy Value object?
Sorry, I'm a bit confused by your reply. I think part of my problem is
I can only think of this in terms of Passes.
For instance, my pass looks for assignments and tries to use the same
pointer operand, before the assignment it finds. Like this:
new ICmpInst(*block, CmpInst::ICMP_NE, shadow,
store->getPointerOperand(), "Shadow check");
So I'm not sure how alloca
2015 Nov 01
2
Google Summer of Code 2016 | LLVM
Hi,
I am a graduate student in computer science.I have taken a programming
languages course this semester and I am having great fun building
interpreters.I am planning to build toy compilers in the winter.I would
love to participate in GSOC 2016 contributing to LLVM.Could anyone let me
know desirable skills should be developed to contribute to LLVM ? Also I
would like to know the open projects
2011 Sep 19
2
[LLVMdev] copy Value object?
Is there a easy way to copy a Value object, so it can be used in
multiple instructions without a dominance issue?
2015 Feb 26
2
[LLVMdev] SAFECode testsuite query
Hello All,
I am looking at exploring what benefits SAFECode has to offer over clang S.A and llvm's instrumentation tools like memory sanitizer and address sanitizer.
I could come up with the following that are not provided in ASAN/MSAN/Clang S.A
-> dangling pointer error and detection
-> crashes in system libraries due to security vulnerabilities.
In the process, I wanted to run the
2014 Apr 29
2
[LLVMdev] how to identify basic blocks added for switch instruction without default?
Hi,
I just notice that front-end will add an extra block for switch
instruction without default. How could I identify basic blocks added due
to this reason?
The added codes looks like:
sw.default.i625: ; preds = %if.end512
tail call void @fancy_abort(i8* getelementptr inbounds ([38 x i8]*
@.str, i64 0, i64 0), i32 3045, i8* getelementptr inbounds
2011 Sep 19
0
[LLVMdev] copy Value object?
On 9/19/11 2:48 PM, ret val wrote:
> Sorry, I'm a bit confused by your reply. I think part of my problem is
> I can only think of this in terms of Passes.
>
> For instance, my pass looks for assignments and tries to use the same
> pointer operand, before the assignment it finds. Like this:
> new ICmpInst(*block, CmpInst::ICMP_NE, shadow,
>
2017 Nov 30
1
How to count instructions in a function?
Thanks so much John! That works :)
Previously I wrote a pass that inherited from CallGraphWrapperPass and used
its getCallGraph() function within runOnModule() which resulted in
segmentation faults for me. Not sure why that happened, perhaps callgraph
wasn't setup by the time runOnModule() was called internally. If you know
why, kindly enlighten me and perhaps document the behavior for the
2016 May 25
4
Runtime interception: design problem
Hi everyone,
I am having troubles but this shouldn't be hard to solve for many people
here. I am beginning a runtime feature for the BoundsChecking pass and I
want to replace the libc malloc&free. I followed the design of
AddressSanitizer (Asan) and tried to use the INTERCEPTOR macro from the
interception.h file of compiler-rt library.
Here is the problem. The file I modify
2011 Sep 19
0
[LLVMdev] copy Value object?
On 9/19/11 12:53 PM, ret val wrote:
> Is there a easy way to copy a Value object, so it can be used in
> multiple instructions without a dominance issue?
A value object can be used multiple times with no problem.
The dominance problem stems from the fact that the program must be in
SSA form. When the program uses a value, it must have been defined
dynamically for all possible executions
2008 May 23
1
[LLVMdev] Eliminate Store-Load pair even the LoadInst is volatile
Hi,
Thanks, John, I just forgot the multi-thread issue.
I'll write my own pass to handle this as for my project, it is just
single-thread case.
Sheng.
Date: Thu, 22 May 2008 09:30:45 -0500
> From: John Criswell <criswell at cs.uiuc.edu>
> Subject: Re: [LLVMdev] Eliminate Store-Load pair even the LoadInst is
> volatile
> To: LLVM Developers Mailing List
2015 May 19
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Thanks John.
Does this solve the problem of analysis availability though? If I still have to run the function analyses manually, I might as well keep rolling with the CallGraphSCCPass. (I probably should have mentioned that this is what I’m using right now.)
Félix
> Le 2015-05-19 à 10:12:32, John Criswell <jtcriswel at gmail.com> a écrit :
>
> On 5/18/15 10:45 PM, Félix Cloutier