diff options
| author | Reid Kleckner <rnk@google.com> | 2017-05-09 01:14:39 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2017-05-09 01:14:39 +0000 |
| commit | 9f29914d4018c0c8ef2b7b7bceffb0d07483e89c (patch) | |
| tree | 1bc28cf75b76a0ad46025a0ab5d9bedc36c4b57a /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
| parent | 42af6513589dbaf28b98a2d30d92cdd6a4884cc0 (diff) | |
| download | bcm5719-llvm-9f29914d4018c0c8ef2b7b7bceffb0d07483e89c.tar.gz bcm5719-llvm-9f29914d4018c0c8ef2b7b7bceffb0d07483e89c.zip | |
Revert "Use the frame index side table for byval and inalloca arguments"
This reverts r302483 and it's follow up fix.
llvm-svn: 302493
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index f37790d0983..8c98e3740f6 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1150,16 +1150,16 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) { return true; } - // Byval arguments with frame indices were already handled after argument - // lowering and before isel. - const auto *Arg = - dyn_cast<Argument>(Address->stripInBoundsConstantOffsets()); - if (Arg && FuncInfo.getArgumentFrameIndex(Arg) != INT_MAX) - return true; - + unsigned Offset = 0; Optional<MachineOperand> Op; - if (unsigned Reg = lookUpRegForValue(Address)) - Op = MachineOperand::CreateReg(Reg, false); + if (const auto *Arg = dyn_cast<Argument>(Address)) + // Some arguments' frame index is recorded during argument lowering. + Offset = FuncInfo.getArgumentFrameIndex(Arg); + if (Offset) + Op = MachineOperand::CreateFI(Offset); + if (!Op) + if (unsigned Reg = lookUpRegForValue(Address)) + Op = MachineOperand::CreateReg(Reg, false); // If we have a VLA that has a "use" in a metadata node that's then used // here but it has no other uses, then we have a problem. E.g., |

