mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
Introduce ABIAnalyses2
Architecture-agnostic and ABI-independent data-flow analyses that traverse the recovered functions in order to detect arguments and return values registers.
This commit is contained in:
committed by
Antonio Frighetto
parent
835089705e
commit
12c3ce2dba
@@ -58,6 +58,7 @@
|
||||
#include "revng/Support/IRHelpers.h"
|
||||
#include "revng/Support/MetaAddress.h"
|
||||
|
||||
#include "ABIAnalyses/ABIAnalysis.h"
|
||||
#include "Cache.h"
|
||||
#include "InterproceduralAnalysis.h"
|
||||
#include "Intraprocedural.h"
|
||||
@@ -1235,6 +1236,7 @@ llvm::Function *CFEPAnalyzer<FO>::createFakeFunction(llvm::BasicBlock *Entry) {
|
||||
template<class FO>
|
||||
FunctionSummary CFEPAnalyzer<FO>::analyze(BasicBlock *Entry) {
|
||||
using namespace llvm;
|
||||
using namespace ABIAnalyses;
|
||||
|
||||
IRBuilder<> Builder(M.getContext());
|
||||
|
||||
@@ -1244,6 +1246,13 @@ FunctionSummary CFEPAnalyzer<FO>::analyze(BasicBlock *Entry) {
|
||||
// Recover the control-flow graph of the function
|
||||
auto CFG = collectDirectCFG(&OutlinedFunction);
|
||||
|
||||
// Run ABI-independent data-flow analyses
|
||||
ABIAnalysesResults
|
||||
ABIResults = ABIAnalyses::analyzeOutlinedFunction(OutFunc,
|
||||
*GCBI,
|
||||
PreHookMarker,
|
||||
PostHookMarker);
|
||||
|
||||
// The analysis aims at identifying the callee-saved registers of a function
|
||||
// and establishing if a function returns properly, i.e., it jumps to the
|
||||
// return address (regular function). In order to achieve this, the IR is
|
||||
|
||||
Reference in New Issue
Block a user