1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/include/llvm
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
..
ADT Add support for musl-libc on ARM Linux. 2016-06-24 21:14:33 +00:00
Analysis IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
AsmParser [AsmParser] Expose an API to parse a string starting with a type. 2016-03-08 00:37:07 +00:00
Bitcode IR: Allow metadata attachments on declarations, and fix lazy loaded metadata issue with globals. 2016-06-21 23:42:48 +00:00
CodeGen [PM] Port PreISelIntrinsicLowering to the new PM 2016-06-24 20:13:42 +00:00
Config Add the printing the Mach-O (__LLVM,__bundle) xar archive file section "verbosely" 2016-05-23 21:34:12 +00:00
DebugInfo [CodeView] Healthy paranoia around strings 2016-06-24 19:34:41 +00:00
ExecutionEngine IR: Introduce Module::global_objects(). 2016-06-22 20:29:42 +00:00
IR IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
IRReader [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
LibDriver [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
LineEditor Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
Linker Linker: teach the IR mover to return llvm::Error. 2016-05-27 05:21:35 +00:00
LTO [UpdateCompilerUsed] API rename and cleanup, suggested by Rafaael. 2016-06-22 19:50:42 +00:00
MC Use the same underlying type for bitfields 2016-06-24 04:05:25 +00:00
Object [MachO] Fixing copy-paste error from r273719 2016-06-24 21:06:52 +00:00
ObjectYAML [obj2yaml] [yaml2obj] Support for MachO Universal binaries 2016-06-24 20:42:28 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
Passes [PM] Refactor cross-registration of AM into an helper. 2016-05-14 23:21:50 +00:00
ProfileData [Coverage] Clarify ownership of a MemoryBuffer in the reader (NFC) 2016-06-21 22:22:33 +00:00
Support Revert r273664 2016-06-24 12:25:15 +00:00
TableGen Reverting r263474; it turns out there are uses of the public interface, but MSVC wasn't caring about them. 2016-03-14 20:03:15 +00:00
Target Revert "Revert "[misched] Extend scheduler to handle unsupported features"" 2016-06-24 08:43:27 +00:00
Transforms IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
CMakeLists.txt
InitializePasses.h IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
LinkAllIR.h Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
LinkAllPasses.h Remove the ScalarReplAggregates pass 2016-06-15 00:19:09 +00:00
module.modulemap [modules] Good ol' JIT is gone. 2016-06-23 07:33:03 +00:00
module.modulemap.build
Pass.h Remove unused header. 2016-05-25 22:56:58 +00:00
PassAnalysisSupport.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
PassInfo.h
PassRegistry.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
PassSupport.h [LPM] Reinstate r271781 which reinstated r271652 to replace the 2016-06-04 19:57:55 +00:00