[llvm] [SPIRV] Emitting DebugSource, DebugCompileUnit (PR #97558)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 03:51:41 PDT 2024


================
@@ -115,6 +115,7 @@ class SPIRVPassConfig : public TargetPassConfig {
   void addOptimizedRegAlloc() override {}
 
   void addPostRegAlloc() override;
+  void addMachinePasses() override;
----------------
VyacheslavLevytskyy wrote:

When I read the code of include/llvm/CodeGen/TargetPassConfig.h I see the following comment:

```
  /// Add the complete, standard set of LLVM CodeGen passes.
  /// Fully developed targets will not generally override this.
  virtual void addMachinePasses();
```

I understand this so that overriding of `addMachinePasses()` is not the best practice and you need to find another way to place your pass in a proper position. There are no targets with overridden `addMachinePasses()`.

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


More information about the llvm-commits mailing list