LLVM  14.0.0git
RISCVTargetObjectFile.h
Go to the documentation of this file.
1 //===-- RISCVTargetObjectFile.h - RISCV Object Info -*- C++ ---------*-===//
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_RISCV_RISCVTARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_RISCV_RISCVTARGETOBJECTFILE_H
11 
13 
14 namespace llvm {
15 
16 /// This implementation is used for RISCV ELF targets.
18  MCSection *SmallDataSection;
19  MCSection *SmallBSSSection;
20  unsigned SSThreshold = 8;
21 
22 public:
23  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
24 
25  /// Return true if this global address should be placed into small data/bss
26  /// section.
27  bool isGlobalInSmallSection(const GlobalObject *GO,
28  const TargetMachine &TM) const;
29 
31  const TargetMachine &TM) const override;
32 
33  /// Return true if this constant should be placed into small data section.
34  bool isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const;
35 
37  const Constant *C,
38  Align &Alignment) const override;
39 
40  void getModuleMetadata(Module &M) override;
41 
42  bool isInSmallSection(uint64_t Size) const;
43 };
44 
45 } // end namespace llvm
46 
47 #endif
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:112
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:72
llvm::RISCVELFTargetObjectFile::getModuleMetadata
void getModuleMetadata(Module &M) override
Get the module-level metadata that the platform cares about.
Definition: RISCVTargetObjectFile.cpp:86
llvm::RISCVELFTargetObjectFile::Initialize
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
Definition: RISCVTargetObjectFile.cpp:17
llvm::TargetLoweringObjectFileELF
Definition: TargetLoweringObjectFileImpl.h:33
llvm::RISCVELFTargetObjectFile::isGlobalInSmallSection
bool isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const
Return true if this global address should be placed into small data/bss section.
Definition: RISCVTargetObjectFile.cpp:38
llvm::RISCVELFTargetObjectFile
This implementation is used for RISCV ELF targets.
Definition: RISCVTargetObjectFile.h:17
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::GlobalObject
Definition: GlobalObject.h:28
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::TargetLoweringObjectFile::TM
const TargetMachine * TM
Definition: TargetLoweringObjectFile.h:66
llvm::Constant
This is an important base class in LLVM.
Definition: Constant.h:41
llvm::RISCVELFTargetObjectFile::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: RISCVTargetObjectFile.cpp:74
uint64_t
llvm::RISCVELFTargetObjectFile::getSectionForConstant
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
Definition: RISCVTargetObjectFile.cpp:106
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:79
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:67
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
llvm::SectionKind
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:22
llvm::RISCVELFTargetObjectFile::isInSmallSection
bool isInSmallSection(uint64_t Size) const
Definition: RISCVTargetObjectFile.cpp:30
llvm::RISCVELFTargetObjectFile::isConstantInSmallSection
bool isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const
Return true if this constant should be placed into small data section.
Definition: RISCVTargetObjectFile.cpp:101
TargetLoweringObjectFileImpl.h