[llvm] r285508 - [ThinLTO] Rename doPromoteLocalToGlobal to shouldPromoteLocalToGlobal (NFC)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 29 14:52:23 PDT 2016
Author: tejohnson
Date: Sat Oct 29 16:52:23 2016
New Revision: 285508
URL: http://llvm.org/viewvc/llvm-project?rev=285508&view=rev
Log:
[ThinLTO] Rename doPromoteLocalToGlobal to shouldPromoteLocalToGlobal (NFC)
Rename as suggested in code review for D26063.
Modified:
llvm/trunk/include/llvm/Transforms/Utils/FunctionImportUtils.h
llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp
Modified: llvm/trunk/include/llvm/Transforms/Utils/FunctionImportUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/FunctionImportUtils.h?rev=285508&r1=285507&r2=285508&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/FunctionImportUtils.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/FunctionImportUtils.h Sat Oct 29 16:52:23 2016
@@ -41,7 +41,7 @@ class FunctionImportGlobalProcessing {
bool HasExportedFunctions = false;
/// Check if we should promote the given local value to global scope.
- bool doPromoteLocalToGlobal(const GlobalValue *SGV);
+ bool shouldPromoteLocalToGlobal(const GlobalValue *SGV);
/// Helper methods to check if we are importing from or potentially
/// exporting from the current source module.
Modified: llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp?rev=285508&r1=285507&r2=285508&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/FunctionImportUtils.cpp Sat Oct 29 16:52:23 2016
@@ -48,7 +48,7 @@ bool FunctionImportGlobalProcessing::doI
GlobalsToImport);
}
-bool FunctionImportGlobalProcessing::doPromoteLocalToGlobal(
+bool FunctionImportGlobalProcessing::shouldPromoteLocalToGlobal(
const GlobalValue *SGV) {
assert(SGV->hasLocalLinkage());
// Both the imported references and the original local variable must
@@ -193,9 +193,9 @@ FunctionImportGlobalProcessing::getLinka
void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
bool DoPromote = false;
if (GV.hasLocalLinkage() &&
- ((DoPromote = doPromoteLocalToGlobal(&GV)) || isPerformingImport())) {
+ ((DoPromote = shouldPromoteLocalToGlobal(&GV)) || isPerformingImport())) {
// Once we change the name or linkage it is difficult to determine
- // again whether we should promote since doPromoteLocalToGlobal needs
+ // again whether we should promote since shouldPromoteLocalToGlobal needs
// to locate the summary (based on GUID from name and linkage). Therefore,
// use DoPromote result saved above.
GV.setName(getName(&GV, DoPromote));
More information about the llvm-commits
mailing list