[llvm] [GISel] Hold IRTranslatorImpl rather than recreating (PR #217440)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 23:06:22 PDT 2026


================
@@ -47,13 +51,17 @@ class LLVM_ABI IRTranslatorLegacy : public MachineFunctionPass {
 
 private:
   CodeGenOptLevel OptLevel;
+  std::unique_ptr<IRTranslatorImpl> Impl;
 };
 
 class IRTranslatorPass : public RequiredPassInfoMixin<IRTranslatorPass> {
-  CodeGenOptLevel OptLevel;
+  std::unique_ptr<IRTranslatorImpl> Impl;
 
 public:
-  IRTranslatorPass(CodeGenOptLevel OptLevel) : OptLevel(OptLevel) {}
+  IRTranslatorPass(CodeGenOptLevel OptLevel);
+  ~IRTranslatorPass();
+  IRTranslatorPass(IRTranslatorPass &&);
----------------
aengelke wrote:

Are these needed? If so, where? If not, delete?

https://github.com/llvm/llvm-project/pull/217440


More information about the llvm-commits mailing list