[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

@@ -29,8 +29,8 @@ static SILBasicBlock *createInitialPreheader(SILBasicBlock *Header) {
// Clone the arguments from header into the pre-header.
llvm::SmallVector<SILValue, 8> Args;
for (auto *HeaderArg : Header->getBBArgs()) {
Args.push_back(Preheader->createBBArg(HeaderArg->getType(), nullptr));
for (auto *HeaderArg : Header->getArguments()) {
Args.push_back(Preheader->createArgument(HeaderArg->getType(), nullptr));
}
// Create the branch to the header.
@@ -124,8 +124,9 @@ static SILBasicBlock *insertBackedgeBlock(SILLoop *L, DominanceInfo *DT,
// Now that the block has been inserted into the function, create PHI nodes in
// the backedge block which correspond to any PHI nodes in the header block.
SmallVector<SILValue, 6> BBArgs;
for (auto *BBArg : Header->getBBArgs()) {
BBArgs.push_back(BEBlock->createBBArg(BBArg->getType(), /*Decl=*/nullptr));
for (auto *BBArg : Header->getArguments()) {
BBArgs.push_back(
BEBlock->createArgument(BBArg->getType(), /*Decl=*/nullptr));
}
// Arbitrarily pick one of the predecessor's branch locations.