1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
llvm-mirror/test
Peter Collingbourne e3f12b0e68 IR: New representation for CFI and virtual call optimization pass metadata.
The bitset metadata currently used in LLVM has a few problems:

1. It has the wrong name. The name "bitset" refers to an implementation
   detail of one use of the metadata (i.e. its original use case, CFI).
   This makes it harder to understand, as the name makes no sense in the
   context of virtual call optimization.

2. It is represented using a global named metadata node, rather than
   being directly associated with a global. This makes it harder to
   manipulate the metadata when rebuilding global variables, summarise it
   as part of ThinLTO and drop unused metadata when associated globals are
   dropped. For this reason, CFI does not currently work correctly when
   both CFI and vcall opt are enabled, as vcall opt needs to rebuild vtable
   globals, and fails to associate metadata with the rebuilt globals. As I
   understand it, the same problem could also affect ASan, which rebuilds
   globals with a red zone.

This patch solves both of those problems in the following way:

1. Rename the metadata to "type metadata". This new name reflects how
   the metadata is currently being used (i.e. to represent type information
   for CFI and vtable opt). The new name is reflected in the name for the
   associated intrinsic (llvm.type.test) and pass (LowerTypeTests).

2. Attach metadata directly to the globals that it pertains to, rather
   than using the "llvm.bitsets" global metadata node as we are doing now.
   This is done using the newly introduced capability to attach
   metadata to global variables (r271348 and r271358).

See also: http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html

Differential Revision: http://reviews.llvm.org/D21053

llvm-svn: 273729
2016-06-24 21:21:32 +00:00
..
Analysis [CFLAA] Propagate StratifiedAttrs in interproc. analysis. 2016-06-24 01:00:03 +00:00
Assembler IR: Allow metadata attachments on declarations, and fix lazy loaded metadata issue with globals. 2016-06-21 23:42:48 +00:00
Bindings [OCaml] Add functions for accessing metadata nodes. 2016-06-22 03:30:24 +00:00
Bitcode BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module summary. 2016-06-24 01:58:02 +00:00
BugPoint
CodeGen Add support for musl-libc on ARM Linux. 2016-06-24 21:14:33 +00:00
DebugInfo [codeview] Emit parameter variables in the right order 2016-06-24 17:55:40 +00:00
Examples
ExecutionEngine ExecutionEngine: add preliminary support for COFF ARM 2016-06-24 14:11:44 +00:00
Feature
FileCheck
Instrumentation [asan] Do not instrument accesses to profiling globals 2016-06-22 17:30:58 +00:00
Integer
JitListener
LibDriver
Linker Linker: Copy metadata when linking declarations. 2016-06-24 17:42:21 +00:00
LTO Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
MC [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
Object [IRObjectFile] Propagate .weak attribute correctly for ASM symbols. 2016-06-22 20:48:15 +00:00
ObjectYAML [obj2yaml] [yaml2obj] Support for MachO Universal binaries 2016-06-24 20:42:28 +00:00
Other
SymbolRewriter
TableGen
ThinLTO/X86
tools IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
Transforms IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
Unit
Verifier Upgrade old memset/memcpy signatures (without isVolatile argument) in tests 2016-06-22 15:16:06 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
TestRunner.sh