[llvm] [BOLT][AArch64] Implemented createDummyReturnFunction. (PR #96626)
Pavel Samolysov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 6 05:29:45 PDT 2024
================
@@ -1582,6 +1607,12 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
return Instrs;
}
+ InstructionListType createDummyReturnFunction(MCContext *Ctx) const override {
+ InstructionListType Insts(1);
+ createReturn(Insts[0]);
+ return Insts;
----------------
samolisov wrote:
I believe, a common implementation of a method in a basic class is a good thing until we mark the method as a pure virtual function (what is not our case). When a new architecture needs a different implementation of the method, it should just override it. I agree, eventually this may lead to a situation where two architectures share the common implementation while many many other do not. A controversial thing.
I agree, a lot of method in the base class here have only some stub implementation with an error reporting and `return false`, this is an approach used trough the whole llvm codebase. It strange a little bit, but I get the goal: just let the developers of particular architectures do not implement all of them.
https://github.com/llvm/llvm-project/pull/96626
More information about the llvm-commits
mailing list