1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Reduce variable scope by moving declaration into if clause

llvm-svn: 310506
This commit is contained in:
David Blaikie 2017-08-09 18:34:18 +00:00
parent 8235f0ba3e
commit 404c577400

View File

@ -5104,17 +5104,17 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
// Static allocas are handled more efficiently in the variable frame index
// side table.
const auto *AI =
dyn_cast<AllocaInst>(Address->stripInBoundsConstantOffsets());
if (AI && AI->isStaticAlloca() && FuncInfo.StaticAllocaMap.count(AI))
return nullptr;
if (const auto *AI =
dyn_cast<AllocaInst>(Address->stripInBoundsConstantOffsets()))
if (AI->isStaticAlloca() && FuncInfo.StaticAllocaMap.count(AI))
return nullptr;
// 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 nullptr;
if (const auto *Arg =
dyn_cast<Argument>(Address->stripInBoundsConstantOffsets()))
if (FuncInfo.getArgumentFrameIndex(Arg) != INT_MAX)
return nullptr;
SDValue &N = NodeMap[Address];
if (!N.getNode() && isa<Argument>(Address))