LLVM 24.0.0git
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
14
15namespace llvm {
16 class Type;
17
19 public:
20 void initialize(MCContext &Ctx, const TargetMachine &TM,
21 const Module &M) override;
22
24 const TargetMachine &TM) const override;
25
27 SectionKind Kind,
28 const TargetMachine &TM) const override;
29
31 const TargetMachine &TM) const;
32
33 bool isSmallDataEnabled(const TargetMachine &TM) const;
34
35 unsigned getSmallDataSize() const;
36
37 bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
38 const Function &F) const override;
39
40 const Function *getLutUsedFunction(const GlobalObject *GO) const;
41
42 private:
43 MCSectionELF *SmallDataSection;
44 MCSectionELF *SmallBSSSection;
45
46 unsigned getSmallestAddressableSize(const Type *Ty, const GlobalValue *GV,
47 const TargetMachine &TM) const;
48
49 MCSection *selectSmallSectionForGlobal(const GlobalObject *GO,
50 SectionKind Kind,
51 const TargetMachine &TM) const;
52
53 MCSection *selectSectionForLookupTable(const GlobalObject *GO,
54 const TargetMachine &TM,
55 const Function *Fn) const;
56 };
57
58} // namespace llvm
59
60#endif
#define F(x, y, z)
Definition MD5.cpp:54
bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, const Function &F) const override
bool isSmallDataEnabled(const TargetMachine &TM) const
void initialize(MCContext &Ctx, const TargetMachine &TM, const Module &M) override
This method must be called before any actual lowering is done.
bool isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const
Return true if this global value should be placed into small data/bss section.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
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...
const Function * getLutUsedFunction(const GlobalObject *GO) const
Context object for machine code objects.
Definition MCContext.h:83
This represents a section on linux, lots of unix variants and some bare metal systems.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition MCSection.h:580
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition SectionKind.h:22
Primary interface to the complete machine description for the target machine.
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:46
This is an optimization pass for GlobalISel generic memory operations.