LLVM  5.0.0
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/ADT/Twine.h"
12 #include "llvm/IR/DataLayout.h"
13 #include "llvm/MC/MCContext.h"
14 
15 using namespace llvm;
16 
17 void PPCFunctionInfo::anchor() {}
18 
20  const DataLayout &DL = MF.getDataLayout();
22  Twine(MF.getFunctionNumber()) +
23  "$poff");
24 }
25 
27  const DataLayout &DL = MF.getDataLayout();
29  "func_gep" +
30  Twine(MF.getFunctionNumber()));
31 }
32 
34  const DataLayout &DL = MF.getDataLayout();
36  "func_lep" +
37  Twine(MF.getFunctionNumber()));
38 }
39 
41  const DataLayout &DL = MF.getDataLayout();
43  "func_toc" +
44  Twine(MF.getFunctionNumber()));
45 }
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:109
StringRef getPrivateGlobalPrefix() const
Definition: DataLayout.h:281
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:42
DataLayout DL
unsigned getFunctionNumber() const
getFunctionNumber - Return a unique ID for the current function.
MCSymbol * getGlobalEPSymbol() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
MCSymbol * getTOCOffsetSymbol() const
MCContext & getContext() const
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
MCSymbol * getLocalEPSymbol() const
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
Definition: MCContext.cpp:121
MCSymbol * getPICOffsetSymbol() const