LLVM  7.0.0
AMDGPUTargetObjectFile.cpp
Go to the documentation of this file.
1 //===-- AMDGPUHSATargetObjectFile.cpp - AMDGPU Object Files ---------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "AMDGPUTargetObjectFile.h"
11 #include "AMDGPU.h"
12 #include "AMDGPUTargetMachine.h"
13 #include "Utils/AMDGPUBaseInfo.h"
14 #include "llvm/BinaryFormat/ELF.h"
15 #include "llvm/MC/MCContext.h"
16 #include "llvm/MC/MCSectionELF.h"
17 
18 using namespace llvm;
19 
20 //===----------------------------------------------------------------------===//
21 // Generic Object File
22 //===----------------------------------------------------------------------===//
23 
25  const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const {
26  if (Kind.isReadOnly() && AMDGPU::isReadOnlySegment(GO) &&
28  return TextSection;
29 
31 }
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition: MCSection.h:39
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
MCSection * TextSection
Section directive for standard text.
This file declares the AMDGPU-specific subclass of TargetLoweringObjectFile.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
bool isReadOnlySegment(const GlobalValue *GV)
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:23
const Triple & getTargetTriple() const
The AMDGPU TargetMachine interface definition for hw codgen targets.
bool isReadOnly() const
Definition: SectionKind.h:123
bool shouldEmitConstantsToTextSection(const Triple &TT)
const unsigned Kind
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:59