Skip to content

Commit 67b75a1

Browse files
committed
!fixup address latest comments, thanks
1 parent 1cb23d7 commit 67b75a1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

llvm/lib/Transforms/IPO/MergeFunctions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ class MergeFunctions {
285285

286286
// If needed, replace G with an alias to F if possible, or a thunk to F if
287287
// profitable. Returns false if neither is the case. If \p G is not needed
288-
// (e.g. it is discardable and linkonce_odr), \p G is removed directly.
288+
// (i.e. it is discardable and not used), \p G is removed directly.
289289
bool writeThunkOrAliasIfNeeded(Function *F, Function *G);
290290

291291
/// Replace function F with function G in the function tree.
@@ -877,8 +877,8 @@ void MergeFunctions::writeAlias(Function *F, Function *G) {
877877
}
878878

879879
// If needed, replace G with an alias to F if possible, or a thunk to F if
880-
// profitable. Returns false if neither is the case. If \p G is not needed (e.g.
881-
// it is discardable and linkonce_odr), \p G is removed directly.
880+
// profitable. Returns false if neither is the case. If \p G is not needed (i.e.
881+
// it is discardable and unused), \p G is removed directly.
882882
bool MergeFunctions::writeThunkOrAliasIfNeeded(Function *F, Function *G) {
883883
if (G->isDiscardableIfUnused() && G->use_empty() && !MergeFunctionsPDI) {
884884
G->eraseFromParent();

llvm/test/Transforms/MergeFunc/linkonce.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --include-generated-funcs --version 5
2-
; RUN: opt -S -passes=mergefunc < %s | FileCheck %s -implicit-check-not=funC
2+
; RUN: opt -S -passes=mergefunc < %s | FileCheck %s -implicit-check-not=funA -implicit-check-not=funC
33

44
; Replacments should be totally ordered on the function name.
55
; If we don't do this we can end up with one module defining a thunk for @funA

llvm/test/Transforms/MergeFunc/linkonce_odr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --include-generated-funcs --version 5
2-
; RUN: opt -S -passes=mergefunc < %s | FileCheck %s -implicit-check-not=funC
2+
; RUN: opt -S -passes=mergefunc < %s | FileCheck %s -implicit-check-not=funA -implicit-check-not=funC
33

44
; Replacments should be totally ordered on the function name.
55
; If we don't do this we can end up with one module defining a thunk for @funA

0 commit comments

Comments
 (0)