mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
5698284bea
The MaterializeTrivialGoto pass, tries to remove superfluous `goto` from the `ScopeGraph`, by verifying that the resulting `ScopeGraph` does not become cyclic or undecided. In that case, it rolls back the changes.
21 lines
431 B
C++
21 lines
431 B
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "llvm/IR/Function.h"
|
|
#include "llvm/Pass.h"
|
|
|
|
class MaterializeTrivialGotoPass : public llvm::FunctionPass {
|
|
public:
|
|
static char ID;
|
|
|
|
public:
|
|
MaterializeTrivialGotoPass() : llvm::FunctionPass(ID) {}
|
|
|
|
bool runOnFunction(llvm::Function &F) override;
|
|
|
|
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override;
|
|
};
|