LLVM  8.0.1
LanaiTargetObjectFile.h
Go to the documentation of this file.
1 //===-- LanaiTargetObjectFile.h - Lanai Object Info -----------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H
11 #define LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H
12 
14 
15 namespace llvm {
16 class LanaiTargetMachine;
18  MCSection *SmallDataSection;
19  MCSection *SmallBSSSection;
20 
21  bool isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM,
22  SectionKind Kind) const;
23  bool isGlobalInSmallSectionImpl(const GlobalObject *GO,
24  const TargetMachine &TM) const;
25 
26 public:
27  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
28 
29  /// Return true if this global address should be placed into small data/bss
30  /// section.
31  bool isGlobalInSmallSection(const GlobalObject *GO,
32  const TargetMachine &TM) const;
33 
35  const TargetMachine &TM) const override;
36 
37  /// Return true if this constant should be placed into small data section.
38  bool isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const;
39 
41  const Constant *C,
42  unsigned &Align) const override;
43 };
44 } // end namespace llvm
45 
46 #endif // LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H
uint64_t CallInst * C
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition: MCSection.h:39
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:111
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Context object for machine code objects.
Definition: MCContext.h:63
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
This is an important base class in LLVM.
Definition: Constant.h:42
bool isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const
Return true if this constant should be placed into small data section.
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:23
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const override
Given a constant with the SectionKind, return a section that it should be placed in.
const unsigned Kind
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:59