mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
Use new accessor methods to query for attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165205 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
41d876cea3
commit
8f00ae6a3f
@ -50,7 +50,7 @@ bool HexagonRemoveExtendArgs::runOnFunction(Function &F) {
|
|||||||
unsigned Idx = 1;
|
unsigned Idx = 1;
|
||||||
for (Function::arg_iterator AI = F.arg_begin(), AE = F.arg_end(); AI != AE;
|
for (Function::arg_iterator AI = F.arg_begin(), AE = F.arg_end(); AI != AE;
|
||||||
++AI, ++Idx) {
|
++AI, ++Idx) {
|
||||||
if (F.paramHasAttr(Idx, Attribute::SExt)) {
|
if (F.getParamAttributes(Idx).hasSExtAttr()) {
|
||||||
Argument* Arg = AI;
|
Argument* Arg = AI;
|
||||||
if (!isa<PointerType>(Arg->getType())) {
|
if (!isa<PointerType>(Arg->getType())) {
|
||||||
for (Instruction::use_iterator UI = Arg->use_begin();
|
for (Instruction::use_iterator UI = Arg->use_begin();
|
||||||
|
@ -1456,7 +1456,7 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PAL.paramHasAttr(paramIndex+1, Attribute::ByVal) == false) {
|
if (PAL.getParamAttributes(paramIndex+1).hasByValAttr() == false) {
|
||||||
// Just a scalar
|
// Just a scalar
|
||||||
const PointerType *PTy = dyn_cast<PointerType>(Ty);
|
const PointerType *PTy = dyn_cast<PointerType>(Ty);
|
||||||
if (isKernelFunc) {
|
if (isKernelFunc) {
|
||||||
|
@ -965,7 +965,7 @@ NVPTXTargetLowering::LowerFormalArguments(SDValue Chain,
|
|||||||
// to newly created nodes. The SDNOdes for params have to
|
// to newly created nodes. The SDNOdes for params have to
|
||||||
// appear in the same order as their order of appearance
|
// appear in the same order as their order of appearance
|
||||||
// in the original function. "idx+1" holds that order.
|
// 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.
|
// A plain scalar.
|
||||||
if (isABI || isKernel) {
|
if (isABI || isKernel) {
|
||||||
// If ABI, load from the param symbol
|
// If ABI, load from the param symbol
|
||||||
|
@ -10494,7 +10494,7 @@ SDValue X86TargetLowering::LowerINIT_TRAMPOLINE(SDValue Op,
|
|||||||
|
|
||||||
for (FunctionType::param_iterator I = FTy->param_begin(),
|
for (FunctionType::param_iterator I = FTy->param_begin(),
|
||||||
E = FTy->param_end(); I != E; ++I, ++Idx)
|
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.
|
// FIXME: should only count parameters that are lowered to integers.
|
||||||
InRegCount += (TD->getTypeSizeInBits(*I) + 31) / 32;
|
InRegCount += (TD->getTypeSizeInBits(*I) + 31) / 32;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user