From 791cfc211a9801002bfda6b3eb4de7e041f04f53 Mon Sep 17 00:00:00 2001 From: Micah Villmow Date: Mon, 8 Oct 2012 16:39:34 +0000 Subject: Move TargetData to DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165403 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CodeGenerator.rst | 14 +++++++------- docs/GarbageCollection.html | 4 ++-- docs/LangRef.html | 2 +- docs/WritingAnLLVMBackend.html | 10 +++++----- docs/tutorial/LangImpl4.html | 6 +++--- docs/tutorial/LangImpl5.html | 4 ++-- docs/tutorial/LangImpl6.html | 4 ++-- docs/tutorial/LangImpl7.html | 6 +++--- docs/tutorial/OCamlLangImpl4.html | 4 ++-- docs/tutorial/OCamlLangImpl5.html | 2 +- docs/tutorial/OCamlLangImpl6.html | 2 +- docs/tutorial/OCamlLangImpl7.html | 4 ++-- 12 files changed, 31 insertions(+), 31 deletions(-) (limited to 'docs') diff --git a/docs/CodeGenerator.rst b/docs/CodeGenerator.rst index 72b12539cd..f387e7f4c5 100644 --- a/docs/CodeGenerator.rst +++ b/docs/CodeGenerator.rst @@ -81,7 +81,7 @@ Required components in the code generator The two pieces of the LLVM code generator are the high-level interface to the code generator and the set of reusable components that can be used to build target-specific backends. The two most important interfaces (:raw-html:`` -`TargetMachine`_ :raw-html:`` and :raw-html:`` `TargetData`_ +`TargetMachine`_ :raw-html:`` and :raw-html:`` `DataLayout`_ :raw-html:``) are the only ones that are required to be defined for a backend to fit into the LLVM system, but the others must be defined if the reusable code generator components are going to be used. @@ -197,7 +197,7 @@ any particular client. These classes are designed to capture the *abstract* properties of the target (such as the instructions and registers it has), and do not incorporate any particular pieces of code generation algorithms. -All of the target description classes (except the :raw-html:`` `TargetData`_ +All of the target description classes (except the :raw-html:`` `DataLayout`_ :raw-html:`` class) are designed to be subclassed by the concrete target implementation, and have virtual methods implemented. To get to these implementations, the :raw-html:`` `TargetMachine`_ :raw-html:`` class @@ -214,18 +214,18 @@ the ``get*Info`` methods (``getInstrInfo``, ``getRegisterInfo``, ``getFrameInfo``, etc.). This class is designed to be specialized by a concrete target implementation (e.g., ``X86TargetMachine``) which implements the various virtual methods. The only required target description class is the -:raw-html:`` `TargetData`_ :raw-html:`` class, but if the code +:raw-html:`` `DataLayout`_ :raw-html:`` class, but if the code generator components are to be used, the other interfaces should be implemented as well. -.. _TargetData: +.. _DataLayout: -The ``TargetData`` class +The ``DataLayout`` class ------------------------ -The ``TargetData`` class is the only required target description class, and it +The ``DataLayout`` class is the only required target description class, and it is the only class that is not extensible (you cannot derived a new class from -it). ``TargetData`` specifies information about how the target lays out memory +it). ``DataLayout`` specifies information about how the target lays out memory for structures, the alignment requirements for various data types, the size of pointers in the target, and whether the target is little-endian or big-endian. diff --git a/docs/GarbageCollection.html b/docs/GarbageCollection.html index 20f2c96a2b..5bc70f1bb0 100644 --- a/docs/GarbageCollection.html +++ b/docs/GarbageCollection.html @@ -1253,7 +1253,7 @@ methods. Here's a realistic example:

>#include "llvm/CodeGen/AsmPrinter.h" #include "llvm/Function.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetData.h" +#include "llvm/DataLayout.h" #include "llvm/Target/TargetAsmInfo.h" void MyGCPrinter::beginAssembly(std::ostream &OS, AsmPrinter &AP, @@ -1266,7 +1266,7 @@ void MyGCPrinter::finishAssembly(std::ostream &OS, AsmPrinter &AP, // Set up for emitting addresses. const char *AddressDirective; int AddressAlignLog; - if (AP.TM.getTargetData()->getPointerSize() == sizeof(int32_t)) { + if (AP.TM.getDataLayout()->getPointerSize() == sizeof(int32_t)) { AddressDirective = TAI.getData32bitsDirective(); AddressAlignLog = 2; } else { diff --git a/docs/LangRef.html b/docs/LangRef.html index 7ee1418f31..167397ff53 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -2104,7 +2104,7 @@ in signal handlers).

Structures may optionally be "packed" structures, which indicate that the alignment of the struct is one byte, and that there is no padding between the elements. In non-packed structs, padding between field types is inserted - as defined by the TargetData string in the module, which is required to match + as defined by the DataLayout string in the module, which is required to match what the underlying code generator expects.

Structures can either be "literal" or "identified". A literal structure is diff --git a/docs/WritingAnLLVMBackend.html b/docs/WritingAnLLVMBackend.html index 441d122f53..7576d490d7 100644 --- a/docs/WritingAnLLVMBackend.html +++ b/docs/WritingAnLLVMBackend.html @@ -314,14 +314,14 @@ represent target components. These methods are named get*Info, and are intended to obtain the instruction set (getInstrInfo), register set (getRegisterInfo), stack frame layout (getFrameInfo), and similar information. XXXTargetMachine must also implement the -getTargetData method to access an object with target-specific data +getDataLayout method to access an object with target-specific data characteristics, such as data type size and alignment requirements.

For instance, for the SPARC target, the header file SparcTargetMachine.h declares prototypes for several get*Info -and getTargetData methods that simply return a class member. +and getDataLayout methods that simply return a class member.

@@ -331,7 +331,7 @@ namespace llvm { class Module; class SparcTargetMachine : public LLVMTargetMachine { - const TargetData DataLayout; // Calculates type size & alignment + const DataLayout DataLayout; // Calculates type size & alignment SparcSubtarget Subtarget; SparcInstrInfo InstrInfo; TargetFrameInfo FrameInfo; @@ -348,7 +348,7 @@ public: virtual const TargetRegisterInfo *getRegisterInfo() const { return &InstrInfo.getRegisterInfo(); } - virtual const TargetData *getTargetData() const { return &DataLayout; } + virtual const DataLayout *getDataLayout() const { return &DataLayout; } static unsigned getModuleMatchQuality(const Module &M); // Pass Pipeline Configuration @@ -364,7 +364,7 @@ public:
  • getInstrInfo()
  • getRegisterInfo()
  • getFrameInfo()
  • -
  • getTargetData()
  • +
  • getDataLayout()
  • getSubtargetImpl()
  • diff --git a/docs/tutorial/LangImpl4.html b/docs/tutorial/LangImpl4.html index 453e43a02e..53695924b2 100644 --- a/docs/tutorial/LangImpl4.html +++ b/docs/tutorial/LangImpl4.html @@ -173,7 +173,7 @@ add a set of optimizations to run. The code looks like this:

    // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. - OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); + OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout())); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. @@ -523,7 +523,7 @@ at runtime.

    #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Analysis/Passes.h" -#include "llvm/Target/TargetData.h" +#include "llvm/DataLayout.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/TargetSelect.h" #include <cstdio> @@ -1103,7 +1103,7 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. - OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); + OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout())); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. diff --git a/docs/tutorial/LangImpl5.html b/docs/tutorial/LangImpl5.html index 2d406df3aa..768d9a0e11 100644 --- a/docs/tutorial/LangImpl5.html +++ b/docs/tutorial/LangImpl5.html @@ -901,7 +901,7 @@ clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Analysis/Passes.h" -#include "llvm/Target/TargetData.h" +#include "llvm/DataLayout.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/TargetSelect.h" #include <cstdio> @@ -1723,7 +1723,7 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. - OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); + OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout())); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. diff --git a/docs/tutorial/LangImpl6.html b/docs/tutorial/LangImpl6.html index a76298012f..bf502e7da9 100644 --- a/docs/tutorial/LangImpl6.html +++ b/docs/tutorial/LangImpl6.html @@ -840,7 +840,7 @@ library, although doing that will cause problems on Windows.

    #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Analysis/Passes.h" -#include "llvm/Target/TargetData.h" +#include "llvm/DataLayout.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/TargetSelect.h" #include <cstdio> @@ -1780,7 +1780,7 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. - OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); + OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout())); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html index 08c0c716b6..8fa99b1903 100644 --- a/docs/tutorial/LangImpl7.html +++ b/docs/tutorial/LangImpl7.html @@ -524,7 +524,7 @@ good codegen once again:

         // Set up the optimizer pipeline.  Start with registering info about how the
         // target lays out data structures.
    -    OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData()));
    +    OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout()));
         // Promote allocas to registers.
         OurFPM.add(createPromoteMemoryToRegisterPass());
         // Do simple "peephole" optimizations and bit-twiddling optzns.
    @@ -1008,7 +1008,7 @@ clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3
     #include "llvm/PassManager.h"
     #include "llvm/Analysis/Verifier.h"
     #include "llvm/Analysis/Passes.h"
    -#include "llvm/Target/TargetData.h"
    +#include "llvm/DataLayout.h"
     #include "llvm/Transforms/Scalar.h"
     #include "llvm/Support/TargetSelect.h"
     #include <cstdio>
    @@ -2113,7 +2113,7 @@ int main() {
     
       // Set up the optimizer pipeline.  Start with registering info about how the
       // target lays out data structures.
    -  OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData()));
    +  OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout()));
       // Provide basic AliasAnalysis support for GVN.
       OurFPM.add(createBasicAliasAnalysisPass());
       // Promote allocas to registers.
    diff --git a/docs/tutorial/OCamlLangImpl4.html b/docs/tutorial/OCamlLangImpl4.html
    index ca427eb0e0..eb97d986c2 100644
    --- a/docs/tutorial/OCamlLangImpl4.html
    +++ b/docs/tutorial/OCamlLangImpl4.html
    @@ -189,7 +189,7 @@ add a set of optimizations to run.  The code looks like this:

    (* Set up the optimizer pipeline. Start with registering info about how the * target lays out data structures. *) - TargetData.add (ExecutionEngine.target_data the_execution_engine) the_fpm; + DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm; (* Do simple "peephole" optimizations and bit-twiddling optzn. *) add_instruction_combining the_fpm; @@ -965,7 +965,7 @@ let main () = (* Set up the optimizer pipeline. Start with registering info about how the * target lays out data structures. *) - TargetData.add (ExecutionEngine.target_data the_execution_engine) the_fpm; + DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm; (* Do simple "peephole" optimizations and bit-twiddling optzn. *) add_instruction_combination the_fpm; diff --git a/docs/tutorial/OCamlLangImpl5.html b/docs/tutorial/OCamlLangImpl5.html index feeed6a533..d25f1dc9bb 100644 --- a/docs/tutorial/OCamlLangImpl5.html +++ b/docs/tutorial/OCamlLangImpl5.html @@ -1498,7 +1498,7 @@ let main () = (* Set up the optimizer pipeline. Start with registering info about how the * target lays out data structures. *) - TargetData.add (ExecutionEngine.target_data the_execution_engine) the_fpm; + DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm; (* Do simple "peephole" optimizations and bit-twiddling optzn. *) add_instruction_combination the_fpm; diff --git a/docs/tutorial/OCamlLangImpl6.html b/docs/tutorial/OCamlLangImpl6.html index 2ee5089721..56883d539b 100644 --- a/docs/tutorial/OCamlLangImpl6.html +++ b/docs/tutorial/OCamlLangImpl6.html @@ -1506,7 +1506,7 @@ let main () = (* Set up the optimizer pipeline. Start with registering info about how the * target lays out data structures. *) - TargetData.add (ExecutionEngine.target_data the_execution_engine) the_fpm; + DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm; (* Do simple "peephole" optimizations and bit-twiddling optzn. *) add_instruction_combination the_fpm; diff --git a/docs/tutorial/OCamlLangImpl7.html b/docs/tutorial/OCamlLangImpl7.html index d106ad0701..fd66b10c1a 100644 --- a/docs/tutorial/OCamlLangImpl7.html +++ b/docs/tutorial/OCamlLangImpl7.html @@ -545,7 +545,7 @@ let main () = (* Set up the optimizer pipeline. Start with registering info about how the * target lays out data structures. *) - TargetData.add (ExecutionEngine.target_data the_execution_engine) the_fpm; + DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm; (* Promote allocas to registers. *) add_memory_to_register_promotion the_fpm; @@ -1834,7 +1834,7 @@ let main () = (* Set up the optimizer pipeline. Start with registering info about how the * target lays out data structures. *) - TargetData.add (ExecutionEngine.target_data the_execution_engine) the_fpm; + DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm; (* Promote allocas to registers. *) add_memory_to_register_promotion the_fpm; -- cgit v1.2.3