llvm-project/llvm/test/tools
Peter Collingbourne 7efd750607 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
..
dsymutil dsymutil/modules: Reword the warning for static libraries without module caches 2016-05-20 20:36:06 +00:00
gold IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
llvm-config Disable all llvm-config tests for now, will investigate later 2016-02-10 17:29:50 +00:00
llvm-cov [llvm-cov] Fix two warnings 2016-06-24 02:33:01 +00:00
llvm-cxxdump [llvm-cxxdump] Remove duplicate code check. 2015-09-15 23:35:32 +00:00
llvm-dwp llvm-dwp: More error handling around invalid compressed sections 2016-05-23 17:59:17 +00:00
llvm-lit
llvm-lto [ThinLTO] Use valueid instead of bitcode offsets in combined index file 2016-04-27 13:28:35 +00:00
llvm-mc [Hexagon] Removing XFAIL on Hexagon target. 2015-11-09 06:15:55 +00:00
llvm-nm Fix some bugs in the posix output of llvm-nm. Which is documented on 2016-03-29 20:18:07 +00:00
llvm-objdump Update llvm-obdump(1) to print FAT_MAGIC_64 for Darwin’s 64-bit universal files 2016-06-21 21:55:01 +00:00
llvm-pdbdump Fix several accidental DOS line endings in source files 2016-01-03 17:22:03 +00:00
llvm-profdata Retry^4 "[llvm-profdata] Add option to ingest filepaths from a file" 2016-06-07 22:47:31 +00:00
llvm-readobj [llvm-readobj] - Teach llvm-readobj to print dependencies of SHT_GNU_verdef and refactor dumping method. 2016-06-22 13:43:38 +00:00
llvm-size Fix llvm-size to exit with non zero when it can’t open a file. 2016-05-02 21:41:03 +00:00
llvm-split Preserve blockaddress use edges in the module splitter. 2016-03-31 21:55:11 +00:00
llvm-symbolizer [Symbolize] Check if the PE file has a PDB and emit an error if we can't load it 2016-06-03 20:25:09 +00:00
lto LTOCodeGenerator: add linkonce(_odr) to "llvm.compiler.used" when present in "MustPreserve" set 2016-05-05 05:14:24 +00:00
sancov [sancov] Revert r271695 which broke all of the PPC bots. 2016-06-04 03:28:27 +00:00
sanstats Introduce sanstats tool and llvm::CreateSanitizerStatReport function. 2016-01-16 00:31:11 +00:00