[JIT] Run the SimplificationPass/ConstantPropagationPass until there are no changes.
This commit is contained in:
@@ -10,27 +10,27 @@
|
||||
#ifndef XENIA_CPU_COMPILER_PASSES_SIMPLIFICATION_PASS_H_
|
||||
#define XENIA_CPU_COMPILER_PASSES_SIMPLIFICATION_PASS_H_
|
||||
|
||||
#include "xenia/cpu/compiler/compiler_pass.h"
|
||||
#include "xenia/cpu/compiler/passes/conditional_group_subpass.h"
|
||||
|
||||
namespace xe {
|
||||
namespace cpu {
|
||||
namespace compiler {
|
||||
namespace passes {
|
||||
|
||||
class SimplificationPass : public CompilerPass {
|
||||
class SimplificationPass : public ConditionalGroupSubpass {
|
||||
public:
|
||||
SimplificationPass();
|
||||
~SimplificationPass() override;
|
||||
|
||||
bool Run(hir::HIRBuilder* builder) override;
|
||||
bool Run(hir::HIRBuilder* builder, bool& result) override;
|
||||
|
||||
private:
|
||||
void EliminateConversions(hir::HIRBuilder* builder);
|
||||
void CheckTruncate(hir::Instr* i);
|
||||
void CheckByteSwap(hir::Instr* i);
|
||||
bool EliminateConversions(hir::HIRBuilder* builder);
|
||||
bool CheckTruncate(hir::Instr* i);
|
||||
bool CheckByteSwap(hir::Instr* i);
|
||||
|
||||
void SimplifyAssignments(hir::HIRBuilder* builder);
|
||||
hir::Value* CheckValue(hir::Value* value);
|
||||
bool SimplifyAssignments(hir::HIRBuilder* builder);
|
||||
hir::Value* CheckValue(hir::Value* value, bool& result);
|
||||
};
|
||||
|
||||
} // namespace passes
|
||||
|
||||
Reference in New Issue
Block a user