[PATCH] D18113: CodeGen: Use 32-bit gep offsets to address vtable address points.

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 11 17:38:56 PST 2016


pcc created this revision.
pcc added reviewers: rsmith, rjmccall.
pcc added a subscriber: cfe-commits.

The relative vtable ABI will use a struct rather than an array as the type
of a vtable. LLVM only allows 32-bit integers as struct indices, so we need
to use 32-bit integers to get addresses of address points. In order to keep
the code simple, we might as well do that unconditionally.

It's probably a reasonable implementation limit to support no more than 2
billion virtual functions per class.

This change causes quite a bit of churn in the test suite, so I'm making
it separately.

http://reviews.llvm.org/D18113

Files:
  lib/CodeGen/CGVTT.cpp
  lib/CodeGen/ItaniumCXXABI.cpp
  test/CodeGenCXX/const-init-cxx11.cpp
  test/CodeGenCXX/constructor-init.cpp
  test/CodeGenCXX/copy-constructor-synthesis-2.cpp
  test/CodeGenCXX/copy-constructor-synthesis.cpp
  test/CodeGenCXX/microsoft-interface.cpp
  test/CodeGenCXX/skip-vtable-pointer-initialization.cpp
  test/CodeGenCXX/strict-vtable-pointers.cpp
  test/CodeGenCXX/vtable-assume-load.cpp
  test/CodeGenCXX/vtable-pointer-initialization.cpp
  test/CodeGenCXX/vtt-layout.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18113.50506.patch
Type: text/x-patch
Size: 27853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160312/f569d77d/attachment-0001.bin>


More information about the cfe-commits mailing list