mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
cf0b01d7ec
Add the Lanai backend to lib/Target. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html). Differential Revision: http://reviews.llvm.org/D17011 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264578 91177308-0d34-0410-b5e6-96231b3b80d8
47 lines
1.8 KiB
C++
47 lines
1.8 KiB
C++
//===-- LanaiTargetObjectFile.h - Lanai Object Info -----------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H
|
|
#define LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H
|
|
|
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
|
|
|
namespace llvm {
|
|
class LanaiTargetMachine;
|
|
class LanaiTargetObjectFile : public TargetLoweringObjectFileELF {
|
|
MCSection *SmallDataSection;
|
|
MCSection *SmallBSSSection;
|
|
|
|
public:
|
|
void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
|
|
|
|
/// Return true if this global address should be placed into small data/bss
|
|
/// section.
|
|
bool isGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM,
|
|
SectionKind Kind) const;
|
|
bool isGlobalInSmallSection(const GlobalValue *GV,
|
|
const TargetMachine &TM) const;
|
|
bool isGlobalInSmallSectionImpl(const GlobalValue *GV,
|
|
const TargetMachine &TM) const;
|
|
|
|
MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
|
Mangler &Mang,
|
|
const TargetMachine &TM) const override;
|
|
|
|
/// Return true if this constant should be placed into small data section.
|
|
bool isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const;
|
|
|
|
MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
|
|
const Constant *C,
|
|
unsigned &Align) const override;
|
|
};
|
|
} // end namespace llvm
|
|
|
|
#endif // LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H
|