mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +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:
parent
d521d8bf92
commit
9db20f3bd8
@ -6130,14 +6130,15 @@ TargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy,
|
||||
Flags.setByVal();
|
||||
const PointerType *Ty = cast<PointerType>(Args[i].Ty);
|
||||
const Type *ElementTy = Ty->getElementType();
|
||||
unsigned FrameAlign = getByValTypeAlignment(ElementTy);
|
||||
unsigned FrameSize = getTargetData()->getTypeAllocSize(ElementTy);
|
||||
Flags.setByValSize(getTargetData()->getTypeAllocSize(ElementTy));
|
||||
// For ByVal, alignment should come from FE. BE will guess if this
|
||||
// info is not there but there are cases it cannot get right.
|
||||
unsigned FrameAlign;
|
||||
if (Args[i].Alignment)
|
||||
FrameAlign = Args[i].Alignment;
|
||||
else
|
||||
FrameAlign = getByValTypeAlignment(ElementTy);
|
||||
Flags.setByValAlign(FrameAlign);
|
||||
Flags.setByValSize(FrameSize);
|
||||
}
|
||||
if (Args[i].isNest)
|
||||
Flags.setNest();
|
||||
@ -6355,14 +6356,15 @@ void SelectionDAGISel::LowerArguments(const BasicBlock *LLVMBB) {
|
||||
Flags.setByVal();
|
||||
const PointerType *Ty = cast<PointerType>(I->getType());
|
||||
const Type *ElementTy = Ty->getElementType();
|
||||
unsigned FrameAlign = TLI.getByValTypeAlignment(ElementTy);
|
||||
unsigned FrameSize = TD->getTypeAllocSize(ElementTy);
|
||||
Flags.setByValSize(TD->getTypeAllocSize(ElementTy));
|
||||
// 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.
|
||||
unsigned FrameAlign;
|
||||
if (F.getParamAlignment(Idx))
|
||||
FrameAlign = F.getParamAlignment(Idx);
|
||||
else
|
||||
FrameAlign = TLI.getByValTypeAlignment(ElementTy);
|
||||
Flags.setByValAlign(FrameAlign);
|
||||
Flags.setByValSize(FrameSize);
|
||||
}
|
||||
if (F.paramHasAttr(Idx, Attribute::Nest))
|
||||
Flags.setNest();
|
||||
|
Loading…
Reference in New Issue
Block a user