From c9a00d66760956b92f52bb92cade3edec9c9c978 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 15 Jun 2023 17:33:24 +0200 Subject: [PATCH] nv50/ir: resolve -Woverloaded-virtual=1 warnings Part-of: --- src/nouveau/codegen/nv50_ir.h | 8 ++++---- src/nouveau/codegen/nv50_ir_lowering_gm107.h | 7 ++++--- src/nouveau/codegen/nv50_ir_lowering_nvc0.h | 11 ++++++----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/nouveau/codegen/nv50_ir.h b/src/nouveau/codegen/nv50_ir.h index 0b2940802d5..d734528610a 100644 --- a/src/nouveau/codegen/nv50_ir.h +++ b/src/nouveau/codegen/nv50_ir.h @@ -1399,15 +1399,15 @@ public: bool run(Function *, bool ordered = false, bool skipPhi = false); private: + bool doRun(Program *, bool ordered, bool skipPhi); + bool doRun(Function *, bool ordered, bool skipPhi); + +protected: // return false to continue with next entity on next higher level virtual bool visit(Function *) { return true; } virtual bool visit(BasicBlock *) { return true; } virtual bool visit(Instruction *) { return false; } - bool doRun(Program *, bool ordered, bool skipPhi); - bool doRun(Function *, bool ordered, bool skipPhi); - -protected: bool err; Function *func; Program *prog; diff --git a/src/nouveau/codegen/nv50_ir_lowering_gm107.h b/src/nouveau/codegen/nv50_ir_lowering_gm107.h index dd281e439bc..239aae641b7 100644 --- a/src/nouveau/codegen/nv50_ir_lowering_gm107.h +++ b/src/nouveau/codegen/nv50_ir_lowering_gm107.h @@ -6,7 +6,8 @@ class GM107LoweringPass : public NVC0LoweringPass { public: GM107LoweringPass(Program *p) : NVC0LoweringPass(p) {} -private: +protected: + using NVC0LoweringPass::visit; bool visit(Instruction *) override; bool handleManualTXD(TexInstruction *) override; @@ -18,10 +19,10 @@ private: class GM107LegalizeSSA : public NVC0LegalizeSSA { -private: +protected: + using NVC0LegalizeSSA::visit; bool visit(Instruction *) override; -protected: void handlePFETCH(Instruction *); void handleLOAD(Instruction *); void handleQUADON(Instruction *); diff --git a/src/nouveau/codegen/nv50_ir_lowering_nvc0.h b/src/nouveau/codegen/nv50_ir_lowering_nvc0.h index f9cc1f52e9b..0aefa071c55 100644 --- a/src/nouveau/codegen/nv50_ir_lowering_nvc0.h +++ b/src/nouveau/codegen/nv50_ir_lowering_nvc0.h @@ -56,7 +56,8 @@ namespace nv50_ir { class NVC0LegalizeSSA : public Pass { -private: +protected: + using Pass::visit; bool visit(BasicBlock *) override; bool visit(Function *) override; @@ -69,7 +70,6 @@ private: void handleShift(Instruction *); void handleBREV(Instruction *); -protected: void handleFTZ(Instruction *); BuildUtil bld; @@ -80,10 +80,12 @@ class NVC0LegalizePostRA : public Pass public: NVC0LegalizePostRA(const Program *); -private: +protected: + using Pass::visit; bool visit(Function *) override; bool visit(BasicBlock *) override; +private: void replaceCvt(Instruction *); void replaceZero(Instruction *); bool tryReplaceContWithBra(BasicBlock *); @@ -156,11 +158,10 @@ protected: Value *loadMsAdjInfo32(TexInstruction::Target targ, uint32_t index, int slot, Value *ind, bool bindless); bool visit(Instruction *) override; - -private: bool visit(Function *) override; bool visit(BasicBlock *) override; +private: void readTessCoord(LValue *dst, int c); Value *loadResInfo32(Value *ptr, uint32_t off, uint16_t base);