mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user