summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
diff options
context:
space:
mode:
authorMitch Phillips <mitchphillips@outlook.com>2017-10-23 20:25:19 +0000
committerMitch Phillips <mitchphillips@outlook.com>2017-10-23 20:25:19 +0000
commit99fa140501d3bde8212303c66a5ef43123fe51c6 (patch)
tree29bf7def6e646a505e40359a424aee5045be2d5e /llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
parent52bbd587ac575acc80876479dc25c3981add4ff1 (diff)
downloadbcm5719-llvm-99fa140501d3bde8212303c66a5ef43123fe51c6.tar.gz
bcm5719-llvm-99fa140501d3bde8212303c66a5ef43123fe51c6.zip
Graph builder implementation.
Implement a localised graph builder for indirect control flow instructions. Main interface is through GraphBuilder::buildFlowGraph, which will build a flow graph around an indirect CF instruction. Various modifications to FileVerifier are also made to const-expose some members needed for machine code analysis done by the graph builder. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, kcc, pcc Differential Revision: https://reviews.llvm.org/D38427 llvm-svn: 316372
Diffstat (limited to 'llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h')
-rw-r--r--llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
index df1ad603b6c..3c24bcda75c 100644
--- a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
+++ b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
@@ -10,6 +10,7 @@
#ifndef LLVM_CFI_VERIFY_FILE_ANALYSIS_H
#define LLVM_CFI_VERIFY_FILE_ANALYSIS_H
+#include "llvm/ADT/DenseMap.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
@@ -161,7 +162,7 @@ private:
// Contains a mapping between a specific address, and a list of instructions
// that use this address as a branch target (including call instructions).
- std::unordered_map<uint64_t, std::vector<uint64_t>> StaticBranchTargetings;
+ DenseMap<uint64_t, std::vector<uint64_t>> StaticBranchTargetings;
// A list of addresses of indirect control flow instructions.
std::set<uint64_t> IndirectInstructions;
OpenPOWER on IntegriCloud