[llvm] [AsmPrinter] Reduce AsmPrinterHandlers virt. fn calls (PR #96785)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 12:30:44 PDT 2024
================
@@ -382,13 +382,10 @@ class AsmPrinterHandlerTest : public AsmPrinterFixtureBase {
public:
TestHandler(AsmPrinterHandlerTest &Test) : Test(Test) {}
virtual ~TestHandler() {}
- virtual void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
virtual void beginModule(Module *M) override { Test.BeginCount++; }
virtual void endModule() override { Test.EndCount++; }
virtual void beginFunction(const MachineFunction *MF) override {}
virtual void endFunction(const MachineFunction *MF) override {}
- virtual void beginInstruction(const MachineInstr *MI) override {}
----------------
aengelke wrote:
For this purpose, I already added `addDebugHandler` where you can add a DebugHandler(Base), which still allows to hook in at every instruction. Could you check whether this replacement suits your needs?
> reducing the internal instruction counter metric
That's one way to phrase it -- improving performance of every single compilation done by LLVM would be mine. :shrug:
https://github.com/llvm/llvm-project/pull/96785
More information about the llvm-commits
mailing list