1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

[SSAUpdaterBulk] Add * and & to auto.

llvm-svn: 330400
This commit is contained in:
Michael Zolotukhin 2018-04-20 07:58:54 +00:00
parent 14e2309a1f
commit 9a465a9cac

View File

@ -126,7 +126,7 @@ ComputeLiveInBlocks(const SmallPtrSetImpl<BasicBlock *> &UsingBlocks,
/// requested uses update.
void SSAUpdaterBulk::RewriteAllUses(DominatorTree *DT,
SmallVectorImpl<PHINode *> *InsertedPHIs) {
for (auto P : Rewrites) {
for (auto &P : Rewrites) {
// Compute locations for new phi-nodes.
// For that we need to initialize DefBlocks from definitions in R.Defines,
// UsingBlocks from uses in R.Uses, then compute LiveInBlocks, and then use
@ -138,12 +138,12 @@ void SSAUpdaterBulk::RewriteAllUses(DominatorTree *DT,
<< R.Uses.size() << " use(s)\n");
SmallPtrSet<BasicBlock *, 2> DefBlocks;
for (auto Def : R.Defines)
for (auto &Def : R.Defines)
DefBlocks.insert(Def.first);
IDF.setDefiningBlocks(DefBlocks);
SmallPtrSet<BasicBlock *, 2> UsingBlocks;
for (auto U : R.Uses)
for (Use *U : R.Uses)
UsingBlocks.insert(getUserBB(U));
SmallVector<BasicBlock *, 32> IDFBlocks;
@ -155,7 +155,7 @@ void SSAUpdaterBulk::RewriteAllUses(DominatorTree *DT,
// We've computed IDF, now insert new phi-nodes there.
SmallVector<PHINode *, 4> InsertedPHIsForVar;
for (auto FrontierBB : IDFBlocks) {
for (auto *FrontierBB : IDFBlocks) {
IRBuilder<> B(FrontierBB, FrontierBB->begin());
PHINode *PN = B.CreatePHI(R.Ty, 0, R.Name);
R.Defines[FrontierBB] = PN;