mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Fix old-style type names in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73362 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -143,10 +143,10 @@ Pass *createLoopIndexSplitPass();
|
|||||||
// this pass is:
|
// this pass is:
|
||||||
//
|
//
|
||||||
// FROM CODE TO CODE
|
// FROM CODE TO CODE
|
||||||
// %X = alloca int, uint 1 ret int 42
|
// %X = alloca i32, i32 1 ret i32 42
|
||||||
// store int 42, int *%X
|
// store i32 42, i32 *%X
|
||||||
// %Y = load int* %X
|
// %Y = load i32* %X
|
||||||
// ret int %Y
|
// ret i32 %Y
|
||||||
//
|
//
|
||||||
FunctionPass *createPromoteMemoryToRegisterPass();
|
FunctionPass *createPromoteMemoryToRegisterPass();
|
||||||
extern const PassInfo *const PromoteMemoryToRegisterID;
|
extern const PassInfo *const PromoteMemoryToRegisterID;
|
||||||
|
@ -352,7 +352,7 @@ Constant *DIFactory::GetStringConstant(const std::string &String) {
|
|||||||
|
|
||||||
const PointerType *DestTy = PointerType::getUnqual(Type::Int8Ty);
|
const PointerType *DestTy = PointerType::getUnqual(Type::Int8Ty);
|
||||||
|
|
||||||
// If empty string then use a sbyte* null instead.
|
// If empty string then use a i8* null instead.
|
||||||
if (String.empty())
|
if (String.empty())
|
||||||
return Slot = ConstantPointerNull::get(DestTy);
|
return Slot = ConstantPointerNull::get(DestTy);
|
||||||
|
|
||||||
|
@ -3145,7 +3145,7 @@ bool LLParser::ParseFree(Instruction *&Inst, PerFunctionState &PFS) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ParseLoad
|
/// ParseLoad
|
||||||
/// ::= 'volatile'? 'load' TypeAndValue (',' 'align' uint)?
|
/// ::= 'volatile'? 'load' TypeAndValue (',' 'align' i32)?
|
||||||
bool LLParser::ParseLoad(Instruction *&Inst, PerFunctionState &PFS,
|
bool LLParser::ParseLoad(Instruction *&Inst, PerFunctionState &PFS,
|
||||||
bool isVolatile) {
|
bool isVolatile) {
|
||||||
Value *Val; LocTy Loc;
|
Value *Val; LocTy Loc;
|
||||||
@ -3163,7 +3163,7 @@ bool LLParser::ParseLoad(Instruction *&Inst, PerFunctionState &PFS,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ParseStore
|
/// ParseStore
|
||||||
/// ::= 'volatile'? 'store' TypeAndValue ',' TypeAndValue (',' 'align' uint)?
|
/// ::= 'volatile'? 'store' TypeAndValue ',' TypeAndValue (',' 'align' i32)?
|
||||||
bool LLParser::ParseStore(Instruction *&Inst, PerFunctionState &PFS,
|
bool LLParser::ParseStore(Instruction *&Inst, PerFunctionState &PFS,
|
||||||
bool isVolatile) {
|
bool isVolatile) {
|
||||||
Value *Val, *Ptr; LocTy Loc, PtrLoc;
|
Value *Val, *Ptr; LocTy Loc, PtrLoc;
|
||||||
@ -3186,7 +3186,7 @@ bool LLParser::ParseStore(Instruction *&Inst, PerFunctionState &PFS,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ParseGetResult
|
/// ParseGetResult
|
||||||
/// ::= 'getresult' TypeAndValue ',' uint
|
/// ::= 'getresult' TypeAndValue ',' i32
|
||||||
/// FIXME: Remove support for getresult in LLVM 3.0
|
/// FIXME: Remove support for getresult in LLVM 3.0
|
||||||
bool LLParser::ParseGetResult(Instruction *&Inst, PerFunctionState &PFS) {
|
bool LLParser::ParseGetResult(Instruction *&Inst, PerFunctionState &PFS) {
|
||||||
Value *Val; LocTy ValLoc, EltLoc;
|
Value *Val; LocTy ValLoc, EltLoc;
|
||||||
|
@ -502,7 +502,7 @@ const GlobalValue * AsmPrinter::findGlobalValue(const Constant *CV) {
|
|||||||
void AsmPrinter::EmitLLVMUsedList(Constant *List) {
|
void AsmPrinter::EmitLLVMUsedList(Constant *List) {
|
||||||
const char *Directive = TAI->getUsedDirective();
|
const char *Directive = TAI->getUsedDirective();
|
||||||
|
|
||||||
// Should be an array of 'sbyte*'.
|
// Should be an array of 'i8*'.
|
||||||
ConstantArray *InitList = dyn_cast<ConstantArray>(List);
|
ConstantArray *InitList = dyn_cast<ConstantArray>(List);
|
||||||
if (InitList == 0) return;
|
if (InitList == 0) return;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static unsigned AddLiveIn(MachineFunction &MF, unsigned PReg,
|
|||||||
|
|
||||||
AlphaTargetLowering::AlphaTargetLowering(TargetMachine &TM) : TargetLowering(TM) {
|
AlphaTargetLowering::AlphaTargetLowering(TargetMachine &TM) : TargetLowering(TM) {
|
||||||
// Set up the TargetLowering object.
|
// Set up the TargetLowering object.
|
||||||
//I am having problems with shr n ubyte 1
|
//I am having problems with shr n i8 1
|
||||||
setShiftAmountType(MVT::i64);
|
setShiftAmountType(MVT::i64);
|
||||||
setBooleanContents(ZeroOrOneBooleanContent);
|
setBooleanContents(ZeroOrOneBooleanContent);
|
||||||
|
|
||||||
|
@ -82,14 +82,14 @@ void RaiseAllocations::doInitialization(Module &M) {
|
|||||||
|
|
||||||
// Chck to see if we got the expected malloc
|
// Chck to see if we got the expected malloc
|
||||||
if (TyWeHave != Malloc1Type) {
|
if (TyWeHave != Malloc1Type) {
|
||||||
// Check to see if the prototype is wrong, giving us sbyte*(uint) * malloc
|
// Check to see if the prototype is wrong, giving us i8*(i32) * malloc
|
||||||
// This handles the common declaration of: 'void *malloc(unsigned);'
|
// This handles the common declaration of: 'void *malloc(unsigned);'
|
||||||
const FunctionType *Malloc2Type =
|
const FunctionType *Malloc2Type =
|
||||||
FunctionType::get(PointerType::getUnqual(Type::Int8Ty),
|
FunctionType::get(PointerType::getUnqual(Type::Int8Ty),
|
||||||
std::vector<const Type*>(1, Type::Int32Ty), false);
|
std::vector<const Type*>(1, Type::Int32Ty), false);
|
||||||
if (TyWeHave != Malloc2Type) {
|
if (TyWeHave != Malloc2Type) {
|
||||||
// Check to see if the prototype is missing, giving us
|
// Check to see if the prototype is missing, giving us
|
||||||
// sbyte*(...) * malloc
|
// i8*(...) * malloc
|
||||||
// This handles the common declaration of: 'void *malloc();'
|
// This handles the common declaration of: 'void *malloc();'
|
||||||
const FunctionType *Malloc3Type =
|
const FunctionType *Malloc3Type =
|
||||||
FunctionType::get(PointerType::getUnqual(Type::Int8Ty),
|
FunctionType::get(PointerType::getUnqual(Type::Int8Ty),
|
||||||
|
@ -401,8 +401,8 @@ static void SplitEdgeNicely(TerminatorInst *TI, unsigned SuccNum,
|
|||||||
|
|
||||||
|
|
||||||
/// OptimizeNoopCopyExpression - If the specified cast instruction is a noop
|
/// OptimizeNoopCopyExpression - If the specified cast instruction is a noop
|
||||||
/// copy (e.g. it's casting from one pointer type to another, int->uint, or
|
/// copy (e.g. it's casting from one pointer type to another, i32->i8 on PPC),
|
||||||
/// int->sbyte on PPC), sink it into user blocks to reduce the number of virtual
|
/// sink it into user blocks to reduce the number of virtual
|
||||||
/// registers that must be created and coalesced.
|
/// registers that must be created and coalesced.
|
||||||
///
|
///
|
||||||
/// Return true if any changes are made.
|
/// Return true if any changes are made.
|
||||||
|
@ -2290,7 +2290,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add (cast *A to intptrtype) B ->
|
// add (cast *A to intptrtype) B ->
|
||||||
// cast (GEP (cast *A to sbyte*) B) --> intptrtype
|
// cast (GEP (cast *A to i8*) B) --> intptrtype
|
||||||
{
|
{
|
||||||
CastInst *CI = dyn_cast<CastInst>(LHS);
|
CastInst *CI = dyn_cast<CastInst>(LHS);
|
||||||
Value *Other = RHS;
|
Value *Other = RHS;
|
||||||
@ -7133,10 +7133,10 @@ Instruction *InstCombiner::visitICmpInstWithCastAndCast(ICmpInst &ICI) {
|
|||||||
if (Res2 == CI) {
|
if (Res2 == CI) {
|
||||||
// Make sure that sign of the Cmp and the sign of the Cast are the same.
|
// Make sure that sign of the Cmp and the sign of the Cast are the same.
|
||||||
// For example, we might have:
|
// For example, we might have:
|
||||||
// %A = sext short %X to uint
|
// %A = sext i16 %X to i32
|
||||||
// %B = icmp ugt uint %A, 1330
|
// %B = icmp ugt i32 %A, 1330
|
||||||
// It is incorrect to transform this into
|
// It is incorrect to transform this into
|
||||||
// %B = icmp ugt short %X, 1330
|
// %B = icmp ugt i16 %X, 1330
|
||||||
// because %A may have negative value.
|
// because %A may have negative value.
|
||||||
//
|
//
|
||||||
// However, we allow this when the compare is EQ/NE, because they are
|
// However, we allow this when the compare is EQ/NE, because they are
|
||||||
@ -7273,8 +7273,8 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
|
|||||||
// purpose is to compute bits we don't care about.
|
// purpose is to compute bits we don't care about.
|
||||||
uint32_t TypeBits = Op0->getType()->getPrimitiveSizeInBits();
|
uint32_t TypeBits = Op0->getType()->getPrimitiveSizeInBits();
|
||||||
|
|
||||||
// shl uint X, 32 = 0 and shr ubyte Y, 9 = 0, ... just don't eliminate shr
|
// shl i32 X, 32 = 0 and srl i8 Y, 9 = 0, ... just don't eliminate
|
||||||
// of a signed value.
|
// a signed shift.
|
||||||
//
|
//
|
||||||
if (Op1->uge(TypeBits)) {
|
if (Op1->uge(TypeBits)) {
|
||||||
if (I.getOpcode() != Instruction::AShr)
|
if (I.getOpcode() != Instruction::AShr)
|
||||||
|
@ -112,7 +112,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) {
|
|||||||
if (MallocInst *MI = dyn_cast<MallocInst>(I)) {
|
if (MallocInst *MI = dyn_cast<MallocInst>(I)) {
|
||||||
const Type *AllocTy = MI->getType()->getElementType();
|
const Type *AllocTy = MI->getType()->getElementType();
|
||||||
|
|
||||||
// malloc(type) becomes sbyte *malloc(size)
|
// malloc(type) becomes i8 *malloc(size)
|
||||||
Value *MallocArg;
|
Value *MallocArg;
|
||||||
if (LowerMallocArgToInteger)
|
if (LowerMallocArgToInteger)
|
||||||
MallocArg = ConstantInt::get(Type::Int64Ty,
|
MallocArg = ConstantInt::get(Type::Int64Ty,
|
||||||
|
@ -1310,7 +1310,7 @@ bool InsertElementInst::isValidOperands(const Value *Vec, const Value *Elt,
|
|||||||
return false;// Second operand of insertelement must be vector element type.
|
return false;// Second operand of insertelement must be vector element type.
|
||||||
|
|
||||||
if (Index->getType() != Type::Int32Ty)
|
if (Index->getType() != Type::Int32Ty)
|
||||||
return false; // Third operand of insertelement must be uint.
|
return false; // Third operand of insertelement must be i32.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1880,8 +1880,8 @@ unsigned CastInst::isEliminableCastPair(
|
|||||||
// BITCONVERT = FirstClass n/a FirstClass n/a
|
// BITCONVERT = FirstClass n/a FirstClass n/a
|
||||||
//
|
//
|
||||||
// NOTE: some transforms are safe, but we consider them to be non-profitable.
|
// NOTE: some transforms are safe, but we consider them to be non-profitable.
|
||||||
// For example, we could merge "fptoui double to uint" + "zext uint to ulong",
|
// For example, we could merge "fptoui double to i32" + "zext i32 to i64",
|
||||||
// into "fptoui double to ulong", but this loses information about the range
|
// into "fptoui double to i64", but this loses information about the range
|
||||||
// of the produced value (we no longer know the top-part is all zeros).
|
// of the produced value (we no longer know the top-part is all zeros).
|
||||||
// Further this conversion is often much more expensive for typical hardware,
|
// Further this conversion is often much more expensive for typical hardware,
|
||||||
// and causes issues when building libgcc. We disallow fptosi+sext for the
|
// and causes issues when building libgcc. We disallow fptosi+sext for the
|
||||||
|
Reference in New Issue
Block a user