[PATCH] Implement categories for global lists.

Peter Collingbourne peter at pcc.me.uk
Wed Jul 3 19:04:16 PDT 2013


Hi kcc,

A global list can now specify categories for specific globals, which
can be used to instruct an instrumentation pass to treat certain
functions or global variables in a specific way, such as by omitting
certain aspects of instrumentation while keeping others, or informing
the instrumentation pass that a specific uninstrumentable function
has certain semantics, thus allowing the pass to instrument callers
according to those semantics.

For example, AddressSanitizer now uses the "init" category instead of
global-init prefixes for globals whose initializers should not be
instrumented, but which in all other respects should be instrumented.

The motivating use case is DataFlowSanitizer, which will have a
number of different categories for uninstrumentable functions, such
as "functional" which specifies that a function has pure functional
semantics, or "discard" which indicates that a function's return
value should not be labelled.

http://llvm-reviews.chandlerc.com/D1092

Files:
  include/llvm/Transforms/Utils/GlobalList.h
  lib/Transforms/Instrumentation/AddressSanitizer.cpp
  lib/Transforms/Utils/GlobalList.cpp
  unittests/Transforms/Utils/GlobalList.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1092.1.patch
Type: text/x-patch
Size: 14094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130703/9d518300/attachment.bin>


More information about the llvm-commits mailing list