On the day of the fifty LLVM LLVM backend document parsing 3 - goal description class

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/snsn1984/article/details/90341146

Arts and clearly most of the former six, seven correspondence between links and seven steps. So we are going to go in-depth analysis: Target the Description classes : abstract target the Description in the interfaces (Code Address: include / llvm / Target /) .

Target description classes of features the following main points:

1, Target description classes, most of the first six most LLVM backend, the main goal is to provide an abstract description of the machine, is not dependent on any particular client.

2, Target description classes included in the class, the abstract is designed to capture the performance of the target, and the specific code generation algorithm nothing.

3, all of the Target description classes (except DataLayout), it is designed to do (to achieve specific objectives achieved subclasses of these classes) of the parent class implementation specific goals, the implementation of these classes are virtual functions implemented of.

4, TargetMachine initial entry class is a complete machine target machine described, all the information may be acquired through the interface specific target. (Primary interface to the complete machine description for the target machine. All target-specific information should be accessible through this interface.) This class consists of a series of get * Info virtual functions, in order to obtain information on the target machine, these virtual functions in the concrete realization of the target machine will do the implementation.

To sum up, in all Target description classes in, TargetMachine and DataLayout is special. TargetMachine is to visit a specific target machine to achieve the initial entry, the interface contains a large number of target machines can access specific information. Target description classes and class DataLayout is the only non-expandable, stored in the include / llvm / IR / DataLayout.h. Specific code: DataLayout.h

In Target description classes in addition TargetMachine and DataLayout than two special classes, there are the following classes:

TargetLowering (include/llvm/Codegen/TargetLowering.h)

TargetRegisterInfo (include/llvm/CodeGen/TargetRegisterInfo.h)

TargetInstrInfo (include/llvm/CodeGen/TargetInstrInfo.h)

TargetFrameLowering (include/llvm/CodeGen/TargetFrameLowering.h)

TargetSubtarget (TargetSubtarget currently has no class, only TargetSubtargetInfo category, address: include / llvm / CodeGen / TargetSubtargetInfo.h )

TargetJITInfo (now no TargetJITInfo category)

---------------------------------------------------------------------------------------

Note! Note! Note!

Document does not keep up with the latest code changes. So, we mentioned Target description classes of code address: include / llvm / Target /, has been completely applied. We are still here in addition to TargetMachine class, other classes already have changed place. Most moved to under the category include / llvm / CodeGen / directory, submitted node: rL318490  .

 


related information:

Little angel his father: LLVM daily talk of thirty-seven LLVM backend Profile (Hangzhou Share PPT)

Little angel his father: LLVM daily talk of forty-seven LLVM backend document parsing

Little angel his father: LLVM talk about the daily forty-eight LLVM backend document parsing 1

Little angel his father: LLVM talk about the daily forty-nine LLVM backend document parsing 2

 

Guess you like

Origin blog.csdn.net/snsn1984/article/details/90341146