diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-03 17:54:26 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-03 17:54:26 +0000 |
commit | 847d165459a8d4c30b57c896c7a7e2722f800f82 (patch) | |
tree | a29777fe7db5cc87e93294a8c885722c2c0be44b /lib/Target/X86/X86FastISel.cpp | |
parent | 565ebde5fea42789c7df8a49ce1e270d49d525a1 (diff) | |
download | external_llvm-847d165459a8d4c30b57c896c7a7e2722f800f82.tar.gz external_llvm-847d165459a8d4c30b57c896c7a7e2722f800f82.tar.bz2 external_llvm-847d165459a8d4c30b57c896c7a7e2722f800f82.zip |
Add methods which query for the specific attribute instead of using the
enums. This allows for better encapsulation of the Attributes class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165132 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86FastISel.cpp')
-rw-r--r-- | lib/Target/X86/X86FastISel.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index fd279a169c..cf14fe0521 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -1541,9 +1541,9 @@ static unsigned computeBytesPoppedByCallee(const X86Subtarget &Subtarget, CallingConv::ID CC = CS.getCallingConv(); if (CC == CallingConv::Fast || CC == CallingConv::GHC) return 0; - if (!CS.paramHasAttr(1, Attribute::StructRet)) + if (!CS.paramHasStructRetAttr(1)) return 0; - if (CS.paramHasAttr(1, Attribute::InReg)) + if (CS.paramHasInRegAttr(1)) return 0; return 4; } @@ -1622,12 +1622,12 @@ bool X86FastISel::DoSelectCall(const Instruction *I, const char *MemIntName) { Value *ArgVal = *i; ISD::ArgFlagsTy Flags; unsigned AttrInd = i - CS.arg_begin() + 1; - if (CS.paramHasAttr(AttrInd, Attribute::SExt)) + if (CS.paramHasSExtAttr(AttrInd)) Flags.setSExt(); - if (CS.paramHasAttr(AttrInd, Attribute::ZExt)) + if (CS.paramHasZExtAttr(AttrInd)) Flags.setZExt(); - if (CS.paramHasAttr(AttrInd, Attribute::ByVal)) { + if (CS.paramHasByValAttr(AttrInd)) { PointerType *Ty = cast<PointerType>(ArgVal->getType()); Type *ElementTy = Ty->getElementType(); unsigned FrameSize = TD.getTypeAllocSize(ElementTy); @@ -1641,9 +1641,9 @@ bool X86FastISel::DoSelectCall(const Instruction *I, const char *MemIntName) { return false; } - if (CS.paramHasAttr(AttrInd, Attribute::InReg)) + if (CS.paramHasInRegAttr(AttrInd)) Flags.setInReg(); - if (CS.paramHasAttr(AttrInd, Attribute::Nest)) + if (CS.paramHasNestAttr(AttrInd)) Flags.setNest(); // If this is an i1/i8/i16 argument, promote to i32 to avoid an extra @@ -1911,11 +1911,11 @@ bool X86FastISel::DoSelectCall(const Instruction *I, const char *MemIntName) { ISD::InputArg MyFlags; MyFlags.VT = RegisterVT.getSimpleVT(); MyFlags.Used = !CS.getInstruction()->use_empty(); - if (CS.paramHasAttr(0, Attribute::SExt)) + if (CS.paramHasSExtAttr(0)) MyFlags.Flags.setSExt(); - if (CS.paramHasAttr(0, Attribute::ZExt)) + if (CS.paramHasZExtAttr(0)) MyFlags.Flags.setZExt(); - if (CS.paramHasAttr(0, Attribute::InReg)) + if (CS.paramHasInRegAttr(0)) MyFlags.Flags.setInReg(); Ins.push_back(MyFlags); } |