Displaying 20 results from an estimated 3000 matches similar to: "Retrieving the name of a indirect virtual method call in LLVM pass"
2018 Jun 08
1
Retrieving the name of a indirect virtual method call in LLVM pass
The goal is to create a function call graph with the names of the functions, and the graph should include indirect calls too. I looked and saw that LLVM supports a metadata type called ‘callees’, but I don’t see that it’s currently being implemented by clang. Will this eventually be used?
Thanks,
Ben
From: David Blaikie <dblaikie at gmail.com>
Sent: Friday, June 8, 2018 1:06 PM
To:
2014 Jul 07
2
[LLVMdev] Return Type of Call Function with nested bitcast
Hi All,
I am facing an issue with CallInst with nested bitcast instruction. I want
to check if the return type of a call is void or non-void the below line
works well for CallInst without bit cast.
*cast<CallInst>(I)->getCalledFunction()->getReturnType()->isVoidTy()*
But for Call instructions like
*call void bitcast (void (%struct.jpeg_compress_struct.131*, i32)*
2010 May 16
1
[LLVMdev] How to access the return value of a CallInst
Hi all:
I am trying to get the return value of a call instruction that I
inserted during the optimization pass I wrote. I have something like
the following:
CallInst *InitCall = CallInst::Create(InitFn, Args.begin(), Args.end(),
"log_load_addr_ret", LI);
CastInst *InsertedCast =
2013 Feb 11
2
[LLVMdev] How to get type of a call instruction
I need to get the type of a call instruction to typecast a (void*) pointer
to the type of the function which is called. How can I achieve that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130211/6a044cde/attachment.html>
2011 Jan 26
2
[LLVMdev] [LLVMDEV]How could I get function name in this situation?
Hi:
My llvm code is:
for( BasicBlock::iterator i = b->begin() , ie = b->end();
b != be ; b ++ ){
if( CallInst * pCall = dyn_cast<CallInst>(i)){
pCall->dump(); //
Function * pFunction = pCall->getCalledFunction();
if( !pFunction ){
}
std::string fname = pFunction->getName();
}
}
The dump result
2011 Jan 26
2
[LLVMdev] [LLVMDEV]How could I get function name in this situation?
thanks!
After I check the ll file, I find this:
%1 = load %struct.nsAString** %aBuf_addr, align 4, !dbg !2048
%2 = getelementptr inbounds %struct.nsAString* %1, i32 0, i32 0, !dbg !2048
%3 = getelementptr inbounds %struct.nsISupports* %2, i32 0, i32 0, !dbg !2048
%4 = load i32 (...)*** %3, align 4, !dbg !2048
%5 = getelementptr inbounds i32 (...)** %4, i32 10, !dbg !2048
%6 = load i32 (...)**
2016 Sep 20
2
[cfe-dev] Recent clang regressions
I get some failing tests from compiler-rt.
FAIL: cfi :: cross-dso/stats.cpp (30831 of 30893)
******************** TEST 'cfi :: cross-dso/stats.cpp' FAILED
********************
Script:
--
/usr/local/google/home/prazek/llvm-build-release/./bin/clang -fuse-ld=gold
-flto -fsanitize=cfi -fwhole-program-vtables --driver-mode=g++
-fsanitize-cfi-cross-dso -fvisibility=default -DSHARED_LIB -fPIC
2015 Sep 08
2
CallInst::getCalledFunction returns null?
I was wondering if someone could explain why CallInst::getCalledFunc behaves
the way it does.
For simple, direct call instructions in my IR, that method behaves just as
one would expect.
However, for instructions like this:
%25 = call i32 (%struct._IO_FILE*, ...)* bitcast (i32 (...)* @close to i32
> (%struct._IO_FILE*, ...)*)(%struct._IO_FILE* %24), !dbg !695
getCalledFunc returns null.
I
2011 Oct 17
2
[LLVMdev] Variable name from metadata
Hi All,
Can we extract name of variable name from "MDNode" ?
1. Neither temp_MDNode->getName() nor temp_MDNode->getValueName() give me "global_int" which is name of a variable.
2. I tried below ways as well.
DIVariable DV(mdnode1);
Value *v = mdnode1->getOperand(0);//gives add 0x69
3. I have written below code to reach till variable name.
LLVMIname is
2012 Nov 09
2
[LLVMdev] Inlining bitcast functions...
I've got a call instruction:
call void bitcast (void (%4 addrspace(1)*, <2 x i32>, <4 x float>)* @_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f to void (%9 addrspace(1)*, <2 x i32>, <4 x float>)*)(%9 addrspace(1)* %dstimg, <2 x i32> %28, <4 x float> %26) nounwind
%4 and %9 are both (stripped) opaque structs.
InlineFunction() does not inline this because
2011 Jan 26
2
[LLVMdev] [LLVMDEV]How could I get function name in this situation?
> On 1/26/11 2:40 PM, songlh at cs.wisc.edu wrote:
>> thanks!
>>
>> After I check the ll file, I find this:
>>
>> %1 = load %struct.nsAString** %aBuf_addr, align 4, !dbg !2048
>> %2 = getelementptr inbounds %struct.nsAString* %1, i32 0, i32 0, !dbg
>> !2048
>> %3 = getelementptr inbounds %struct.nsISupports* %2, i32 0, i32 0, !dbg
>> !2048
2016 Sep 20
2
Recent clang regressions
There seem to be some recent regressions in clang/llvm. I see some test
failing, and there is also this issue:
https://llvm.org/bugs/show_bug.cgi?id=30466
Is anyone working on it?
Piotr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160920/ade5e8cd/attachment.html>
2016 Jun 16
2
Intended behavior of CGSCC pass manager.
> To clarify, we're trying to provide this invariant on the "ref" graph or
> on the graph with direct calls only? I think the invariant need only apply
> to the former
>
More clarification needed :) What do you mean by 'invariant need only apply
to the former'?
> if we're relying on this for correctness (i.e. an analysis must visit all
> callees
2010 Jul 12
3
[LLVMdev] CallGraphSCCPass: symbol not found
Hi,
I've written a CallGraphSCCPass that compiles successfully, but when I
try to run it with opt, it fails:
Symbol not found: __ZTIN4llvm16CallGraphSCCPassE
If I simply change the pass to be a FunctionPass or a ModulePass, opt
can run it just fine.
I'm on Mac OS X, so I thought perhaps I was running into bug #2771
[1], but I'm getting the same error on Ubuntu Linux:
2017 Dec 07
2
devirtualization with new-PM pipeline
Chandler et al,
I have been playing with the new PM pipeline, being particularly
interested in how it can handle devirtualization.
Now, I discovered what I believe is a "regression" vs old PM on a rather
simple one-translation-unit testcase.
clang is able to devirtualize it with -O3 and fails to do so with
-fexperimental-new-pass-manager added.
It looks like a pipeline issue,
2011 Jan 26
0
[LLVMdev] [LLVMDEV]How could I get function name in this situation?
On 1/26/11 2:07 PM, songlh at cs.wisc.edu wrote:
> Hi:
>
> My llvm code is:
>
> for( BasicBlock::iterator i = b->begin() , ie = b->end();
> b != be ; b ++ ){
> if( CallInst * pCall = dyn_cast<CallInst>(i)){
>
> pCall->dump(); //
> Function * pFunction = pCall->getCalledFunction();
> if(
2012 Nov 02
2
[LLVMdev] Interprocedural Register Allocation
On Oct 31, 2012, at 1:41 PM, Madhusudan C.S <madhusudancs at gmail.com> wrote:
> I have spent last 4 weeks trying to figure out how to implement
> Interprocedural Register Allocation. I must admit that I was really
> overwhelmed with LLVM's codebase while trying to figure this out :)
> There is so much to know! I think I have reached a point where I
> have some sort of
2011 Oct 25
1
[LLVMdev] Using a FunctionPass inside a CallGraphSCCPass
Hi,
I am writing a CallGraphSCCPass that uses LoopInfo which is a FunctionPass.
However, doing so results in the following error.
****
Unable to schedule 'Natural Loop Information' required by '......'
****
Google led me to this page, where Devang Patel suggests implementing the
addLowerLevelRequiredPasses in CGPassManager in a manner similar to
MPPassManager.
2013 Jan 24
2
[LLVMdev] FunctionPass question
Hi,
I am working on a pass to convert lib calls to intrinsic calls as discussed here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-January/058507.html
In my first attempt I created a FunctionPass that uses CallInst::setCalledFunction to replace the callee with the appropriate intrinsic (using Intrinsic::getDeclaration).
After the pass runs I get an assertion from CallGraphSCCPass:
2011 Nov 21
5
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
I would have thought this would have been possible.
On Thu, Nov 17, 2011 at 3:49 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> So is this simply not possible?
>
>
> On Thu, Nov 17, 2011 at 10:31 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
>> Nick,
>>
>> Thanks for this info, though this didn't help my problem at all.
>>
>>