diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-19 07:18:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-19 07:18:57 +0000 |
commit | 034b94b17006f51722886b0f2283fb6fb19aca1f (patch) | |
tree | e42e091c12137e9599d0e58bfa4336c4af7333b3 /lib/CodeGen/SelectionDAG | |
parent | 85022561f9c78446bbc5f745cd9b58f4e5dc92ec (diff) |
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 36 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 12 |
3 files changed, 27 insertions, 27 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 2375182167..74127fe02c 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3546,7 +3546,7 @@ static SDValue getMemcpyLoadsAndStores(SelectionDAG &DAG, DebugLoc dl, MachineFrameInfo *MFI = MF.getFrameInfo(); bool OptSize = MF.getFunction()->getFnAttributes(). - hasAttribute(Attributes::OptimizeForSize); + hasAttribute(Attribute::OptimizeForSize); FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(Dst); if (FI && !MFI->isFixedObjectIndex(FI->getIndex())) DstAlignCanChange = true; @@ -3652,7 +3652,7 @@ static SDValue getMemmoveLoadsAndStores(SelectionDAG &DAG, DebugLoc dl, MachineFunction &MF = DAG.getMachineFunction(); MachineFrameInfo *MFI = MF.getFrameInfo(); bool OptSize = MF.getFunction()->getFnAttributes(). - hasAttribute(Attributes::OptimizeForSize); + hasAttribute(Attribute::OptimizeForSize); FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(Dst); if (FI && !MFI->isFixedObjectIndex(FI->getIndex())) DstAlignCanChange = true; @@ -3731,7 +3731,7 @@ static SDValue getMemsetStores(SelectionDAG &DAG, DebugLoc dl, MachineFunction &MF = DAG.getMachineFunction(); MachineFrameInfo *MFI = MF.getFrameInfo(); bool OptSize = MF.getFunction()->getFnAttributes(). - hasAttribute(Attributes::OptimizeForSize); + hasAttribute(Attribute::OptimizeForSize); FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(Dst); if (FI && !MFI->isFixedObjectIndex(FI->getIndex())) DstAlignCanChange = true; diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 3a653474b0..13f9d27d4f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -1229,9 +1229,9 @@ void SelectionDAGBuilder::visitRet(const ReturnInst &I) { ISD::NodeType ExtendKind = ISD::ANY_EXTEND; const Function *F = I.getParent()->getParent(); - if (F->getRetAttributes().hasAttribute(Attributes::SExt)) + if (F->getRetAttributes().hasAttribute(Attribute::SExt)) ExtendKind = ISD::SIGN_EXTEND; - else if (F->getRetAttributes().hasAttribute(Attributes::ZExt)) + else if (F->getRetAttributes().hasAttribute(Attribute::ZExt)) ExtendKind = ISD::ZERO_EXTEND; if (ExtendKind != ISD::ANY_EXTEND && VT.isInteger()) @@ -1246,7 +1246,7 @@ void SelectionDAGBuilder::visitRet(const ReturnInst &I) { // 'inreg' on function refers to return value ISD::ArgFlagsTy Flags = ISD::ArgFlagsTy(); - if (F->getRetAttributes().hasAttribute(Attributes::InReg)) + if (F->getRetAttributes().hasAttribute(Attribute::InReg)) Flags.setInReg(); // Propagate extension type if any @@ -4292,7 +4292,7 @@ static SDValue ExpandPowI(DebugLoc DL, SDValue LHS, SDValue RHS, return DAG.getConstantFP(1.0, LHS.getValueType()); const Function *F = DAG.getMachineFunction().getFunction(); - if (!F->getFnAttributes().hasAttribute(Attributes::OptimizeForSize) || + if (!F->getFnAttributes().hasAttribute(Attribute::OptimizeForSize) || // If optimizing for size, don't insert too many multiplies. This // inserts up to 5 multiplies. CountPopulation_32(Val)+Log2_32(Val) < 7) { @@ -5235,12 +5235,12 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee, Entry.Node = ArgNode; Entry.Ty = V->getType(); unsigned attrInd = i - CS.arg_begin() + 1; - Entry.isSExt = CS.paramHasAttr(attrInd, Attributes::SExt); - Entry.isZExt = CS.paramHasAttr(attrInd, Attributes::ZExt); - Entry.isInReg = CS.paramHasAttr(attrInd, Attributes::InReg); - Entry.isSRet = CS.paramHasAttr(attrInd, Attributes::StructRet); - Entry.isNest = CS.paramHasAttr(attrInd, Attributes::Nest); - Entry.isByVal = CS.paramHasAttr(attrInd, Attributes::ByVal); + Entry.isSExt = CS.paramHasAttr(attrInd, Attribute::SExt); + Entry.isZExt = CS.paramHasAttr(attrInd, Attribute::ZExt); + Entry.isInReg = CS.paramHasAttr(attrInd, Attribute::InReg); + Entry.isSRet = CS.paramHasAttr(attrInd, Attribute::StructRet); + Entry.isNest = CS.paramHasAttr(attrInd, Attribute::Nest); + Entry.isByVal = CS.paramHasAttr(attrInd, Attribute::ByVal); Entry.Alignment = CS.getParamAlignment(attrInd); Args.push_back(Entry); } @@ -6611,15 +6611,15 @@ void SelectionDAGISel::LowerArguments(const BasicBlock *LLVMBB) { unsigned OriginalAlignment = TD->getABITypeAlignment(ArgTy); - if (F.getParamAttributes(Idx).hasAttribute(Attributes::ZExt)) + if (F.getParamAttributes(Idx).hasAttribute(Attribute::ZExt)) Flags.setZExt(); - if (F.getParamAttributes(Idx).hasAttribute(Attributes::SExt)) + if (F.getParamAttributes(Idx).hasAttribute(Attribute::SExt)) Flags.setSExt(); - if (F.getParamAttributes(Idx).hasAttribute(Attributes::InReg)) + if (F.getParamAttributes(Idx).hasAttribute(Attribute::InReg)) Flags.setInReg(); - if (F.getParamAttributes(Idx).hasAttribute(Attributes::StructRet)) + if (F.getParamAttributes(Idx).hasAttribute(Attribute::StructRet)) Flags.setSRet(); - if (F.getParamAttributes(Idx).hasAttribute(Attributes::ByVal)) { + if (F.getParamAttributes(Idx).hasAttribute(Attribute::ByVal)) { Flags.setByVal(); PointerType *Ty = cast<PointerType>(I->getType()); Type *ElementTy = Ty->getElementType(); @@ -6633,7 +6633,7 @@ void SelectionDAGISel::LowerArguments(const BasicBlock *LLVMBB) { FrameAlign = TLI.getByValTypeAlignment(ElementTy); Flags.setByValAlign(FrameAlign); } - if (F.getParamAttributes(Idx).hasAttribute(Attributes::Nest)) + if (F.getParamAttributes(Idx).hasAttribute(Attribute::Nest)) Flags.setNest(); Flags.setOrigAlign(OriginalAlignment); @@ -6721,9 +6721,9 @@ void SelectionDAGISel::LowerArguments(const BasicBlock *LLVMBB) { if (!I->use_empty()) { ISD::NodeType AssertOp = ISD::DELETED_NODE; - if (F.getParamAttributes(Idx).hasAttribute(Attributes::SExt)) + if (F.getParamAttributes(Idx).hasAttribute(Attribute::SExt)) AssertOp = ISD::AssertSext; - else if (F.getParamAttributes(Idx).hasAttribute(Attributes::ZExt)) + else if (F.getParamAttributes(Idx).hasAttribute(Attribute::ZExt)) AssertOp = ISD::AssertZext; ArgValues.push_back(getCopyFromParts(DAG, dl, &InVals[i], diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index b9f72e3fa1..142411d54d 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -989,7 +989,7 @@ unsigned TargetLowering::getVectorTypeBreakdown(LLVMContext &Context, EVT VT, /// type of the given function. This does not require a DAG or a return value, /// and is suitable for use before any DAGs for the function are constructed. /// TODO: Move this out of TargetLowering.cpp. -void llvm::GetReturnInfo(Type* ReturnType, Attributes attr, +void llvm::GetReturnInfo(Type* ReturnType, Attribute attr, SmallVectorImpl<ISD::OutputArg> &Outs, const TargetLowering &TLI) { SmallVector<EVT, 4> ValueVTs; @@ -1001,9 +1001,9 @@ void llvm::GetReturnInfo(Type* ReturnType, Attributes attr, EVT VT = ValueVTs[j]; ISD::NodeType ExtendKind = ISD::ANY_EXTEND; - if (attr.hasAttribute(Attributes::SExt)) + if (attr.hasAttribute(Attribute::SExt)) ExtendKind = ISD::SIGN_EXTEND; - else if (attr.hasAttribute(Attributes::ZExt)) + else if (attr.hasAttribute(Attribute::ZExt)) ExtendKind = ISD::ZERO_EXTEND; // FIXME: C calling convention requires the return type to be promoted to @@ -1021,13 +1021,13 @@ void llvm::GetReturnInfo(Type* ReturnType, Attributes attr, // 'inreg' on function refers to return value ISD::ArgFlagsTy Flags = ISD::ArgFlagsTy(); - if (attr.hasAttribute(Attributes::InReg)) + if (attr.hasAttribute(Attribute::InReg)) Flags.setInReg(); // Propagate extension type if any - if (attr.hasAttribute(Attributes::SExt)) + if (attr.hasAttribute(Attribute::SExt)) Flags.setSExt(); - else if (attr.hasAttribute(Attributes::ZExt)) + else if (attr.hasAttribute(Attribute::ZExt)) Flags.setZExt(); for (unsigned i = 0; i < NumParts; ++i) |