mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Broad superficial changes:
* Renamed getOpcode to getOpcodeName * Changed getOpcodeName to return a const char * instead of string * Added a getOpcode method to replace getInstType * Changed code to use getOpcode instead of getInstType git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -78,7 +78,7 @@ static LIVType isLinearInductionVariableH(cfg::Interval *Int, Value *V,
|
||||
|
||||
// loop variant computations must be instructions!
|
||||
Instruction *I = V->castInstructionAsserting();
|
||||
switch (I->getInstType()) { // Handle each instruction seperately
|
||||
switch (I->getOpcode()) { // Handle each instruction seperately
|
||||
case Instruction::Neg: {
|
||||
Value *SubV = ((UnaryOperator*)I)->getOperand(0);
|
||||
LIVType SubLIVType = isLinearInductionVariableH(Int, SubV, PN);
|
||||
@@ -107,12 +107,12 @@ static LIVType isLinearInductionVariableH(cfg::Interval *Int, Value *V,
|
||||
// either a Loop Invariant computation, or a LIV type.
|
||||
if (SubLIVType1 == isLIC) {
|
||||
// Loop invariant computation, we know this is a LIV then.
|
||||
return (I->getInstType() == Instruction::Add) ?
|
||||
return (I->getOpcode() == Instruction::Add) ?
|
||||
SubLIVType2 : neg(SubLIVType2);
|
||||
}
|
||||
|
||||
// If the LHS is also a LIV Expression, we cannot add two LIVs together
|
||||
if (I->getInstType() == Instruction::Add) return isOther;
|
||||
if (I->getOpcode() == Instruction::Add) return isOther;
|
||||
|
||||
// We can only subtract two LIVs if they are the same type, which yields
|
||||
// a LIC, because the LIVs cancel each other out.
|
||||
@@ -155,7 +155,7 @@ static inline bool isSimpleInductionVar(PHINode *PN) {
|
||||
|
||||
Value *StepExpr = PN->getIncomingValue(1);
|
||||
if (!StepExpr->isInstruction() ||
|
||||
((Instruction*)StepExpr)->getInstType() != Instruction::Add)
|
||||
((Instruction*)StepExpr)->getOpcode() != Instruction::Add)
|
||||
return false;
|
||||
|
||||
BinaryOperator *I = (BinaryOperator*)StepExpr;
|
||||
|
||||
Reference in New Issue
Block a user