mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -201,7 +201,7 @@ static unsigned getJumpThreadDuplicationCost(const BasicBlock *BB) {
|
||||
if (isa<DbgInfoIntrinsic>(I)) continue;
|
||||
|
||||
// If this is a pointer->pointer bitcast, it is free.
|
||||
if (isa<BitCastInst>(I) && isa<PointerType>(I->getType()))
|
||||
if (isa<BitCastInst>(I) && I->getType()->isPointerTy())
|
||||
continue;
|
||||
|
||||
// All other instructions count for at least one unit.
|
||||
@ -214,7 +214,7 @@ static unsigned getJumpThreadDuplicationCost(const BasicBlock *BB) {
|
||||
if (const CallInst *CI = dyn_cast<CallInst>(I)) {
|
||||
if (!isa<IntrinsicInst>(CI))
|
||||
Size += 3;
|
||||
else if (!isa<VectorType>(CI->getType()))
|
||||
else if (!CI->getType()->isVectorTy())
|
||||
Size += 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user