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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_NVPTXSECTION_H
|
|
|
|
#define LLVM_NVPTXSECTION_H
|
|
|
|
|
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:
|
|
|
|
NVPTXSection(SectionVariant V, SectionKind K) : MCSection(V, K) {}
|
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.
|
|
|
|
virtual void PrintSwitchToSection(const MCAsmInfo &MAI,
|
2013-04-17 21:18:16 +00:00
|
|
|
raw_ostream &OS,
|
|
|
|
const MCExpr *Subsection) const {}
|
2012-05-04 20:18:50 +00:00
|
|
|
|
|
|
|
/// Base address of PTX sections is zero.
|
|
|
|
virtual bool isBaseAddressKnownZero() const { return true; }
|
|
|
|
virtual bool UseCodeAlign() const { return false; }
|
|
|
|
virtual bool isVirtualSection() const { return false; }
|
2012-12-13 03:00:35 +00:00
|
|
|
virtual std::string getLabelBeginName() const { return ""; }
|
|
|
|
virtual std::string getLabelEndName() const { return ""; }
|
2012-05-04 20:18:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|