Add Dead Code Elimitation pass

Refactor the previous WIP to use NumUses
This commit is contained in:
Scott Mansell authored and Stefanos Kornilios Mitsis Poiitidis committed 2020-03-06 07:55:36 +02:00
1 parent b34465544a
commit b148afef4b
3 files changed
+38 -105

No files matched your search

+1
View File
@@ -10,6 +10,7 @@ void PassManager::AddDefaultPasses() {
Passes.emplace_back(std::unique_ptr<FEXCore::IR::Pass>(CreateRedundantFlagCalculationEliminination()));
Passes.emplace_back(std::unique_ptr<FEXCore::IR::Pass>(CreateSyscallOptimization()));
Passes.emplace_back(std::unique_ptr<FEXCore::IR::Pass>(CreatePassDeadContextStoreElimination()));
Passes.emplace_back(std::unique_ptr<FEXCore::IR::Pass>(CreatePassDeadCodeElimination()));
// If the IR is compacted post-RA then the node indexing gets messed up and the backend isn't able to find the register assigned to a node
// Compact before IR, don't worry about RA generating spills/fills