mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +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:
@@ -84,7 +84,7 @@ unsigned InlineCostAnalyzer::FunctionInfo::
|
||||
//
|
||||
unsigned InlineCostAnalyzer::FunctionInfo::
|
||||
CountCodeReductionForAlloca(Value *V) {
|
||||
if (!isa<PointerType>(V->getType())) return 0; // Not a pointer
|
||||
if (!V->getType()->isPointerTy()) return 0; // Not a pointer
|
||||
unsigned Reduction = 0;
|
||||
for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E;++UI){
|
||||
Instruction *I = cast<Instruction>(*UI);
|
||||
@@ -175,7 +175,7 @@ void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB) {
|
||||
this->usesDynamicAlloca = true;
|
||||
}
|
||||
|
||||
if (isa<ExtractElementInst>(II) || isa<VectorType>(II->getType()))
|
||||
if (isa<ExtractElementInst>(II) || II->getType()->isVectorTy())
|
||||
++NumVectorInsts;
|
||||
|
||||
if (const CastInst *CI = dyn_cast<CastInst>(II)) {
|
||||
|
Reference in New Issue
Block a user