-
Notifications
You must be signed in to change notification settings - Fork 15.3k
NFC][BOLT] Rename createDummyReturnFunction to createReturnInstructi.. #98448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFC][BOLT] Rename createDummyReturnFunction to createReturnInstructi.. #98448
Conversation
|
@llvm/pr-subscribers-bolt Author: Paschalis Mpeis (paschalis-mpeis) Changes
This patch renames it to Stacked on top of:
Full diff: https://github.com/llvm/llvm-project/pull/98448.diff 2 Files Affected:
diff --git a/bolt/include/bolt/Core/MCPlusBuilder.h b/bolt/include/bolt/Core/MCPlusBuilder.h
index 885d627f7b64f..c20b0edc36499 100644
--- a/bolt/include/bolt/Core/MCPlusBuilder.h
+++ b/bolt/include/bolt/Core/MCPlusBuilder.h
@@ -2044,7 +2044,7 @@ class MCPlusBuilder {
/// Returns a function body that contains only a return instruction. An
/// example usage is a workaround for the '__bolt_fini_trampoline' of
// Instrumentation.
- virtual InstructionListType createDummyReturnFunction(MCContext *Ctx) const {
+ virtual InstructionListType createReturnBody(MCContext *Ctx) const {
InstructionListType Insts(1);
createReturn(Insts[0]);
return Insts;
diff --git a/bolt/lib/Passes/Instrumentation.cpp b/bolt/lib/Passes/Instrumentation.cpp
index e824a42d82696..805e7a7434f8f 100644
--- a/bolt/lib/Passes/Instrumentation.cpp
+++ b/bolt/lib/Passes/Instrumentation.cpp
@@ -754,7 +754,7 @@ void Instrumentation::createAuxiliaryFunctions(BinaryContext &BC) {
// with unknown symbol in runtime library. E.g. for static PIE
// executable
createSimpleFunction("__bolt_fini_trampoline",
- BC.MIB->createDummyReturnFunction(BC.Ctx.get()));
+ BC.MIB->createReturnBody(BC.Ctx.get()));
}
}
}
|
aaupov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: createReturnInstructionList
samolisov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
19e7cb3 to
fa4ded3
Compare
b564185 to
2e9d663
Compare
|
Rebased on top of the updated #96626 |
2e9d663 to
62d9398
Compare
…onList createDummyReturnFunction is not creating a function but instead only a function body that is simply a return statement. This patch renames it to: createReturnInstructionList
62d9398 to
8c147e0
Compare
|
Forced-pushed to rebase and re-trigger tests. Will merge by EOD. |
createDummyReturnFunctionis not creating a function but instead onlya function body that is simply a return statement.
This patch renames it to:
createReturnInstructionListStacked on top of: