2012-05-04 20:18:50 +00:00
|
|
|
//===- NVPTXSection.h - NVPTX-specific section representation -*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares the NVPTXSection class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_NVPTX_NVPTXSECTION_H
|
|
|
|
#define LLVM_LIB_TARGET_NVPTX_NVPTXSECTION_H
|
2012-05-04 20:18:50 +00:00
|
|
|
|
2013-01-02 11:36:10 +00:00
|
|
|
#include "llvm/IR/GlobalVariable.h"
|
2012-12-04 07:12:27 +00:00
|
|
|
#include "llvm/MC/MCSection.h"
|
2012-05-04 20:18:50 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
/// NVPTXSection - Represents a section in PTX
|
|
|
|
/// PTX does not have sections. We create this class in order to use
|
|
|
|
/// the ASMPrint interface.
|
|
|
|
///
|
|
|
|
class NVPTXSection : public MCSection {
|
2013-11-19 00:57:56 +00:00
|
|
|
virtual void anchor();
|
2012-05-04 20:18:50 +00:00
|
|
|
public:
|
2015-03-27 15:01:40 +00:00
|
|
|
NVPTXSection(SectionVariant V, SectionKind K)
|
|
|
|
: MCSection(V, K, nullptr, /*Unique*/ false) {}
|
2013-11-19 00:57:56 +00:00
|
|
|
virtual ~NVPTXSection() {}
|
2012-05-04 20:18:50 +00:00
|
|
|
|
|
|
|
/// Override this as NVPTX has its own way of printing switching
|
|
|
|
/// to a section.
|
2014-04-29 07:57:44 +00:00
|
|
|
void PrintSwitchToSection(const MCAsmInfo &MAI,
|
|
|
|
raw_ostream &OS,
|
|
|
|
const MCExpr *Subsection) const override {}
|
2012-05-04 20:18:50 +00:00
|
|
|
|
|
|
|
/// Base address of PTX sections is zero.
|
2014-04-29 07:57:44 +00:00
|
|
|
bool UseCodeAlign() const override { return false; }
|
|
|
|
bool isVirtualSection() const override { return false; }
|
2012-05-04 20:18:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|