diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
commit | 01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch) | |
tree | 4def12e759965de927d963ac65840d663ef9d1ea /lib/Target/Hexagon/HexagonTargetObjectFile.h | |
parent | f0f4822ed4b66e3579e92a89f368f8fb860e218e (diff) |
Diffstat (limited to 'lib/Target/Hexagon/HexagonTargetObjectFile.h')
-rw-r--r-- | lib/Target/Hexagon/HexagonTargetObjectFile.h | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/lib/Target/Hexagon/HexagonTargetObjectFile.h b/lib/Target/Hexagon/HexagonTargetObjectFile.h index da0eeeb3fd280..cbc00da88c589 100644 --- a/lib/Target/Hexagon/HexagonTargetObjectFile.h +++ b/lib/Target/Hexagon/HexagonTargetObjectFile.h @@ -1,4 +1,4 @@ -//===-- HexagonTargetAsmInfo.h - Hexagon asm properties --------*- C++ -*--===// +//===-- HexagonTargetObjectFile.h -----------------------------------------===// // // The LLVM Compiler Infrastructure // @@ -16,24 +16,31 @@ namespace llvm { class HexagonTargetObjectFile : public TargetLoweringObjectFileELF { - MCSectionELF *SmallDataSection; - MCSectionELF *SmallBSSSection; - public: void Initialize(MCContext &Ctx, const TargetMachine &TM) override; - /// IsGlobalInSmallSection - Return true if this global address should be - /// placed into small data/bss section. - bool IsGlobalInSmallSection(const GlobalValue *GV, - const TargetMachine &TM, - SectionKind Kind) const; - bool IsGlobalInSmallSection(const GlobalValue *GV, - const TargetMachine &TM) const; - - bool IsSmallDataEnabled () const; MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, - const TargetMachine &TM) const override; + Mangler &Mang, const TargetMachine &TM) const override; + + MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, + Mangler &Mang, const TargetMachine &TM) const override; + + bool isGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM) + const; + + bool isSmallDataEnabled() const; + + unsigned getSmallDataSize() const; + + private: + MCSectionELF *SmallDataSection; + MCSectionELF *SmallBSSSection; + + unsigned getSmallestAddressableSize(const Type *Ty, const GlobalValue *GV, + const TargetMachine &TM) const; + + MCSection *selectSmallSectionForGlobal(const GlobalValue *GV, + SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const; }; } // namespace llvm |