Displaying 14 results from an estimated 14 matches for "haopeng".
2015 Jun 02
2
[LLVMdev] struct type parament
I tried to compare two types. Because of renaming, the comparison result
is not as expected. How to deal with renaming while comparing types?
Best,
Haopeng
On 6/2/15 4:09 PM, Mehdi Amini wrote:
> Hi Haopeng,
>
> One more element, I just noticed you are using LTO, I am not sure how it is implemented but my guess is that there is a shared LLVMContext. If multiple files include this structure declaration, I wouldn’t be surprised if it trigger c...
2015 Jun 02
2
[LLVMdev] struct type parament
...encountered this problem when used clang to compile transmission 1.42
(http://download.transmissionbt.com/files/) with configuration:
"./configure --disable-gtk". Then in ./third-party/libevent/event.o.ll,
you can see the function "event_base_get_method" is an example.
Best,
Haopeng
On 6/2/15 1:48 PM, Mehdi Amini wrote:
> Hi,
>
> I think this is when a collision is found on the name.
> I would be interesting to have the full test, it might be that the API is used in a way such that type is constantly re-created even if it already exists, which might be inefficient...
2015 Jun 08
2
[LLVMdev] Use Callgraph
...lGraph in llvm by adding
"AU.addRequired<CallGraph>();" in getAnalysisUsage function.
But it reports an error:
include/llvm/PassAnalysisSupport.h:56:39: error: ‘ID’ is not a member of
‘llvm::CallGraph’
return addRequiredID(PassClass::ID);
How to use it correctly?
Thanks,
Haopeng
2015 Jun 17
2
[LLVMdev] metadata in callgraph
Hi All,
It seems that functions in callgraph remove all metadata info, such as dbg.
Can I keep metadata in callgraph?
Best,
Haopeng
2015 Feb 16
2
[LLVMdev] alias result
Oh, got it. Thanks for your explain. I misunderstand what getLocation does.
If I would like to get the result of alias analysis referring to the
stored value, what should I do in llvm?
On 2/16/15 1:42 PM, Hal Finkel wrote:
> ----- Original Message -----
>> From: "Haopeng Liu" <hyliuhp at gmail.com>
>> To: "Hal Finkel" <hfinkel at anl.gov>
>> Cc: llvmdev at cs.uiuc.edu
>> Sent: Monday, February 16, 2015 1:38:40 PM
>> Subject: Re: [LLVMdev] alias result
>>
>> Yes, in my example, %1 and %2 point to t. %3 p...
2015 Jun 02
2
[LLVMdev] struct type parament
Hi All,
I generated the following code with "clang -flto" command.
void test(struct StruTyName *a) {
...
}
Then the type of test function is "void (%struct.StruTyName.100*)" by
calling function::getFunctionType API.
What's the meaning of number 100?
Best,
Haopeng
2015 Mar 02
2
[LLVMdev] clang change function name
Got it, thanks. But in my pass, I use function name to locate. Can I
disable mangling in clang?
Best,
Haopeng
On 3/1/15 10:44 PM, John Criswell wrote:
> On 3/1/15 11:38 PM, Haopeng Liu wrote:
>> Hi,
>>
>> I compile a .cpp with cmd:
>> clang++ -emit-llvm -c -g -O0 -w pbzip2.cpp -o pbzip2.bc -lbz2
>> llvm-dis pbzip2.bc
>>
>> One function in .cpp is consumer_decom...
2015 Feb 16
2
[LLVMdev] alias result
Yes, in my example, %1 and %2 point to t. %3 points to t2.
But t and t2 point to the same var, is it? That's where I'm confused.
On 2/16/15 12:37 PM, Hal Finkel wrote:
> ----- Original Message -----
>> From: "Haopeng Liu" <hyliuhp at gmail.com>
>> To: "Hal Finkel" <hfinkel at anl.gov>
>> Cc: llvmdev at cs.uiuc.edu
>> Sent: Monday, February 16, 2015 12:37:06 PM
>> Subject: Re: [LLVMdev] alias result
>>
>> t and t2 are two pointers defined in .c file....
2015 Feb 20
3
[LLVMdev] basicaa result
...test.c:
int main() {
int a;
int *p, *q;
p = &a;
q = p;
...
}
Commands:
clang -emit-llvm -c -g -O0 test.c -o test.bc
opt -basicaa -print-must-aliases test.bc
However, the result shows that p and q are no alias.
Could anyone explain it? Your help is much appreciated!
-Haopeng
2015 Feb 16
2
[LLVMdev] alias result
...two pointers defined in .c file.
The definitions in .bc are:
%thd = alloc i64, align 8
%t = alloca i64*, align 8
%t2 = alloca i64*, align 8
.c file likes this:
int thd;
int *t = &thd;
int *t2 = t;
On 2/16/15 12:28 PM, Hal Finkel wrote:
> ----- Original Message -----
>> From: "Haopeng Liu" <hyliuhp at gmail.com>
>> To: llvmdev at cs.uiuc.edu
>> Sent: Monday, February 16, 2015 12:12:18 PM
>> Subject: [LLVMdev] alias result
>>
>> Hi all,
>>
>> I am implementing a pass which needs aliasanalysis in llvm.
>>
>> My pass...
2015 Mar 02
2
[LLVMdev] clang change function name
On Mon, Mar 02, 2015 at 12:12:34AM -0500, John Criswell wrote:
> On 3/2/15 12:07 AM, Haopeng Liu wrote:
> >Got it, thanks. But in my pass, I use function name to locate. Can I
> >disable mangling in clang?
>
> No, but you can probably fine a library that can either mangle the original
> name or demangle the name you're seeing in the LLVM bitcode.
>
> As an...
2015 Mar 02
2
[LLVMdev] clang change function name
Hi,
I compile a .cpp with cmd:
clang++ -emit-llvm -c -g -O0 -w pbzip2.cpp -o pbzip2.bc -lbz2
llvm-dis pbzip2.bc
One function in .cpp is consumer_decompress. However, I look inside
pbzip2.ll. The function name is changed to "define i8*
@_Z19consumer_decompressPv(i8* %q) #0 {"
Why clang adds a "_Z19" prefix and "Pv" suffix?
Thanks,
2015 Feb 16
2
[LLVMdev] alias result
Hi all,
I am implementing a pass which needs aliasanalysis in llvm.
My pass firstly records all store or load instructions as follows:
loc[cnt++] = AA.getLocation(si/li);
Then, get each pairwise alias result.
AliasAnalysis::AliasResult ar = AA.alias(loc[i], loc[j]);
switch(ar){ case 0,1,2,3;}
And the command is: opt -load mypass.so -mypass -basicaa test.bc
The store/load in test.bc:
(1):
2015 May 31
1
[LLVMdev] link time optimization pass
Hi All,
How to write a link time optimization pass in llvm with LTO?
Is there a document, just like
http://llvm.org/docs/WritingAnLLVMPass.html tells us how to write a llvm
pass?
Thanks,