LLVM
15.0.0git
lib
Target
Hexagon
HexagonTargetObjectFile.h
Go to the documentation of this file.
1
//===-- HexagonTargetObjectFile.h -----------------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H
10
#define LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H
11
12
#include "
llvm/CodeGen/TargetLoweringObjectFileImpl.h
"
13
#include "
llvm/MC/MCSectionELF.h
"
14
15
namespace
llvm
{
16
class
Type
;
17
18
class
HexagonTargetObjectFile
:
public
TargetLoweringObjectFileELF
{
19
public
:
20
void
Initialize
(
MCContext
&Ctx,
const
TargetMachine
&
TM
)
override
;
21
22
MCSection
*
SelectSectionForGlobal
(
const
GlobalObject
*GO,
SectionKind
Kind
,
23
const
TargetMachine
&
TM
)
const override
;
24
25
MCSection
*
getExplicitSectionGlobal
(
const
GlobalObject
*GO,
26
SectionKind
Kind
,
27
const
TargetMachine
&
TM
)
const override
;
28
29
bool
isGlobalInSmallSection
(
const
GlobalObject
*GO,
30
const
TargetMachine
&
TM
)
const
;
31
32
bool
isSmallDataEnabled
(
const
TargetMachine
&
TM
)
const
;
33
34
unsigned
getSmallDataSize
()
const
;
35
36
bool
shouldPutJumpTableInFunctionSection
(
bool
UsesLabelDifference,
37
const
Function
&
F
)
const override
;
38
39
const
Function
*
getLutUsedFunction
(
const
GlobalObject
*GO)
const
;
40
41
private
:
42
MCSectionELF
*SmallDataSection;
43
MCSectionELF
*SmallBSSSection;
44
45
unsigned
getSmallestAddressableSize(
const
Type
*Ty,
const
GlobalValue
*GV,
46
const
TargetMachine
&
TM
)
const
;
47
48
MCSection
*selectSmallSectionForGlobal(
const
GlobalObject
*GO,
49
SectionKind
Kind
,
50
const
TargetMachine
&
TM
)
const
;
51
52
MCSection
*selectSectionForLookupTable(
const
GlobalObject
*GO,
53
const
TargetMachine
&
TM
,
54
const
Function
*Fn)
const
;
55
};
56
57
}
// namespace llvm
58
59
#endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
llvm::MCContext
Context object for machine code objects.
Definition:
MCContext.h:74
llvm::Function
Definition:
Function.h:60
MCSectionELF.h
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition:
Type.h:45
llvm::TargetLoweringObjectFileELF
Definition:
TargetLoweringObjectFileImpl.h:34
llvm::HexagonTargetObjectFile::isGlobalInSmallSection
bool isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const
Return true if this global value should be placed into small data/bss section.
Definition:
HexagonTargetObjectFile.cpp:198
llvm::MCSectionELF
This represents a section on linux, lots of unix variants and some bare metal systems.
Definition:
MCSectionELF.h:26
llvm::HexagonTargetObjectFile
Definition:
HexagonTargetObjectFile.h:18
F
#define F(x, y, z)
Definition:
MD5.cpp:55
llvm::GlobalObject
Definition:
GlobalObject.h:27
llvm::HexagonTargetObjectFile::Initialize
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
Definition:
HexagonTargetObjectFile.cpp:112
llvm::HexagonTargetObjectFile::getSmallDataSize
unsigned getSmallDataSize() const
Definition:
HexagonTargetObjectFile.cpp:276
llvm::lltok::Kind
Kind
Definition:
LLToken.h:18
llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection
bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, const Function &F) const override
Definition:
HexagonTargetObjectFile.cpp:280
llvm::TargetLoweringObjectFile::TM
const TargetMachine * TM
Definition:
TargetLoweringObjectFile.h:68
llvm::GlobalValue
Definition:
GlobalValue.h:44
TemplateParamKind::Type
@ Type
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition:
TargetMachine.h:77
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition:
MCSection.h:39
llvm::HexagonTargetObjectFile::getExplicitSectionGlobal
MCSection * getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Targets should implement this method to assign a section to globals with an explicit section specfied...
Definition:
HexagonTargetObjectFile.cpp:164
llvm::HexagonTargetObjectFile::isSmallDataEnabled
bool isSmallDataEnabled(const TargetMachine &TM) const
Definition:
HexagonTargetObjectFile.cpp:271
llvm::SectionKind
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition:
SectionKind.h:22
llvm::HexagonTargetObjectFile::getLutUsedFunction
const Function * getLutUsedFunction(const GlobalObject *GO) const
Definition:
HexagonTargetObjectFile.cpp:431
llvm::HexagonTargetObjectFile::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition:
HexagonTargetObjectFile.cpp:126
TargetLoweringObjectFileImpl.h
Generated on Sat May 28 2022 03:15:06 for LLVM by
1.8.17