mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
020aeb9497
This is a preliminary commit to cleanup the directory structure before adding unit tests.
31 lines
629 B
C++
31 lines
629 B
C++
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
// LLVM includes
|
|
#include <llvm/Pass.h>
|
|
#include <llvm/Support/raw_ostream.h>
|
|
|
|
// local includes
|
|
#include "LivenessAnalysis.h"
|
|
|
|
using namespace llvm;
|
|
|
|
struct LivenessAnalysisPass : public FunctionPass {
|
|
static char ID;
|
|
|
|
LivenessAnalysisPass() : FunctionPass(ID) {}
|
|
|
|
bool runOnFunction(Function &F) override {
|
|
LivenessAnalysis::Analysis LA(F);
|
|
LA.initialize();
|
|
LA.run();
|
|
return false;
|
|
}
|
|
|
|
};
|
|
|
|
char LivenessAnalysisPass::ID = 0;
|
|
|
|
static RegisterPass<LivenessAnalysisPass> X("liveness", "Liveness Analysis", false, false);
|