Use new accessor methods to query for attributes.
authorBill Wendling <isanbard@gmail.com>
Thu, 4 Oct 2012 06:43:21 +0000 (06:43 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 4 Oct 2012 06:43:21 +0000 (06:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165205 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
lib/Target/NVPTX/NVPTXISelLowering.cpp
lib/Target/X86/X86ISelLowering.cpp

index 2468f0b86f8817760ea5909838d778a191261c4c..4937c56c8333aa0efb3b9113dd5b2981b7f2416e 100644 (file)
@@ -50,7 +50,7 @@ bool HexagonRemoveExtendArgs::runOnFunction(Function &F) {
   unsigned Idx = 1;
   for (Function::arg_iterator AI = F.arg_begin(), AE = F.arg_end(); AI != AE;
        ++AI, ++Idx) {
-    if (F.paramHasAttr(Idx, Attribute::SExt)) {
+    if (F.getParamAttributes(Idx).hasSExtAttr()) {
       Argument* Arg = AI;
       if (!isa<PointerType>(Arg->getType())) {
         for (Instruction::use_iterator UI = Arg->use_begin();
index f2b96163f43d4aa235bde4f7bdab89ce0aabf0f5..f1e0367f42a65cd8ba90e4502763430d69b06481 100644 (file)
@@ -1456,7 +1456,7 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F,
       continue;
     }
 
-    if (PAL.paramHasAttr(paramIndex+1, Attribute::ByVal) == false) {
+    if (PAL.getParamAttributes(paramIndex+1).hasByValAttr() == false) {
       // Just a scalar
       const PointerType *PTy = dyn_cast<PointerType>(Ty);
       if (isKernelFunc) {
index 6ea10ea14ad6053ab9b7b28d32843ad4db8279be..5a48ea82087f6b393dec8b9a99c516b2785a82f9 100644 (file)
@@ -965,7 +965,7 @@ NVPTXTargetLowering::LowerFormalArguments(SDValue Chain,
     // to newly created nodes. The SDNOdes for params have to
     // appear in the same order as their order of appearance
     // in the original function. "idx+1" holds that order.
-    if (PAL.paramHasAttr(i+1, Attribute::ByVal) == false) {
+    if (PAL.getParamAttributes(i+1).hasByValAttr() == false) {
       // A plain scalar.
       if (isABI || isKernel) {
         // If ABI, load from the param symbol
index be8d06f0d02a5f02f58fc917d49babe5a0b03fff..4e4688f55b560477dcc8d35dfb92b7060214c5dc 100644 (file)
@@ -10494,7 +10494,7 @@ SDValue X86TargetLowering::LowerINIT_TRAMPOLINE(SDValue Op,
 
         for (FunctionType::param_iterator I = FTy->param_begin(),
              E = FTy->param_end(); I != E; ++I, ++Idx)
-          if (Attrs.paramHasAttr(Idx, Attribute::InReg))
+          if (Attrs.getParamAttributes(Idx).hasInRegAttr())
             // FIXME: should only count parameters that are lowered to integers.
             InRegCount += (TD->getTypeSizeInBits(*I) + 31) / 32;