Skip to content

Commit e321fc4

Browse files
committed
[Mem2Reg] NFC: Improved function name.
Previously there were the functions `promoteSingleAllocation` and `removeSingleBlockAllocation`. The distinction between these based on the name alone is a bit subtle. Shortened the name of `promoteSingleAllocation` to `promoteAllocation`.
1 parent b3cd553 commit e321fc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILOptimizer/Transforms/SILMem2Reg.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,7 @@ class MemoryToRegisters {
19271927
/// Attempt to promote the specified stack allocation, returning true if so
19281928
/// or false if not. On success, all uses of the AllocStackInst have been
19291929
/// removed, but the ASI itself is still in the program.
1930-
bool promoteSingleAllocation(AllocStackInst *asi);
1930+
bool promoteAllocation(AllocStackInst *asi);
19311931

19321932
public:
19331933
/// C'tor
@@ -2128,7 +2128,7 @@ void MemoryToRegisters::removeSingleBlockAllocation(AllocStackInst *asi) {
21282128
/// or false if not. On success, this returns true and usually drops all of the
21292129
/// uses of the AllocStackInst, but never deletes the ASI itself. Callers
21302130
/// should check to see if the ASI is dead after this and remove it if so.
2131-
bool MemoryToRegisters::promoteSingleAllocation(AllocStackInst *alloc) {
2131+
bool MemoryToRegisters::promoteAllocation(AllocStackInst *alloc) {
21322132
LLVM_DEBUG(llvm::dbgs() << "*** Memory to register looking at: " << *alloc);
21332133
++NumAllocStackFound;
21342134

@@ -2190,7 +2190,7 @@ bool MemoryToRegisters::run() {
21902190
if (!asi)
21912191
continue;
21922192

2193-
if (promoteSingleAllocation(asi)) {
2193+
if (promoteAllocation(asi)) {
21942194
for (auto *inst : instructionsToDelete) {
21952195
deleter.forceDelete(inst);
21962196
}

0 commit comments

Comments
 (0)