llvm.org GIT mirror llvm / 1d9bacc
Use new SDIselParamAttr enumeration. This removes "magick" constants from formal attributes' flags processing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34963 91177308-0d34-0410-b5e6-96231b3b80d8 Anton Korobeynikov 13 years ago
4 changed file(s) with 13 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
2626 #include "llvm/CodeGen/MachineFunction.h"
2727 #include "llvm/CodeGen/MachineInstrBuilder.h"
2828 #include "llvm/CodeGen/SelectionDAG.h"
29 #include "llvm/CodeGen/SelectionDAGISel.h"
2930 #include "llvm/CodeGen/SSARegMap.h"
3031 #include "llvm/Target/TargetOptions.h"
3132 #include "llvm/ADT/VectorExtras.h"
345346 NeededGPRs = 0;
346347 StackPad = 0;
347348 GPRPad = 0;
348 unsigned align = (Flags >> 27);
349 unsigned align = (Flags >> SDISelParamFlags::OrigAlignmentOffs);
349350 GPRPad = NumGPRs % ((align + 3)/4);
350351 StackPad = StackOffset % align;
351352 unsigned firstGPR = NumGPRs + GPRPad;
3737
3838 /// CCIfInReg - If this argument is marked with the 'inreg' attribute, apply
3939 /// the specified action.
40 class CCIfInReg : CCIf<"ArgFlags & 2", A> {}
40 class CCIfInReg : CCIf<"ArgFlags & SDISelParamFlags::InReg", A> {}
4141
4242
4343 /// CCAssignToReg - This action matches if there is a register in the specified
2828 #include "llvm/CodeGen/MachineFunction.h"
2929 #include "llvm/CodeGen/MachineInstrBuilder.h"
3030 #include "llvm/CodeGen/SelectionDAG.h"
31 #include "llvm/CodeGen/SelectionDAGISel.h"
3132 #include "llvm/CodeGen/SSARegMap.h"
3233 #include "llvm/Support/MathExtras.h"
3334 #include "llvm/Target/TargetOptions.h"
664665 BytesToPopOnReturn = StackSize; // Callee pops everything..
665666 BytesCallerReserves = 0;
666667 } else {
667 BytesToPopOnReturn = 0; // Callee pops hidden struct pointer.
668 BytesToPopOnReturn = 0; // Callee pops nothing.
668669
669670 // If this is an sret function, the return should pop the hidden pointer.
670 if (NumArgs && (cast(Op.getOperand(3))->getValue() & 4))
671 if (NumArgs &&
672 (cast(Op.getOperand(3))->getValue() &
673 SDISelParamFlags::StructReturn))
671674 BytesToPopOnReturn = 4;
672675
673676 BytesCallerReserves = StackSize;
739742 }
740743
741744 // If the first argument is an sret pointer, remember it.
742 bool isSRet = NumOps &&(cast(Op.getOperand(6))->getValue()&4);
745 bool isSRet = NumOps &&
746 (cast(Op.getOperand(6))->getValue() &
747 SDISelParamFlags::StructReturn);
743748
744749 if (!MemOpChains.empty())
745750 Chain = DAG.getNode(ISD::TokenFactor, MVT::Other,
122122 } else if (Action->isSubClassOf("CCPromoteToType")) {
123123 Record *DestTy = Action->getValueAsDef("DestTy");
124124 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n";
125 O << IndentStr << "LocInfo = (ArgFlags & 1) ? CCValAssign::SExt"
126 << " : CCValAssign::ZExt;\n";
125 O << IndentStr << "LocInfo = (ArgFlags & SDISelParamFlags::Signed) ? \n"
126 << IndentStr << IndentStr << "CCValAssign::SExt : CCValAssign::ZExt;\n";
127127 } else {
128128 Action->dump();
129129 throw "Unknown CCAction!";