hanchenye-llvm-project/llvm/test/Feature
Peter Collingbourne 51d2de7b9e Prologue support
Patch by Ben Gamari!

This redefines the `prefix` attribute introduced previously and
introduces a `prologue` attribute.  There are a two primary usecases
that these attributes aim to serve,

  1. Function prologue sigils

  2. Function hot-patching: Enable the user to insert `nop` operations
     at the beginning of the function which can later be safely replaced
     with a call to some instrumentation facility

  3. Runtime metadata: Allow a compiler to insert data for use by the
     runtime during execution. GHC is one example of a compiler that
     needs this functionality for its tables-next-to-code functionality.

Previously `prefix` served cases (1) and (2) quite well by allowing the user
to introduce arbitrary data at the entrypoint but before the function
body. Case (3), however, was poorly handled by this approach as it
required that prefix data was valid executable code.

Here we redefine the notion of prefix data to instead be data which
occurs immediately before the function entrypoint (i.e. the symbol
address). Since prefix data now occurs before the function entrypoint,
there is no need for the data to be valid code.

The previous notion of prefix data now goes under the name "prologue
data" to emphasize its duality with the function epilogue.

The intention here is to handle cases (1) and (2) with prologue data and
case (3) with prefix data.

References
----------

This idea arose out of discussions[1] with Reid Kleckner in response to a
proposal to introduce the notion of symbol offsets to enable handling of
case (3).

[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-May/073235.html

Test Plan: testsuite

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

llvm-svn: 223189
2014-12-03 02:08:38 +00:00
..
NamedMDNode.ll
NamedMDNode2.ll
README.txt
alias2.ll Allow alias to point to an arbitrary ConstantExpr. 2014-06-03 02:41:57 +00:00
aliases.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
alignment.ll
attributes.ll
basictest.ll
callingconventions.ll Parse 'ghccc' in .ll files as the GHC convention (cc 10) 2014-12-01 21:04:44 +00:00
calltest.ll
casttest.ll
cfgstructures.ll
cold.ll
comdat.ll IR: Allow comdats to be applied to globals with internal linkage 2014-07-13 04:56:11 +00:00
const_pv.ll
constexpr.ll
constpointer.ll
escaped_label.ll
exception.ll
float.ll
fold-fpcast.ll
forwardreftest.ll
global_pv.ll
global_section.ll
globalredefinition3.ll
globalvars.ll Fix a small bug in the parsing of anonymous globals. 2014-06-03 20:07:32 +00:00
indirectcall.ll
indirectcall2.ll
inlineasm.ll
instructions.ll [IR] Make {extract,insert}element accept an index of any integer type. 2014-05-01 22:12:39 +00:00
intrinsic-noduplicate.ll Expose "noduplicate" attribute as a property for intrinsics. 2014-03-18 23:51:07 +00:00
intrinsics.ll
load_module.ll
md_on_instruction.ll Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
memorymarkers.ll
metadata.ll
minsize_attr.ll
newcasts.ll
optnone-llc.ll [AArch64] Update test case to pass with post-RA MI scheduler. 2014-09-13 03:23:23 +00:00
optnone-opt.ll
optnone.ll
packed.ll
packed_struct.ll
paramattrs.ll
ppcld.ll
prefixdata.ll
prologuedata.ll Prologue support 2014-12-03 02:08:38 +00:00
properties.ll
prototype.ll
recursivetype.ll
simplecalltest.ll
small.ll
smallest.ll
sparcld.ll
terminators.ll
testalloca.ll
testconstants.ll
testlogical.ll
testtype.ll
testvarargs.ll
undefined.ll
unreachable.ll
varargs.ll
varargs_new.ll
vector-cast-constant-exprs.ll
weak_constant.ll Delete -std-compile-opts. 2014-10-16 20:00:02 +00:00
weirdnames.ll
x86ld.ll

README.txt

This directory contains test cases for individual source features of LLVM.
It is designed to make sure that the major components of LLVM support all of the
features of LLVM, for very small examples.  Entire programs should not go here.

Regression tests for individual bug fixes should go into the test/Regression dir.