mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
47fac0d948
Introduce the `select-scope` pass. This pass is in charge of enforcing the relative decidedness property for all the nodes in the `ScopeGraph`, wrt. to all the conditional nodes. It does this by applying the relative decidedness definition, electing one scope for each conditional node in the graph, and by transforming all the edges that would violate the property into goto edges.
21 lines
388 B
C++
21 lines
388 B
C++
#pragma once
|
|
|
|
//
|
|
// Copyright rev.ng Labs Srl. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "llvm/IR/Function.h"
|
|
#include "llvm/Pass.h"
|
|
|
|
class SelectScopePass : public llvm::FunctionPass {
|
|
public:
|
|
static char ID;
|
|
|
|
public:
|
|
SelectScopePass() : llvm::FunctionPass(ID) {}
|
|
|
|
bool runOnFunction(llvm::Function &F) override;
|
|
|
|
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override;
|
|
};
|