llvm-6502/test
Peter Collingbourne bb660fc192 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223189 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 02:08:38 +00:00
..
Analysis Revert r222039 because of bot failure. 2014-11-19 00:13:26 +00:00
Assembler Use FileCheck in a few tests. 2014-11-06 15:05:51 +00:00
Bindings [OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module. 2014-12-01 19:50:39 +00:00
Bitcode Parse 'ghccc' in .ll files as the GHC convention (cc 10) 2014-12-01 21:04:44 +00:00
BugPoint Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
CodeGen Prologue support 2014-12-03 02:08:38 +00:00
DebugInfo Switch lowering: Fix broken 'Figure out which block is next' code 2014-11-29 21:17:05 +00:00
ExecutionEngine Small model and JIT generally don't go well with each other. 2014-11-25 17:14:22 +00:00
Feature Prologue support 2014-12-03 02:08:38 +00:00
FileCheck FileCheck: Add a flag to allow checking empty input 2014-08-07 18:40:37 +00:00
Instrumentation [asan] Change dynamic alloca instrumentation to only consider allocas that are dominating all exits from function. 2014-12-01 08:47:58 +00:00
Integer [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
JitListener Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
Linker Prologue support 2014-12-03 02:08:38 +00:00
LTO Add Forward Control-Flow Integrity. 2014-11-11 21:08:02 +00:00
MC [X86][MC] Intel syntax: accept implicit memory operand sizes larger than 80. 2014-12-03 02:03:26 +00:00
Object Widen ELFYAML relocation type to 32 bits 2014-11-27 17:20:48 +00:00
Other [lit] Parse all strings as UTF-8 rather than ASCII. 2014-09-12 16:46:05 +00:00
SymbolRewriter Transform: add SymbolRewriter pass 2014-11-07 21:32:08 +00:00
TableGen [AVX512] Added intrinsics for VPCMPEQB and VPCMPEQW. 2014-09-30 11:32:22 +00:00
tools Test all <build attribute, value> pairs. 2014-11-28 11:14:47 +00:00
Transforms PR21302. Vectorize only bottom-tested loops. 2014-12-02 22:59:06 +00:00
Unit Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming. 2014-07-04 05:11:55 +00:00
Verifier [Statepoints 1/4] Statepoint infrastructure for garbage collection: IR Intrinsics 2014-12-01 21:18:12 +00:00
YAMLParser [Support][YAML] Add support for accessing tags and tag handle substitution. 2013-10-18 22:38:04 +00:00
.clang-format Add .clang-format without column limit to subdirectory tests/. 2013-11-19 04:26:05 +00:00
CMakeLists.txt [OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module. 2014-12-01 19:50:39 +00:00
lit.cfg [OCaml] [cmake] Add CMake buildsystem for OCaml. 2014-12-01 19:50:23 +00:00
lit.site.cfg.in [OCaml] [autoconf] Migrate to ocamlfind. 2014-10-30 08:29:45 +00:00
Makefile OCAMLFLAGS can contain =, don't use = with sed 2014-11-13 09:29:30 +00:00
Makefile.tests Remove dead code from the makefile build system. 2013-07-25 20:25:31 +00:00
TestRunner.sh Use exec. 2010-08-29 14:49:00 +00:00