passes.h 703 B

12345678910111213141516171819202122232425
  1. // Copyright 2021 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "shader_recompiler/frontend/ir/basic_block.h"
  6. #include "shader_recompiler/frontend/ir/function.h"
  7. namespace Shader::Optimization {
  8. template <typename Func>
  9. void Invoke(Func&& func, IR::Function& function) {
  10. for (const auto& block : function.blocks) {
  11. func(*block);
  12. }
  13. }
  14. void DeadCodeEliminationPass(IR::Block& block);
  15. void GetSetElimination(IR::Block& block);
  16. void IdentityRemovalPass(IR::Block& block);
  17. void SsaRewritePass(IR::Function& function);
  18. void VerificationPass(const IR::Block& block);
  19. } // namespace Shader::Optimization