Displaying 9 results from an estimated 9 matches for "_zts1a".
Did you mean:
_zbs1a
2017 Jan 20
4
RFC: Emitting empty invariant group for vtable loads
...8) %a) local_unnamed_addr #0
{
entry:
%0 = bitcast %struct.A* %a to void (%struct.A*)***
%vtable = load void (%struct.A*)**, void (%struct.A*)*** %0,
!invariant.group !7
%1 = load void (%struct.A*)*, void (%struct.A*)** %vtable
tail call void %1(%struct.A* nonnull %a)
ret void
}
!7 = !{!"_ZTS1A"}
This works well if the pointer type doesn’t change, but when it does,
devirtualization might not happen like here:
struct A {
A();
virtual void foo();
};
struct B : A{
B();
virtual void foo();
};
void g(A& a){
a.foo();
a.foo();
}
void clobber(A&);
void f() {...
2017 Jan 25
4
RFC: Emitting empty invariant group for vtable loads
...med_addr #0{entry: %0= bitcast %struct.A* %a to
> void(%struct.A*)*** %vtable = load void(%struct.A*)**,
> void(%struct.A*)*** %0, !invariant.group !7 %1= load
> void(%struct.A*)*, void(%struct.A*)** %vtable tail call
> void%1(%struct.A* nonnull %a) ret void}!7= !{!"_ZTS1A"}
>
> This works well if the pointer type doesn’t change, but when it
> does, devirtualization might not happen like here:
>
> structA { A();virtualvoidfoo();};structB :
> A{ B();virtualvoidfoo();};voidg(A&
> a){ a.foo(); a.foo();}voidclobbe...
2011 Dec 09
1
[LLVMdev] Implementing devirtualization
...8* bitcast (i32 (%class.A*)*
@_ZN1A3gooEv to i8*), i8* bitcast (i32 (%class.A*, %class.A*)*
@_ZN1AplERS_ to i8*)]
@_ZTVN10__cxxabiv120__si_class_type_infoE = external global i8*
@_ZTS1B = linkonce_odr constant [3 x i8] c"1B\00"
@_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
@_ZTS1A = linkonce_odr constant [3 x i8] c"1A\00"
@_ZTI1A = linkonce_odr unnamed_addr constant { i8*, i8* } { i8*
bitcast (i8** getelementptr inbounds (i8**
@_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8*
getelementptr inbounds ([3 x i8]* @_ZTS1A, i32 0, i32 0) }
@_ZTI1B = linkonce_od...
2016 Nov 01
2
Ambiguity in !tbaa metadata?
...ess, here is the C++ source that was used to generate the
IR above:
struct A { char f; };
struct B { A a; };
struct C { int f; };
int f(B *b, C *c, int *i) {
return b->a.f + c->f + *i;
}
and the metadata was:
!2 = !{!3, !5, i64 0}
!3 = !{!"_ZTS1B", !4, i64 0}
!4 = !{!"_ZTS1A", !5, i64 0}
!5 = !{!"omnipotent char", !6, i64 0}
!6 = !{!"Simple C++ TBAA"}
!7 = !{!8, !9, i64 0}
!8 = !{!"_ZTS1C", !9, i64 0}
!9 = !{!"int", !5, i64 0}
!10 = !{!9, !9, i64 0}
-- Sanjoy
2017 Jan 26
2
[cfe-dev] RFC: Emitting empty invariant group for vtable loads
...struct.A* %a to void (%
>>> struct.A*)*** %vtable = load void (%struct.A*)**, void (%struct.A*)***
>>> %0, !invariant.group !7 %1 = load void (%struct.A*)*, void (%struct.A*)**
>>> %vtable tail call void %1(%struct.A* nonnull %a) ret void } !7 = !{!
>>> "_ZTS1A"}
>>>
>>> This works well if the pointer type doesn’t change, but when it does,
>>> devirtualization might not happen like here:
>>>
>>> struct A { A(); virtual void foo(); }; struct B : A{ B();
>>> virtual void foo(); }; void g(A&...
2011 Dec 09
0
[LLVMdev] Implementing devirtualization
On Thu, Dec 8, 2011 at 2:11 PM, Vitor Luis Menezes <vitor at utexas.edu> wrote:
> We've got the following test case:
>
>
> class A {
> public:
> int x;
> A(int x) : x(x) {}
> int hoo() {return 4;}
> virtual int foo() {return x;}
> virtual int goo() {return foo()+10;}
> virtual int operator+(A &a) {
> return x + a.x;
> }
> };
2017 Jan 28
2
[cfe-dev] RFC: Emitting empty invariant group for vtable loads
...void (%
>>>> struct.A*)*** %vtable = load void (%struct.A*)**, void (%struct.A*)***
>>>> %0, !invariant.group !7 %1 = load void (%struct.A*)*, void (%struct.A*)**
>>>> %vtable tail call void %1(%struct.A* nonnull %a) ret void } !7 = !{!
>>>> "_ZTS1A"}
>>>>
>>>> This works well if the pointer type doesn’t change, but when it does,
>>>> devirtualization might not happen like here:
>>>>
>>>> struct A { A(); virtual void foo(); }; struct B : A{ B();
>>>> virtual...
2017 Jan 31
0
[cfe-dev] RFC: Emitting empty invariant group for vtable loads
...ad
>>> void(%struct.A*)**, void(%struct.A*)*** %0,
>>> !invariant.group !7 %1= load void(%struct.A*)*,
>>> void(%struct.A*)** %vtable tail call
>>> void%1(%struct.A* nonnull %a) ret void}!7= !{!"_ZTS1A"}
>>>
>>> This works well if the pointer type doesn’t change,
>>> but when it does, devirtualization might not happen
>>> like here:
>>>
>>> structA { A();virtualvoidfoo();};...
2011 Dec 08
2
[LLVMdev] Implementing devirtualization
We've got the following test case:
class A {
public:
int x;
A(int x) : x(x) {}
int hoo() {return 4;}
virtual int foo() {return x;}
virtual int goo() {return foo()+10;}
virtual int operator+(A &a) {
return x + a.x;
}
};
class B : public A {
public:
B(int x) : A(x) {}
int hoo() {return 2;}
virtual int foo() {return A::foo()*2;}
};
int main() {
A* a = new A(1);