summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
committerpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
commitbdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch)
treec50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
parentPrint a 'p' flag for file descriptors that were opened after pledge(2). (diff)
downloadwireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz
wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h')
-rw-r--r--gnu/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/gnu/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
index 202e10058b7..a9b6073106e 100644
--- a/gnu/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
+++ b/gnu/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
@@ -16,6 +16,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineFunction.h"
+#include "llvm/CodeGen/TargetCallingConv.h"
namespace llvm {
@@ -113,6 +114,10 @@ class PPCFunctionInfo : public MachineFunctionInfo {
/// copies
bool IsSplitCSR = false;
+ /// We keep track attributes for each live-in virtual registers
+ /// to use SExt/ZExt flags in later optimization.
+ std::vector<std::pair<unsigned, ISD::ArgFlagsTy>> LiveInAttrs;
+
public:
explicit PPCFunctionInfo(MachineFunction &MF) : MF(MF) {}
@@ -175,6 +180,19 @@ public:
unsigned getVarArgsNumFPR() const { return VarArgsNumFPR; }
void setVarArgsNumFPR(unsigned Num) { VarArgsNumFPR = Num; }
+ /// This function associates attributes for each live-in virtual register.
+ void addLiveInAttr(unsigned VReg, ISD::ArgFlagsTy Flags) {
+ LiveInAttrs.push_back(std::make_pair(VReg, Flags));
+ }
+
+ /// This function returns true if the spesified vreg is
+ /// a live-in register and sign-extended.
+ bool isLiveInSExt(unsigned VReg) const;
+
+ /// This function returns true if the spesified vreg is
+ /// a live-in register and zero-extended.
+ bool isLiveInZExt(unsigned VReg) const;
+
int getCRSpillFrameIndex() const { return CRSpillFrameIndex; }
void setCRSpillFrameIndex(int idx) { CRSpillFrameIndex = idx; }