[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / Hexagon / HexagonTargetObjectFile.h
blob550aac72346f3df4005ba08a8a18f6c44873eb81
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
13 #include "llvm/MC/MCSectionELF.h"
15 namespace llvm {
16 class Type;
18 class HexagonTargetObjectFile : public TargetLoweringObjectFileELF {
19 public:
20 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
22 MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
23 const TargetMachine &TM) const override;
25 MCSection *getExplicitSectionGlobal(const GlobalObject *GO,
26 SectionKind Kind,
27 const TargetMachine &TM) const override;
29 bool isGlobalInSmallSection(const GlobalObject *GO,
30 const TargetMachine &TM) const;
32 bool isSmallDataEnabled(const TargetMachine &TM) const;
34 unsigned getSmallDataSize() const;
36 bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
37 const Function &F) const override;
39 const Function *getLutUsedFunction(const GlobalObject *GO) const;
41 private:
42 MCSectionELF *SmallDataSection;
43 MCSectionELF *SmallBSSSection;
45 unsigned getSmallestAddressableSize(const Type *Ty, const GlobalValue *GV,
46 const TargetMachine &TM) const;
48 MCSection *selectSmallSectionForGlobal(const GlobalObject *GO,
49 SectionKind Kind,
50 const TargetMachine &TM) const;
52 MCSection *selectSectionForLookupTable(const GlobalObject *GO,
53 const TargetMachine &TM,
54 const Function *Fn) const;
57 } // namespace llvm
59 #endif