Displaying 20 results from an estimated 55 matches for "_z3foov".
2014 Dec 11
5
[LLVMdev] How to get the original function name in C++?
Hi, everyone!
I'm new here trapped by a simple problem for days.
When LLVM translates C++ source code to IR, it will add a prefix to the
function name. For example:
source code:
int foo(){
return 1;
}
IR form:
define i32 @_Z3foov() #0 {
entry:
ret i32 1, !dbg !20
}
The getName() method returns _Z3foov, then how can I get foo? I know
the debugging information is contained in metadata, but I've no idea on
using it.
Thanks a lot for any help.
-------------- next part --------------
An HTML attachment was scrubbed...
2020 May 31
2
LLC crash while handling DEBUG info
...ModuleID = 'foo.cpp'
source_filename = "foo.cpp"
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @_Z3foov() #0 !dbg !7 {
ret void, !dbg !10
}
attributes #0 = { noinline nounwind optnone uwtable
"correctly-rounded-divide-sqrt-fp-math"="false"
"disable-tail-calls"="false" "frame-pointer"="all"
"less-precise-fpmad"="false"...
2020 May 31
2
LLC crash while handling DEBUG info
...pp"
> > target datalayout =
> > "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
> > target triple = "x86_64-unknown-linux-gnu"
> >
> > ; Function Attrs: noinline nounwind optnone uwtable
> > define dso_local void @_Z3foov() #0 !dbg !7 {
> > ret void, !dbg !10
> > }
> >
> > attributes #0 = { noinline nounwind optnone uwtable
> > "correctly-rounded-divide-sqrt-fp-math"="false"
> > "disable-tail-calls"="false" "frame-pointer"="...
2014 Dec 11
2
[LLVMdev] How to get the original function name in C++?
...;> I'm new here trapped by a simple problem for days.
>> When LLVM translates C++ source code to IR, it will add a prefix to
>> the function name. For example:
>> source code:
>> int foo(){
>> return 1;
>> }
>> IR form:
>> define i32 @_Z3foov() #0 {
>> entry:
>> ret i32 1, !dbg !20
>> }
>> The getName() method returns _Z3foov, then how can I get foo? I
>> know the debugging information is contained in metadata, but I've no
>> idea on using it.
>> Thanks a lot for any help.
>&...
2016 Jun 22
3
x86: How to Force 2-byte `jmp` instruction in lowering
...gt;
> -Nirav
>
>
Thanks Nirav -- I tried this but I'm still getting a "jmpq <address>" with
this incantation when I load and disassemble from gdb. I'm seeing a
5-instruction jump, followed by the nops.
If I disassemble with llvm-objdump though I see the following:
_Z3foov:
400c10: e9 09 00 00 00 jmp 9 <_Z3foov+0xE>
400c15: 66 0f 1f 84 00 00 02 00 00 nopw 512(%rax,%rax)
I'm not sure whether the extra 0's after '0xe9 0x09' are alignment padding
(though I was expecing 0x90 to show up if this was an alignment issue)....
2020 May 31
2
LLC crash while handling DEBUG info
...t; >
> "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
> >> > target triple = "x86_64-unknown-linux-gnu"
> >> >
> >> > ; Function Attrs: noinline nounwind optnone uwtable
> >> > define dso_local void @_Z3foov() #0 !dbg !7 {
> >> > ret void, !dbg !10
> >> > }
> >> >
> >> > attributes #0 = { noinline nounwind optnone uwtable
> >> > "correctly-rounded-divide-sqrt-fp-math"="false"
> >> > "disable-tail-calls&qu...
2015 Aug 21
2
[CUDA/NVPTX] is inlining __syncthreads allowed?
I'm using 7.0. I am attaching the reduced example.
nvcc sync.cu -arch=sm_35 -ptx
gives
// .globl _Z3foov
.visible .entry _Z3foov(
)
{
.reg .pred %p<2>;
.reg .s32 %r<3>;
mov.u32 %r1, %tid.x;
and.b32 %r2, %r1, 1;
setp.eq.b32 %p1, %r2, 1;
@!%p1 bra BB7_2;
bra.uni BB7_1;
BB7_1:
bar....
2020 Jun 01
2
LLC crash while handling DEBUG info
...p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
> >> >> > target triple = "x86_64-unknown-linux-gnu"
> >> >> >
> >> >> > ; Function Attrs: noinline nounwind optnone uwtable
> >> >> > define dso_local void @_Z3foov() #0 !dbg !7 {
> >> >> > ret void, !dbg !10
> >> >> > }
> >> >> >
> >> >> > attributes #0 = { noinline nounwind optnone uwtable
> >> >> > "correctly-rounded-divide-sqrt-fp-math"="false"
&...
2016 Sep 13
3
undef * 0
Hi Soham,
You're right that in LLVM IR arithmetic (with the current definition
of `undef`) is not distributive. You can't replace `A * (B + C)` with
`A * B + A * C` in general, since (exactly as you said) for A =
`undef`, B = `1`, C = `-1` the former always computes `0` while the
latter computes `undef`. This is fundamentally because replacing `A *
(B + C)` with `A * B + A * C`
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...anks Nirav -- I tried this but I'm still getting a "jmpq <address>" with
> this incantation when I load and disassemble from gdb. I'm seeing a
> 5-instruction jump, followed by the nops.
>
> If I disassemble with llvm-objdump though I see the following:
>
> _Z3foov:
> 400c10: e9 09 00 00 00 jmp 9 <_Z3foov+0xE>
> 400c15: 66 0f 1f 84 00 00 02 00 00 nopw 512(%rax,%rax)
>
> I'm not sure whether the extra 0's after '0xe9 0x09' are alignment padding
> (though I was expecing 0x90 to show up if this wa...
2010 Mar 24
1
[LLVMdev] How to add extern function declaratioin to llvm bc?
...m wondering if there is some API to add extern function declaration
to bc file. For example, as given below, I want to add the line "extern void
foo();" to my bc file with some llvm methods, how can I do this, please?
extern void foo(); // the llvm bc code is: declare void
@_Z3foov(). How can I add this line to llvm bc using some llvm
methods?
int main() {
foo();
}
--
Regards,
Heming Cui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100324/066a7274/attachment.html>
2010 Dec 01
0
[LLVMdev] RFC: Exception Handling Proposal Revised
Hi Bill, this proposal seems strangely complicated. I don't see the advantage
of the dispatch instruction over just attaching the information to each invoke.
Right now you have
invoke void @_Z3foov()
to label %invcont unwind label %catch.handlers
catch.handlers: landingpad
dispatch resume to label %...
catches [
%struct.__fundamental_type_info_pseudo* @_ZTIi, label %ch.int
%struct.__pointer_type_info_pseudo* @_ZTIPKc, label %ch.str
]
catchall [i8* null, lab...
2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
..." {
extern int __xray_patch();
}
int main(int argc, char* argv[]) {
printf("main has started.\n");
bar();
foo();
__xray_patch();
foo();
}
--->8 test.cc 8<---
A snippet of the disassembly (llvm-objdump -disassemble test.bin) looks
like:
--->8 disassembly 8<---
_Z3foov:
400cb0: e9 09 00 00 00 jmp 9 <_Z3foov+0xE>
400cb5: 66 0f 1f 84 00 00 02 00 00 nopw 512(%rax,%rax)
400cbe: 55 pushq %rbp
400cbf: 48 89 e5 movq %rsp, %rbp
400cc2: 48 83 ec 10 subq $16, %rsp
400cc6: 48 bf c5 0e...
2010 Dec 01
2
[LLVMdev] RFC: Exception Handling Proposal Revised
On Dec 1, 2010, at 10:20 AM, Duncan Sands wrote:
> Hi Bill, this proposal seems strangely complicated. I don't see the advantage
> of the dispatch instruction over just attaching the information to each invoke.
> Right now you have
>
> invoke void @_Z3foov()
> to label %invcont unwind label %catch.handlers
>
> catch.handlers: landingpad
> dispatch resume to label %...
> catches [
> %struct.__fundamental_type_info_pseudo* @_ZTIi, label %ch.int
> %struct.__pointer_type_info_pseudo* @_ZTIPKc, label %ch.str
>...
2010 Dec 01
10
[LLVMdev] RFC: Exception Handling Proposal Revised
...;, align 1
@_ZTIi = external constant %struct.__fundamental_type_info_pseudo
@_ZTIPKc = external constant %struct.__pointer_type_info_pseudo
define void @_Z3barv() optsize ssp {
entry:
%a = alloca %struct.A, align 8
%b = alloca %struct.B, align 8
%c = alloca %struct.C, align 8
invoke void @_Z3foov()
to label %invcont unwind label %catch.handlers
invcont:
invoke void @_Z3foov()
to label %invcont1 unwind label %a.dtor
invcont1:
invoke void @_Z3foov()
to label %invcont2 unwind label %b.dtor
invcont2:
invoke void @_Z3foov()
to label %bb1 unwind la...
2014 Feb 17
3
[LLVMdev] [cfe-dev] Unwind behaviour in Clang/LLVM
...mantion. For example, the following code:
define void @foo() {
entry:
ret void
}
will be converted to:
define void @foo() nounwind {
entry:
ret void
}
Here's a much more complex example:
define void @foo() {
declare void @_Z3barv()
declare i32 @__gxx_personality_v0(...)
define void @_Z3foov() {
entry:
invoke void @_Z3barv() to label %try.cont unwind label %lpad
lpad:
%0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)*
@__gxx_personality_v0 to i8*)
catch i8* null
ret void
try.cont:
ret void
}
is converted to
declare void @_Z3barv()
declare i32 @__gxx...
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...argv[]) {
> printf("main has started.\n");
> bar();
> foo();
> __xray_patch();
> foo();
> }
> --->8 test.cc 8<---
>
> A snippet of the disassembly (llvm-objdump -disassemble test.bin) looks
> like:
>
> --->8 disassembly 8<---
> _Z3foov:
> 400cb0: e9 09 00 00 00 jmp 9 <_Z3foov+0xE>
> 400cb5: 66 0f 1f 84 00 00 02 00 00 nopw 512(%rax,%rax)
> 400cbe: 55 pushq %rbp
> 400cbf: 48 89 e5 movq %rsp, %rbp
> 400cc2: 48 83 ec 10 subq $16, %rsp
&g...
2009 Mar 19
1
[LLVMdev] sample-code for alias-analysis
Hi,
i need a sample-code, for which the llvm alias-analysis finds a *must-aliases*.
I have tried codes like followings. In all cases, i see just *may-aliases* when i use "opt -aa-eval -print-all-alias-modref-info foo.bc":
Regards
Raad
1 ==========================================
void foo() {
int i = 2;
int& r = i;
}
2 ===========================================
void
2010 Dec 01
0
[LLVMdev] RFC: Exception Handling Proposal Revised
Hi Bill,
>> Why not combine this into:
>>
>> invoke void @_Z3foov()
>> to label %invcont unwind resume to label %...
>> catches [
>> %struct.__fundamental_type_info_pseudo* @_ZTIi, label %ch.int
>> %struct.__pointer_type_info_pseudo* @_ZTIPKc, label %ch.str
>> ]
>> catchall [i8* null, label % ch.ca <http://ch.ca>]
>>...
2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
I have a bit of a riddle:
In http://reviews.llvm.org/D19904 I'm trying to spell the following
assembly:
.palign 2, 0x90
jmp +0x9
nopw 512(%rax,%rax,1)
// rest of the code
I try the following snippet to accomplish this:
OutStreamer->EmitLabel(CurSled);
OutStreamer->EmitCodeAlignment(4);
auto Target = OutContext.createLinkerPrivateTempSymbol();
// Use a two-byte `jmp`.