Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] clang change function name"
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
2014 Jun 11
3
[LLVMdev] How do clang & clang++ choose function names for LLVM IR?
Hello all,
I'm getting started on a project using LLVM's opt tool to do static
analysis, printing call graphs and such. When compiling C programs to IR
(and eventually to call graphs), function names remain the same (main,
function1, function2 etc.), but when compiling the same program as C++, the
function names often have cruft added to them (_Z9function1v, _Z9function2v
etc.) which
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
2015 Jun 02
2
[LLVMdev] struct type parament
Hi Mehdi,
Thanks for your reply.
It seems caused by random rename because I saw
%struct.StructTyName.692.475*, which might be twice renaming.
Does this collision occur because this type is declared more than once?
I encountered this problem when used clang to compile transmission 1.42
(http://download.transmissionbt.com/files/) with configuration:
"./configure --disable-gtk". Then
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>
>>
2015 Jan 15
4
Request to speed up save()
Hi,
I am dealing with very large datasets and it takes a long time to save a
workspace image.
The options to save compressed data are: "gzip", "bzip2" or "xz", the
default being gzip. I wonder if it's possible to include the pbzip2
(http://compression.ca/pbzip2/) algorithm as an option when saving.
"PBZIP2 is a parallel implementation of the bzip2
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
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:
2015 Feb 20
3
[LLVMdev] basicaa result
Hi,
I'm trying to explore basicaa alias analysis.
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 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 Feb 16
2
[LLVMdev] alias result
t and t2 are 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
2010 Aug 05
3
[LLVMdev] a problem when using postDominatorTree
On 08/05/2010 06:46 AM, Wenbin Zhang wrote:
> Hi all,
> I'm using postDominatorTree to do some program analysis. My code works
> well for small tests, but when I run it on real applications, the
> following error occurs:
> /Inorder PostDominator Tree: DFSNumbers invalid: 0 slow queries.
> [1] <<exit node>> {0,21}
> [2] %bb1 {1,2}
> [2] %bb {3,4}
> [2]
2010 Aug 05
0
[LLVMdev] a problem when using postDominatorTree
I'll try the trunk, as well as check my code again. If indeed it's not
fixed, I'll try to post a triggering case here.
Thanks for the advice~
Best,
--Wenbin
----- Original Message -----
From: "Tobias Grosser" <grosser at fim.uni-passau.de>
To: "Wenbin Zhang" <zhangwen at cse.ohio-state.edu>
Cc: <llvmdev at cs.uiuc.edu>
Sent: Thursday, August
2009 Jun 17
8
[LLVMdev] Why are functions renamed for .cpp files with llvm-gcc?
Hello,
I wonder why there is a difference in how
llvm-gcc compiles .c and .cpp files.
Example:
---bar.cpp----
int bar() {
return 42;
}
--------------
$ llvm-gcc -emit-llvm -c bar.cpp
Now running bar.o through llvm-dis gives:
--------------------------------
define i32 @_Z3barv() nounwind {
< clip >
}
--------------------------------
Above, function 'bar' has been renamed
2010 Aug 05
1
[LLVMdev] a problem when using postDominatorTree
Wenbin Zhang wrote:
> I'll try the trunk, as well as check my code again. If indeed it's not
> fixed, I'll try to post a triggering case here.
> Thanks for the advice~
>
Did you run the -mergereturn pass (it might also be called
UnifyExitNodes in the source code)? This is the pass that ensures that
each function has exactly one basic block that returns control to the
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 Jun 08
2
[LLVMdev] Use Callgraph
Hi All,
I tried to use CallGraph 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 Jan 15
0
Request to speed up save()
In addition to the major points that others made: if you care about speed, don't use compression. With today's fast disks it's an order of magnitude slower to use compression:
> d=lapply(1:10, function(x) as.integer(rnorm(1e7)))
> system.time(saveRDS(d, file="test.rds.gz"))
user system elapsed
17.210 0.148 17.397
> system.time(saveRDS(d,
2009 Dec 04
30
ZFS send | verify | receive
If there were a ?zfs send? datastream saved someplace, is there a way to
verify the integrity of that datastream without doing a ?zfs receive? and
occupying all that disk space?
I am aware that ?zfs send? is not a backup solution, due to vulnerability of
even a single bit error, and lack of granularity, and other reasons.
However ... There is an attraction to ?zfs send? as an augmentation to the
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 FYI,