2012-05-04 22:18:50 +02: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 12:36:10 +01:00
|
|
|
#include "llvm/IR/GlobalVariable.h"
|
2012-12-04 08:12:27 +01:00
|
|
|
#include "llvm/MC/MCSection.h"
|
2012-05-04 22:18:50 +02: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 01:57:56 +01:00
|
|
|
virtual void anchor();
|
2012-05-04 22:18:50 +02:00
|
|
|
public:
|
|
|
|
NVPTXSection(SectionVariant V, SectionKind K) : MCSection(V, K) {}
|
2013-11-19 01:57:56 +01:00
|
|
|
virtual ~NVPTXSection() {}
|
2012-05-04 22:18:50 +02:00
|
|
|
|
|
|
|
/// Override this as NVPTX has its own way of printing switching
|
|
|
|
/// to a section.
|
|
|
|
virtual void PrintSwitchToSection(const MCAsmInfo &MAI,
|
2013-04-17 23:18:16 +02:00
|
|
|
raw_ostream &OS,
|
|
|
|
const MCExpr *Subsection) const {}
|
2012-05-04 22:18:50 +02: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 04:00:35 +01:00
|
|
|
virtual std::string getLabelBeginName() const { return ""; }
|
|
|
|
virtual std::string getLabelEndName() const { return ""; }
|
2012-05-04 22:18:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|