projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
R600/SI: Add support for i64 bitwise or
[oota-llvm.git]
/
lib
/
CodeGen
/
CallingConvLower.cpp
diff --git
a/lib/CodeGen/CallingConvLower.cpp
b/lib/CodeGen/CallingConvLower.cpp
index b2c976b2a5e36dd1f6f820b4f30c3a85c6a88ff4..fcfc9dcbf7c3fbe3835323252c5191cd8b72711c 100644
(file)
--- a/
lib/CodeGen/CallingConvLower.cpp
+++ b/
lib/CodeGen/CallingConvLower.cpp
@@
-14,17
+14,17
@@
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
+#include "llvm/IR/DataLayout.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetRegisterInfo.h"
-#include "llvm/Target/TargetData.h"
-#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetLowering.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetRegisterInfo.h"
using namespace llvm;
CCState::CCState(CallingConv::ID CC, bool isVarArg, MachineFunction &mf,
using namespace llvm;
CCState::CCState(CallingConv::ID CC, bool isVarArg, MachineFunction &mf,
- const TargetMachine &tm, SmallVector
<CCValAssign, 16
> &locs,
+ const TargetMachine &tm, SmallVector
Impl<CCValAssign
> &locs,
LLVMContext &C)
: CallingConv(CC), IsVarArg(isVarArg), MF(mf), TM(tm),
TRI(*TM.getRegisterInfo()), Locs(locs), Context(C),
LLVMContext &C)
: CallingConv(CC), IsVarArg(isVarArg), MF(mf), TM(tm),
TRI(*TM.getRegisterInfo()), Locs(locs), Context(C),
@@
-32,7
+32,7
@@
CCState::CCState(CallingConv::ID CC, bool isVarArg, MachineFunction &mf,
// No stack is used.
StackOffset = 0;
// No stack is used.
StackOffset = 0;
- clear
FirstByValReg
();
+ clear
ByValRegsInfo
();
UsedRegs.resize((TRI.getNumRegs()+31)/32);
}
UsedRegs.resize((TRI.getNumRegs()+31)/32);
}
@@
-49,9
+49,8
@@
void CCState::HandleByVal(unsigned ValNo, MVT ValVT,
Size = MinSize;
if (MinAlign > (int)Align)
Align = MinAlign;
Size = MinSize;
if (MinAlign > (int)Align)
Align = MinAlign;
- if (MF.getFrameInfo()->getMaxAlignment() < Align)
- MF.getFrameInfo()->setMaxAlignment(Align);
- TM.getTargetLowering()->HandleByVal(this, Size);
+ MF.getFrameInfo()->ensureMaxAlignment(Align);
+ TM.getTargetLowering()->HandleByVal(this, Size, Align);
unsigned Offset = AllocateStack(Size, Align);
addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo));
}
unsigned Offset = AllocateStack(Size, Align);
addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo));
}
@@
-75,7
+74,7
@@
CCState::AnalyzeFormalArguments(const SmallVectorImpl<ISD::InputArg> &Ins,
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
#ifndef NDEBUG
dbgs() << "Formal argument #" << i << " has unhandled type "
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
#ifndef NDEBUG
dbgs() << "Formal argument #" << i << " has unhandled type "
- << EVT(ArgVT).getEVTString();
+ << EVT(ArgVT).getEVTString()
<< '\n'
;
#endif
llvm_unreachable(0);
}
#endif
llvm_unreachable(0);
}
@@
-107,7
+106,7
@@
void CCState::AnalyzeReturn(const SmallVectorImpl<ISD::OutputArg> &Outs,
if (Fn(i, VT, VT, CCValAssign::Full, ArgFlags, *this)) {
#ifndef NDEBUG
dbgs() << "Return operand #" << i << " has unhandled type "
if (Fn(i, VT, VT, CCValAssign::Full, ArgFlags, *this)) {
#ifndef NDEBUG
dbgs() << "Return operand #" << i << " has unhandled type "
- << EVT(VT).getEVTString();
+ << EVT(VT).getEVTString()
<< '\n'
;
#endif
llvm_unreachable(0);
}
#endif
llvm_unreachable(0);
}
@@
-125,7
+124,7
@@
void CCState::AnalyzeCallOperands(const SmallVectorImpl<ISD::OutputArg> &Outs,
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
#ifndef NDEBUG
dbgs() << "Call operand #" << i << " has unhandled type "
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
#ifndef NDEBUG
dbgs() << "Call operand #" << i << " has unhandled type "
- << EVT(ArgVT).getEVTString();
+ << EVT(ArgVT).getEVTString()
<< '\n'
;
#endif
llvm_unreachable(0);
}
#endif
llvm_unreachable(0);
}
@@
-144,7
+143,7
@@
void CCState::AnalyzeCallOperands(SmallVectorImpl<MVT> &ArgVTs,
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
#ifndef NDEBUG
dbgs() << "Call operand #" << i << " has unhandled type "
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
#ifndef NDEBUG
dbgs() << "Call operand #" << i << " has unhandled type "
- << EVT(ArgVT).getEVTString();
+ << EVT(ArgVT).getEVTString()
<< '\n'
;
#endif
llvm_unreachable(0);
}
#endif
llvm_unreachable(0);
}
@@
-161,7
+160,7
@@
void CCState::AnalyzeCallResult(const SmallVectorImpl<ISD::InputArg> &Ins,
if (Fn(i, VT, VT, CCValAssign::Full, Flags, *this)) {
#ifndef NDEBUG
dbgs() << "Call result #" << i << " has unhandled type "
if (Fn(i, VT, VT, CCValAssign::Full, Flags, *this)) {
#ifndef NDEBUG
dbgs() << "Call result #" << i << " has unhandled type "
- << EVT(VT).getEVTString() <<
"\n"
;
+ << EVT(VT).getEVTString() <<
'\n'
;
#endif
llvm_unreachable(0);
}
#endif
llvm_unreachable(0);
}
@@
-174,7
+173,7
@@
void CCState::AnalyzeCallResult(MVT VT, CCAssignFn Fn) {
if (Fn(0, VT, VT, CCValAssign::Full, ISD::ArgFlagsTy(), *this)) {
#ifndef NDEBUG
dbgs() << "Call result has unhandled type "
if (Fn(0, VT, VT, CCValAssign::Full, ISD::ArgFlagsTy(), *this)) {
#ifndef NDEBUG
dbgs() << "Call result has unhandled type "
- << EVT(VT).getEVTString();
+ << EVT(VT).getEVTString()
<< '\n'
;
#endif
llvm_unreachable(0);
}
#endif
llvm_unreachable(0);
}