[PATCH] D114374: [llvm]{NFC][IPO] Inclusive language: Rename mergefunc-sanity to mergefunc-verify and remove other instances of sanity in MergeFunctions.cpp
Zarko Todorovski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 22 08:46:22 PST 2021
ZarkoCA created this revision.
ZarkoCA added reviewers: dyatkovskiy, sanjoy, jfb, dschuff, quinnp.
Herald added subscribers: ormris, hiraditya.
ZarkoCA requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch renames the mergefunc-sanity to mergefunc-verify and renames the related functions to use more
inclusive language
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114374
Files:
llvm/lib/Transforms/IPO/MergeFunctions.cpp
Index: llvm/lib/Transforms/IPO/MergeFunctions.cpp
===================================================================
--- llvm/lib/Transforms/IPO/MergeFunctions.cpp
+++ llvm/lib/Transforms/IPO/MergeFunctions.cpp
@@ -139,10 +139,10 @@
STATISTIC(NumAliasesWritten, "Number of aliases generated");
STATISTIC(NumDoubleWeak, "Number of new functions created");
-static cl::opt<unsigned> NumFunctionsForSanityCheck(
- "mergefunc-sanity",
- cl::desc("How many functions in module could be used for "
- "MergeFunctions pass sanity check. "
+static cl::opt<unsigned> NumFunctionsForVerificationCheck(
+ "mergefunc-verify",
+ cl::desc("How many functions in a module could be used for "
+ "MergeFunctions to pass a basic correctness check. "
"'0' disables this check. Works only with '-debug' key."),
cl::init(0), cl::Hidden);
@@ -230,8 +230,8 @@
#ifndef NDEBUG
/// Checks the rules of order relation introduced among functions set.
- /// Returns true, if sanity check has been passed, and false if failed.
- bool doSanityCheck(std::vector<WeakTrackingVH> &Worklist);
+ /// Returns true, if check has been passed, and false if failed.
+ bool doFunctionalCheck(std::vector<WeakTrackingVH> &Worklist);
#endif
/// Insert a ComparableFunction into the FnTree, or merge it away if it's
@@ -330,12 +330,12 @@
}
#ifndef NDEBUG
-bool MergeFunctions::doSanityCheck(std::vector<WeakTrackingVH> &Worklist) {
- if (const unsigned Max = NumFunctionsForSanityCheck) {
+bool MergeFunctions::doFunctionalCheck(std::vector<WeakTrackingVH> &Worklist) {
+ if (const unsigned Max = NumFunctionsForVerificationCheck) {
unsigned TripleNumber = 0;
bool Valid = true;
- dbgs() << "MERGEFUNC-SANITY: Started for first " << Max << " functions.\n";
+ dbgs() << "MERGEFUNC-VERIFY: Started for first " << Max << " functions.\n";
unsigned i = 0;
for (std::vector<WeakTrackingVH>::iterator I = Worklist.begin(),
@@ -351,7 +351,7 @@
// If F1 <= F2, then F2 >= F1, otherwise report failure.
if (Res1 != -Res2) {
- dbgs() << "MERGEFUNC-SANITY: Non-symmetric; triple: " << TripleNumber
+ dbgs() << "MERGEFUNC-VERIFY: Non-symmetric; triple: " << TripleNumber
<< "\n";
dbgs() << *F1 << '\n' << *F2 << '\n';
Valid = false;
@@ -384,7 +384,7 @@
}
if (!Transitive) {
- dbgs() << "MERGEFUNC-SANITY: Non-transitive; triple: "
+ dbgs() << "MERGEFUNC-VERIFY: Non-transitive; triple: "
<< TripleNumber << "\n";
dbgs() << "Res1, Res3, Res4: " << Res1 << ", " << Res3 << ", "
<< Res4 << "\n";
@@ -395,7 +395,7 @@
}
}
- dbgs() << "MERGEFUNC-SANITY: " << (Valid ? "Passed." : "Failed.") << "\n";
+ dbgs() << "MERGEFUNC-VERIFY: " << (Valid ? "Passed." : "Failed.") << "\n";
return Valid;
}
return true;
@@ -436,7 +436,7 @@
std::vector<WeakTrackingVH> Worklist;
Deferred.swap(Worklist);
- LLVM_DEBUG(doSanityCheck(Worklist));
+ LLVM_DEBUG(doFunctionalCheck(Worklist));
LLVM_DEBUG(dbgs() << "size of module: " << M.size() << '\n');
LLVM_DEBUG(dbgs() << "size of worklist: " << Worklist.size() << '\n');
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114374.388932.patch
Type: text/x-patch
Size: 3291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211122/16ed0e14/attachment.bin>
More information about the llvm-commits
mailing list