[ssa-updater] Modernize style before adding support for guaranteed parameters.

Specifically:

1. I made methods, variables camelCase.
2. I expanded out variable names (e.x.: bb -> block, predBB -> predBlocks, U -> wrappedUse).
3. I changed typedef -> using.
4. I changed a few c style for loops into for each loops using llvm::enumerate.

NOTE: I left the parts needed for syncing to LLVM in the old style since LLVM
needs these to exist for CRTP to work correctly for the SILSSAUpdater.
This commit is contained in:
Michael Gottesman
2020-08-03 19:17:31 -07:00
parent 28b2f1eb49
commit d064241599
11 changed files with 368 additions and 348 deletions

View File

@@ -131,9 +131,9 @@ static void updateSSAForUseOfValue(
assert(Res->getType() == MappedValue->getType() && "The types must match");
insertedPhis.clear();
updater.Initialize(Res->getType());
updater.AddAvailableValue(Header, Res);
updater.AddAvailableValue(EntryCheckBlock, MappedValue);
updater.initialize(Res->getType());
updater.addAvailableValue(Header, Res);
updater.addAvailableValue(EntryCheckBlock, MappedValue);
// Because of the way that phi nodes are represented we have to collect all
// uses before we update SSA. Modifying one phi node can invalidate another
@@ -155,7 +155,7 @@ static void updateSSAForUseOfValue(
assert(user->getParent() != EntryCheckBlock
&& "The entry check block should dominate the header");
updater.RewriteUse(*use);
updater.rewriteUse(*use);
}
// Canonicalize inserted phis to avoid extra BB Args.
for (SILPhiArgument *arg : insertedPhis) {