2024-01-09 17:28:28 +03:00
|
|
|
#pragma once
|
|
|
|
|
#include "data_flow.h"
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <set>
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
2025-06-04 13:08:38 +03:00
|
|
|
#include "SgUtils.h"
|
2024-01-09 17:28:28 +03:00
|
|
|
#include "../CFGraph.h"
|
|
|
|
|
#include "../IR.h"
|
|
|
|
|
|
2024-01-12 16:57:02 +03:00
|
|
|
template <class NodeType>
|
2024-04-04 20:15:56 +03:00
|
|
|
class BackwardDataFlowAnalysis : public DataFlowAnalysis<NodeType>
|
|
|
|
|
{
|
2024-01-09 17:28:28 +03:00
|
|
|
std::vector<SAPFOR::BasicBlock*> reorderSequence(const std::vector<SAPFOR::BasicBlock*>& blocks,
|
2024-01-12 16:57:02 +03:00
|
|
|
const std::set<SAPFOR::BasicBlock*> back_edge_sources);
|
2024-01-09 17:28:28 +03:00
|
|
|
public:
|
|
|
|
|
void fit(const std::vector<SAPFOR::BasicBlock*>& blocks);
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-10 23:53:12 +03:00
|
|
|
#include "backward_data_flow_impl.h"
|