diff options
author | Pete Cooper <peter_cooper@apple.com> | 2015-05-13 22:43:09 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2015-05-13 22:43:09 +0000 |
commit | 7c4d7b8fbe21566ce85186a6349ec293542f84c7 (patch) | |
tree | 370202a3718f2e7c6e10226cc84a70789becde6d /llvm/lib/Transforms/Scalar/SROA.cpp | |
parent | fb2f33183e67632ba634cb72758b350c0dde9d9b (diff) | |
download | bcm5719-llvm-7c4d7b8fbe21566ce85186a6349ec293542f84c7.tar.gz bcm5719-llvm-7c4d7b8fbe21566ce85186a6349ec293542f84c7.zip |
Construct ArrayRef<const T*> from vector<T>
ArrayRef already has a SFINAE constructor which can construct ArrayRef<const T*> from ArrayRef<T*>.
This adds methods to do the same directly from SmallVector and std::vector. This avoids an intermediate step through the use of makeArrayRef.
Also update the users of this in LICM and SROA to remove the now unnecessary makeArrayRef call.
Reviewed by David Blaikie.
llvm-svn: 237309
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SROA.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SROA.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp index 2e785807759..056dd11b5ab 100644 --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/lib/Transforms/Scalar/SROA.cpp @@ -4419,7 +4419,7 @@ bool SROA::promoteAllocas(Function &F) { DeadInsts.push_back(I); enqueueUsersInWorklist(*I, Worklist, Visited); } - AllocaPromoter(makeArrayRef(Insts), SSA, *AI, DIB).run(Insts); + AllocaPromoter(Insts, SSA, *AI, DIB).run(Insts); while (!DeadInsts.empty()) DeadInsts.pop_back_val()->eraseFromParent(); AI->eraseFromParent(); |