summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2019-05-29 20:46:38 +0000
committerTim Northover <tnorthover@apple.com>2019-05-29 20:46:38 +0000
commit71ee3d02372af7361eda0b59163cf92653ac2bbb (patch)
tree6e62b423c129caa0b420c5e10382284d65898514 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
parent4b281755ae4951ca83c287680b47d77433f3ee0a (diff)
downloadbcm5719-llvm-71ee3d02372af7361eda0b59163cf92653ac2bbb.tar.gz
bcm5719-llvm-71ee3d02372af7361eda0b59163cf92653ac2bbb.zip
Revert "IR: add optional type to 'byval' function parameters"
The IRLinker doesn't delve into the new byval attribute when mapping types, and this breaks LTO. llvm-svn: 362029
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index d887ed73c44..8fb1a7b5bb9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1204,11 +1204,9 @@ bool FastISel::lowerCallTo(CallLoweringInfo &CLI) {
if (Arg.IsByVal || Arg.IsInAlloca) {
PointerType *Ty = cast<PointerType>(Arg.Ty);
Type *ElementTy = Ty->getElementType();
- unsigned FrameSize =
- DL.getTypeAllocSize(Arg.ByValType ? Arg.ByValType : 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 FrameSize = DL.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 = Arg.Alignment;
if (!FrameAlign)
FrameAlign = TLI.getByValTypeAlignment(ElementTy, DL);
OpenPOWER on IntegriCloud