[gardening] Drop BB from all argument related code in SILBasicBlock.

Before this commit all code relating to handling arguments in SILBasicBlock had
somewhere in the name BB. This is redundant given that the class's name is
already SILBasicBlock. This commit drops those names.

Some examples:

getBBArg() => getArgument()
BBArgList => ArgumentList
bbarg_begin() => args_begin()
This commit is contained in:
Michael Gottesman
2016-11-25 00:14:08 -06:00
parent e42bf07af4
commit bf6920650c
68 changed files with 398 additions and 386 deletions

View File

@@ -427,7 +427,7 @@ bool COWArrayOpt::checkUniqueArrayContainer(SILValue ArrayContainer) {
// Check that the argument is passed as an inout type. This means there are
// no aliases accessible within this function scope.
auto Params = Function->getLoweredFunctionType()->getParameters();
ArrayRef<SILArgument*> FunctionArgs = Function->begin()->getBBArgs();
ArrayRef<SILArgument *> FunctionArgs = Function->begin()->getArguments();
for (unsigned ArgIdx = 0, ArgEnd = Params.size();
ArgIdx != ArgEnd; ++ArgIdx) {
if (FunctionArgs[ArgIdx] != Arg)
@@ -1819,7 +1819,7 @@ private:
// Check that the argument is passed as an inout or by value type. This
// means there are no aliases accessible within this function scope.
auto Params = Fun->getLoweredFunctionType()->getParameters();
ArrayRef<SILArgument*> FunctionArgs = Fun->begin()->getBBArgs();
ArrayRef<SILArgument *> FunctionArgs = Fun->begin()->getArguments();
for (unsigned ArgIdx = 0, ArgEnd = Params.size(); ArgIdx != ArgEnd;
++ArgIdx) {
if (FunctionArgs[ArgIdx] != Arg)
@@ -1979,7 +1979,7 @@ public:
BBMap[StartBB] = ClonedStartBB;
// Clone the arguments.
for (auto &Arg : StartBB->getBBArgs()) {
for (auto &Arg : StartBB->getArguments()) {
SILValue MappedArg =
new (Mod) SILArgument(ClonedStartBB, getOpType(Arg->getType()));
ValueMap.insert(std::make_pair(Arg, MappedArg));
@@ -2091,7 +2091,7 @@ protected:
auto *OrigBB = Entry.first;
// Update outside used phi values.
for (auto *Arg : OrigBB->getBBArgs())
for (auto *Arg : OrigBB->getArguments())
updateSSAForValue(OrigBB, Arg, SSAUp);
// Update outside used instruction values.