mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -987,8 +987,8 @@ const char *MSP430TargetLowering::getTargetNodeName(unsigned Opcode) const {
|
||||
}
|
||||
}
|
||||
|
||||
bool MSP430TargetLowering::isTruncateFree(const Type *Ty1,
|
||||
const Type *Ty2) const {
|
||||
bool MSP430TargetLowering::isTruncateFree(Type *Ty1,
|
||||
Type *Ty2) const {
|
||||
if (!Ty1->isIntegerTy() || !Ty2->isIntegerTy())
|
||||
return false;
|
||||
|
||||
@@ -1002,7 +1002,7 @@ bool MSP430TargetLowering::isTruncateFree(EVT VT1, EVT VT2) const {
|
||||
return (VT1.getSizeInBits() > VT2.getSizeInBits());
|
||||
}
|
||||
|
||||
bool MSP430TargetLowering::isZExtFree(const Type *Ty1, const Type *Ty2) const {
|
||||
bool MSP430TargetLowering::isZExtFree(Type *Ty1, Type *Ty2) const {
|
||||
// MSP430 implicitly zero-extends 8-bit results in 16-bit registers.
|
||||
return 0 && Ty1->isIntegerTy(8) && Ty2->isIntegerTy(16);
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ namespace llvm {
|
||||
/// isTruncateFree - Return true if it's free to truncate a value of type
|
||||
/// Ty1 to type Ty2. e.g. On msp430 it's free to truncate a i16 value in
|
||||
/// register R15W to i8 by referencing its sub-register R15B.
|
||||
virtual bool isTruncateFree(const Type *Ty1, const Type *Ty2) const;
|
||||
virtual bool isTruncateFree(Type *Ty1, Type *Ty2) const;
|
||||
virtual bool isTruncateFree(EVT VT1, EVT VT2) const;
|
||||
|
||||
/// isZExtFree - Return true if any actual instruction that defines a value
|
||||
@@ -113,7 +113,7 @@ namespace llvm {
|
||||
/// necessarily apply to truncate instructions. e.g. on msp430, all
|
||||
/// instructions that define 8-bit values implicit zero-extend the result
|
||||
/// out to 16 bits.
|
||||
virtual bool isZExtFree(const Type *Ty1, const Type *Ty2) const;
|
||||
virtual bool isZExtFree(Type *Ty1, Type *Ty2) const;
|
||||
virtual bool isZExtFree(EVT VT1, EVT VT2) const;
|
||||
|
||||
MachineBasicBlock* EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||
|
Reference in New Issue
Block a user