LLVM
4.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
llvm.src
lib
Target
PowerPC
PPCMachineFunctionInfo.cpp
Go to the documentation of this file.
1
//===-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --------===//
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 "
PPCMachineFunctionInfo.h
"
11
#include "
llvm/IR/DataLayout.h
"
12
#include "
llvm/MC/MCContext.h
"
13
#include "
llvm/Target/TargetMachine.h
"
14
#include "
llvm/Target/TargetSubtargetInfo.h
"
15
16
using namespace
llvm;
17
18
void
PPCFunctionInfo::anchor() { }
19
20
MCSymbol
*
PPCFunctionInfo::getPICOffsetSymbol
()
const
{
21
const
DataLayout
&DL = MF.
getDataLayout
();
22
return
MF.
getContext
().
getOrCreateSymbol
(
Twine
(DL.
getPrivateGlobalPrefix
()) +
23
Twine
(MF.
getFunctionNumber
()) +
24
"$poff"
);
25
}
26
27
MCSymbol
*
PPCFunctionInfo::getGlobalEPSymbol
()
const
{
28
const
DataLayout
&DL = MF.
getDataLayout
();
29
return
MF.
getContext
().
getOrCreateSymbol
(
Twine
(DL.
getPrivateGlobalPrefix
()) +
30
"func_gep"
+
31
Twine
(MF.
getFunctionNumber
()));
32
}
33
34
MCSymbol
*
PPCFunctionInfo::getLocalEPSymbol
()
const
{
35
const
DataLayout
&DL = MF.
getDataLayout
();
36
return
MF.
getContext
().
getOrCreateSymbol
(
Twine
(DL.
getPrivateGlobalPrefix
()) +
37
"func_lep"
+
38
Twine
(MF.
getFunctionNumber
()));
39
}
40
41
MCSymbol
*
PPCFunctionInfo::getTOCOffsetSymbol
()
const
{
42
const
DataLayout
&DL = MF.
getDataLayout
();
43
return
MF.
getContext
().
getOrCreateSymbol
(
Twine
(DL.
getPrivateGlobalPrefix
()) +
44
"func_toc"
+
45
Twine
(MF.
getFunctionNumber
()));
46
}
TargetSubtargetInfo.h
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it. ...
Definition:
DataLayout.h:102
llvm::DataLayout::getPrivateGlobalPrefix
StringRef getPrivateGlobalPrefix() const
Definition:
DataLayout.h:284
MCContext.h
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition:
MCSymbol.h:39
DataLayout.h
TargetMachine.h
llvm::MachineFunction::getFunctionNumber
unsigned getFunctionNumber() const
getFunctionNumber - Return a unique ID for the current function.
Definition:
MachineFunction.h:362
llvm::PPCFunctionInfo::getGlobalEPSymbol
MCSymbol * getGlobalEPSymbol() const
Definition:
PPCMachineFunctionInfo.cpp:27
PPCMachineFunctionInfo.h
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition:
Twine.h:81
llvm::PPCFunctionInfo::getTOCOffsetSymbol
MCSymbol * getTOCOffsetSymbol() const
Definition:
PPCMachineFunctionInfo.cpp:41
llvm::MachineFunction::getContext
MCContext & getContext() const
Definition:
MachineFunction.h:345
llvm::MachineFunction::getDataLayout
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
Definition:
MachineFunction.cpp:198
llvm::PPCFunctionInfo::getLocalEPSymbol
MCSymbol * getLocalEPSymbol() const
Definition:
PPCMachineFunctionInfo.cpp:34
llvm::MCContext::getOrCreateSymbol
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
Definition:
MCContext.cpp:114
llvm::PPCFunctionInfo::getPICOffsetSymbol
MCSymbol * getPICOffsetSymbol() const
Definition:
PPCMachineFunctionInfo.cpp:20
Generated on Wed Mar 8 2017 17:19:49 for LLVM by
1.8.6