From caaf69107ece8bd9864fed4d64e2a84fa5f8cd4b Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 28 Mar 2007 01:53:55 +0000 Subject: [PATCH] Remove isLegalAddressImmediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35406 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetLowering.h | 6 ------ lib/CodeGen/SelectionDAG/TargetLowering.cpp | 8 -------- lib/Target/ARM/ARMISelLowering.cpp | 14 -------------- lib/Target/ARM/ARMISelLowering.h | 6 ------ 4 files changed, 34 deletions(-) diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 5f51d13fcd2..4af25d8a8e6 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -856,12 +856,6 @@ public: // Loop Strength Reduction hooks // - /// isLegalAddressExpression - Return true if the binary expression made up of - /// specified opcode, operands, and type can be folded into target addressing - /// mode for load / store of the given type. - virtual bool isLegalAddressExpression(unsigned Opc, Value *Op0, Value *Op1, - const Type *Ty) const; - /// isLegalAddressImmediate - Return true if the integer value can be used as /// the offset of the target addressing mode for load / store of the given /// type. diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index ee9fa67fa40..97c0939951b 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -1940,14 +1940,6 @@ getRegForInlineAsmConstraint(const std::string &Constraint, // Loop Strength Reduction hooks //===----------------------------------------------------------------------===// -/// isLegalAddressExpression - Return true if the binary expression made up of -/// specified opcode, operands, and type can be folded into target addressing -/// mode for load / store of the given type. -bool TargetLowering::isLegalAddressExpression(unsigned Opc, Value *Op0, - Value *Op1, const Type *Ty) const { - return false; -} - /// isLegalAddressImmediate - Return true if the integer value can be used as /// the offset of the target addressing mode for load / store of the given /// type. diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 50ac5e9c69d..c646e54b580 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -1281,20 +1281,6 @@ ARMTargetLowering::InsertAtEndOfBasicBlock(MachineInstr *MI, // ARM Optimization Hooks //===----------------------------------------------------------------------===// -/// isLegalAddressExpression - Return true if the binary expression made up of -/// specified opcode, operands, and type can be folded into target addressing -/// mode for load / store of the given type. -bool ARMTargetLowering::isLegalAddressExpression(unsigned Opc, Value *Op0, - Value *Op1, const Type *Ty) const { - if (ConstantInt *Op1C = dyn_cast(Op1)) { - if (Opc == Instruction::Add) - return isLegalAddressImmediate(Op1C->getSExtValue(), Ty); - if (Opc == Instruction::Sub) - return isLegalAddressImmediate(-Op1C->getSExtValue(), Ty); - } - return false; -} - /// isLegalAddressImmediate - Return true if the integer value can be used /// as the offset of the target addressing mode for load / store of the /// given type. diff --git a/lib/Target/ARM/ARMISelLowering.h b/lib/Target/ARM/ARMISelLowering.h index 149628510b4..74790191d76 100644 --- a/lib/Target/ARM/ARMISelLowering.h +++ b/lib/Target/ARM/ARMISelLowering.h @@ -80,12 +80,6 @@ namespace llvm { virtual MachineBasicBlock *InsertAtEndOfBasicBlock(MachineInstr *MI, MachineBasicBlock *MBB); - /// isLegalAddressExpression - Return true if the binary expression made up - /// of specified opcode, operands, and type can be folded into target - /// addressing mode for load / store of the given type. - virtual bool isLegalAddressExpression(unsigned Opc, Value *Op0, Value *Op1, - const Type *Ty) const; - /// isLegalAddressImmediate - Return true if the integer value can be used /// as the offset of the target addressing mode for load / store of the /// given type.