Displaying 20 results from an estimated 706 matches for "vtabl".
Did you mean:
vtable
2016 Feb 29
0
[cfe-dev] RFC: A new ABI for virtual calls, and a change to the virtual call representation in the IR
Using relative offsets applies to more than just vtables. It would do
wonders for constant strings too.
-- Sean Silva
On Mon, Feb 29, 2016 at 1:53 PM, Peter Collingbourne via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hi all,
>
> I'd like to make a proposal to implement the new vtable ABI described in
> PR26723, which I'...
2016 Feb 29
10
RFC: A new ABI for virtual calls, and a change to the virtual call representation in the IR
Hi all,
I'd like to make a proposal to implement the new vtable ABI described in
PR26723, which I'll call the relative ABI. That bug gives more details and
justification for that ABI.
The user interface for the new ABI would be that -fwhole-program-vtables
would take an optional value indicating which aspects of the program have
whole-program scope. For e...
2020 Jun 09
2
Implementing a VTable in LLVM
Hi all,
I’ve been working on a Java-esque object-oriented language Bolt that targets LLVM IR. I’m agonisingly close to getting a virtual table working, and was hoping one of you could point out the gap in my understanding. I’ve linked the C++ code snippets relevant to the vtable below.
Example IR generated (partially displayed below): https://github.com/mukul-rathi/bolt/blob/vtable/examples/vtable/foo.ll <https://github.com/mukul-rathi/bolt/blob/vtable/examples/vtable/foo.ll>
And the Bolt source code that compiles to it- https://github.com/mukul-rathi/bolt/blob/v...
2019 Apr 19
2
Question: How to access c++ vtable pointer to use as Value* in LLVM pass
Dear Mailing List,
This might sound unconventional, but I am trying to access a C++
objects vtable to pass as an argument to a function call for a library
function I created. Creating & inserting a function call at the
correct location in LLVM is done.
I have learned that C++ objects are represented as struct types. But
I'm just not quite sure how to get at the vtable pointer within, w...
2016 Jan 28
2
Proposal: virtual constant propagation
Hi Peter,
Thanks for your answer!
> On Jan 28, 2016, at 10:17 AM, Peter Collingbourne <peter at pcc.me.uk> wrote:
>
> Hans wrote:
>> (and start-up time if we can drop the vtables and
>> void the dynamic relocations).
>
> On Thu, Jan 28, 2016 at 09:15:05AM -0800, Mehdi Amini wrote:
>> Hi,
>>
>> I just thought about another use case: VTable compression.
>> If you know that an entry in the Vtable is never used, just remove it!
>> I...
2016 Jan 28
2
Proposal: virtual constant propagation
Hi,
I just thought about another use case: VTable compression.
If you know that an entry in the Vtable is never used, just remove it!
I’d hope we could even eliminate some unused virtual functions from the final binary.
—
Mehdi
> On Jan 27, 2016, at 10:29 PM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hi...
2016 May 04
4
RFC [ThinLTO]: An embedded summary encoding to support CFI and vtable opt
...xtend ThinLTO to allow a bitcode module
to embed another bitcode module containing summary information. The purpose
of doing so is to support CFI and whole-program devirtualization
optimizations under ThinLTO.
Overview
The CFI and whole-program devirtualization optimizations work by
transforming vtables according to the class hierarchy. For example, if a
class A has two derived classes B and C, CFI will lay out the vtables for
A, B and C consecutively, so that clients can check that a vtable refers to
a derived class of A by performing arithmetic on the virtual function
pointer. For more details...
2015 Jan 27
7
[LLVMdev] IR extension proposal: bitset constants
Hi all,
I would like to propose a mechanism that allows IR modules to co-operatively
build a pointer set corresponding to addresses within a given set of
globals. The specific use case I have in mind is to provide a mechanism
for a C++ program to efficiently verify (at each call site) that a vtable
pointer is in the set of valid vtable pointers for the class or its derived
classes. One way of doing this is for a toolchain component to build, for each
class, a bit set that maps to the memory region allocated for the vtables,
such that each 1 bit in the bit set maps to a valid vtable for that...
2017 May 29
2
Dumping the Vtable
Hi,
Can someone help me with how to dump the vtable and the vptr addresses
within it?
Thanks,
Dami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170529/5dc7e058/attachment.html>
2016 Jan 28
8
Proposal: virtual constant propagation
...isOfType(Base::kDerived);
}
We can make the observation that if the type hierarchy is known to be closed
and the definition of each virtual function and each virtual call is visible
to the compiler, calls to either of these functions can be implemented more
efficiently by loading directly from the vtable (we refer to this as virtual
constant propagation):
struct Base_VTable {
bool isDerived : 1, isOfTypeBase : 1, isOfTypeDerived : 1;
};
Base_VTable base_vtable{false, true, false};
Derived_VTable derived_vtable{true, false, true};
bool f(Base *b) {
return b->vtable->isDerived;
}
bool g(B...
2013 Jun 12
2
[LLVMdev] "anchor" method policy, request for clarification
...ence to `typeinfo for llvm::cl::GenericOptionValue'
This seems to be due to the (mis-)use of "anchor" methods in CommandLine. I commited r183830, with a removal of the anchor method for GenericOptionValue, which solved my link problem. Also, the commit didn't change the number of vtables, as measured by:
find -name \*.o | xargs nm -C | grep 'V vtable' | grep OptionValue | wc
The current LLVM developer policy text regarding "anchor" methods is:
"If a class is defined in a header file and has a vtable (either it has virtual methods or it derives from clas...
2008 Mar 02
2
[LLVMdev] Struct layout assumptions
A question about the layout of structs: I decided to make my vtables out
of structs rather than arrays. In other words, instead of being a table
of opaque pointers, I decided to individually declare each entry with
the correct type for that method. I figure that the various optimizers
could do a better job if I preserve the type info.
OK, so we come to the is...
2013 Jun 12
0
[LLVMdev] "anchor" method policy, request for clarification
...me he wrote this policy - and, as I said in my
previous email, I wouldn't mind seeing some justification or just
seeing the rule go away & drop the anchors I added previously (or, if
we're going to keep it, we could add more anchors & actually get to
the point where we're -Wweak-vtable clean & enable that warning))
On Wed, Jun 12, 2013 at 1:44 PM, Patrik Hägglund H
<patrik.h.hagglund at ericsson.com> wrote:
> I tried to build LLVM with ’gcc-4.8.1 –flto’, and when linking unittest
> programs, I got the following error:
>
>
>
> /tmp/cc8pMk84.ltrans30.l...
2019 Dec 11
5
RFC: Safe Whole Program Devirtualization Enablement
...lso to allow
bitcode objects to be shared between links of targets with differing valid
LTO visibility. This utilizes the !vcall_visibility metadata added for Dead
Virtual Function Elimination.
The summary of changes required are (these are described in more detail
later):
1) When -fwhole-program-vtables is specified, always insert type test
assumes for virtual calls, and additionally add !vcall_visibility metadata
to vtable definitions (which will be summarized in the ThinLTO index).
2) At LTO link time, apply hidden LTO visibility to vtable definition
vcall_visibility metadata (or summary) whe...
2015 Jan 28
3
[LLVMdev] IR extension proposal: bitset constants
...se a mechanism that allows IR modules to
>> co-operatively
>> build a pointer set corresponding to addresses within a given set of
>> globals. The specific use case I have in mind is to provide a mechanism
>> for a C++ program to efficiently verify (at each call site) that a vtable
>> pointer is in the set of valid vtable pointers for the class or its
>> derived
>> classes. One way of doing this is for a toolchain component to build, for
>> each
>> class, a bit set that maps to the memory region allocated for the vtables,
>> such that each...
2018 May 03
3
RFC: virtual-like methods via LLVM-style RTTI
Hello,
In an effort to help LLVM-style projects save memory, I’ve been toying with some macros that provide an alternative to C++ vtables that use LLVM-style RTTI design patterns instead. Is this something that LLVM or sub-projects think is worth pursuing? Or are the macros below too ugly/problematic? Feedback would be appreciated.
Thanks,
Dave
//===- llvm/Support/VTable.h - LLVM-style vtables ---------------*- C++ -*-===//
//...
2007 Dec 07
2
Problems compiling xapian-core to run omega, SunOS
Hello xapian users,
The server I'm compiling on is a little odd. SunOS on a sun4
architecture.
Fails when linking, gives the following,
memcpy 0x10
/usr/local/gcc-3.3.2/lib/./libstdc++.a(ctype.o)
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error:
2010 Jun 04
2
Xapian 1.2.0 build fails on libxapian.la target - Solaris 9 (SunOS 5.9) sun4u SPARC
...mpatible versions. I am using libtool 2.2.6b, GNU ld 2.20.2010303. I
know gcc 3.3.2 is a little behind the times, but I see the the
documentation the minimum requirement is 3.1. I also see James Aylett
reported compiling Xapian version 1.0.5 on the Solaris 9 with platform
with gcc 3.3.
Any ideas?
vtable for __cxxabiv1::__vmi_class_type_info0x4
/usr/local/gcc-3.3.2/lib/./libstdc++.a(tinfo.o)
vtable for __cxxabiv1::__vmi_class_type_info0xc
/usr/local/gcc-3.3.2/lib/./libstdc++.a(tinfo.o)
vtable for __cxxabiv1::__vmi_class_type_info0x4
/usr/local/gcc-3.3.2/lib/./libstdc++.a(tinfo.o)
vtable for __cxxa...
2015 Jan 29
3
[LLVMdev] IR extension proposal: bitset constants
...>> co-operatively
> > >> build a pointer set corresponding to addresses within a given set of
> > >> globals. The specific use case I have in mind is to provide a
> mechanism
> > >> for a C++ program to efficiently verify (at each call site) that a
> vtable
> > >> pointer is in the set of valid vtable pointers for the class or its
> > >> derived
> > >> classes. One way of doing this is for a toolchain component to build,
> for
> > >> each
> > >> class, a bit set that maps to the memory re...
2015 Jan 30
0
[LLVMdev] IR extension proposal: bitset constants
...I would like to propose a mechanism that allows IR modules to co-operatively
> build a pointer set corresponding to addresses within a given set of
> globals. The specific use case I have in mind is to provide a mechanism
> for a C++ program to efficiently verify (at each call site) that a vtable
> pointer is in the set of valid vtable pointers for the class or its derived
> classes. One way of doing this is for a toolchain component to build, for each
> class, a bit set that maps to the memory region allocated for the vtables,
> such that each 1 bit in the bit set maps to a va...