mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 20:26:07 +00:00
Eliminate some temporary variables, and don't call getByValTypeAlignment
when we're just going to throw the result away. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131880 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -6130,14 +6130,15 @@ TargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy,
|
|||||||
Flags.setByVal();
|
Flags.setByVal();
|
||||||
const PointerType *Ty = cast<PointerType>(Args[i].Ty);
|
const PointerType *Ty = cast<PointerType>(Args[i].Ty);
|
||||||
const Type *ElementTy = Ty->getElementType();
|
const Type *ElementTy = Ty->getElementType();
|
||||||
unsigned FrameAlign = getByValTypeAlignment(ElementTy);
|
Flags.setByValSize(getTargetData()->getTypeAllocSize(ElementTy));
|
||||||
unsigned FrameSize = getTargetData()->getTypeAllocSize(ElementTy);
|
|
||||||
// For ByVal, alignment should come from FE. BE will guess if this
|
// For ByVal, alignment should come from FE. BE will guess if this
|
||||||
// info is not there but there are cases it cannot get right.
|
// info is not there but there are cases it cannot get right.
|
||||||
|
unsigned FrameAlign;
|
||||||
if (Args[i].Alignment)
|
if (Args[i].Alignment)
|
||||||
FrameAlign = Args[i].Alignment;
|
FrameAlign = Args[i].Alignment;
|
||||||
|
else
|
||||||
|
FrameAlign = getByValTypeAlignment(ElementTy);
|
||||||
Flags.setByValAlign(FrameAlign);
|
Flags.setByValAlign(FrameAlign);
|
||||||
Flags.setByValSize(FrameSize);
|
|
||||||
}
|
}
|
||||||
if (Args[i].isNest)
|
if (Args[i].isNest)
|
||||||
Flags.setNest();
|
Flags.setNest();
|
||||||
@@ -6355,14 +6356,15 @@ void SelectionDAGISel::LowerArguments(const BasicBlock *LLVMBB) {
|
|||||||
Flags.setByVal();
|
Flags.setByVal();
|
||||||
const PointerType *Ty = cast<PointerType>(I->getType());
|
const PointerType *Ty = cast<PointerType>(I->getType());
|
||||||
const Type *ElementTy = Ty->getElementType();
|
const Type *ElementTy = Ty->getElementType();
|
||||||
unsigned FrameAlign = TLI.getByValTypeAlignment(ElementTy);
|
Flags.setByValSize(TD->getTypeAllocSize(ElementTy));
|
||||||
unsigned FrameSize = TD->getTypeAllocSize(ElementTy);
|
|
||||||
// For ByVal, alignment should be passed from FE. BE will guess if
|
// For ByVal, alignment should be passed from FE. BE will guess if
|
||||||
// this info is not there but there are cases it cannot get right.
|
// this info is not there but there are cases it cannot get right.
|
||||||
|
unsigned FrameAlign;
|
||||||
if (F.getParamAlignment(Idx))
|
if (F.getParamAlignment(Idx))
|
||||||
FrameAlign = F.getParamAlignment(Idx);
|
FrameAlign = F.getParamAlignment(Idx);
|
||||||
|
else
|
||||||
|
FrameAlign = TLI.getByValTypeAlignment(ElementTy);
|
||||||
Flags.setByValAlign(FrameAlign);
|
Flags.setByValAlign(FrameAlign);
|
||||||
Flags.setByValSize(FrameSize);
|
|
||||||
}
|
}
|
||||||
if (F.paramHasAttr(Idx, Attribute::Nest))
|
if (F.paramHasAttr(Idx, Attribute::Nest))
|
||||||
Flags.setNest();
|
Flags.setNest();
|
||||||
|
Reference in New Issue
Block a user