[CodeGen] Introduce a FAULTING_LOAD_OP pseudo-op.

Summary:
This instruction encodes a loading operation that may fault, and a label
to branch to if the load page-faults.  The locations of potentially
faulting loads and their "handler" destinations are recorded in a
FaultMap section, meant to be consumed by LLVM's clients.

Nothing generates FAULTING_LOAD_OP instructions yet, but they will be
used in a future change.

The documentation (FaultMaps.rst) needs improvement and I will update
this diff with a more expanded version shortly.

Depends on D10196

Reviewers: rnk, reames, AndyAyers, ab, atrick, pgavlin

Reviewed By: atrick, pgavlin

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjoy Das
2015-06-15 18:44:08 +00:00
parent 36395e7598
commit 1991e2a4df
12 changed files with 299 additions and 3 deletions

View File

@@ -139,6 +139,9 @@ protected:
/// StackMap section.
MCSection *StackMapSection;
/// FaultMap section.
MCSection *FaultMapSection;
/// EH frame section.
///
/// It is initialized on demand so it can be overwritten (with uniquing).
@@ -262,6 +265,7 @@ public:
MCSection *getTLSBSSSection() const { return TLSBSSSection; }
MCSection *getStackMapSection() const { return StackMapSection; }
MCSection *getFaultMapSection() const { return FaultMapSection; }
// ELF specific sections.
MCSection *getDataRelSection() const { return DataRelSection; }