Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bb addr to spec #406

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data_specifications/specification.proto
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ message CodeBlock {
uint32 size = 5;
map<string, uint64> context_assignments = 6;
uint64 uid = 7;
// address may not correspond to actual basic-blocks
// so we store the real one here
uint64 bb_addr = 8;
}

message Variables {
Expand Down
1 change: 1 addition & 0 deletions include/anvill/Declarations.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ namespace anvill {

struct CodeBlock {
uint64_t addr;
uint64_t bb_addr;
uint32_t size;
std::unordered_set<Uid> outgoing_edges;
// The set of context assignments that occur at the entry point to this block.
Expand Down
1 change: 1 addition & 0 deletions lib/Protobuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ void ProtobufTranslator::ParseCFGIntoFunction(
}
CodeBlock nblk = {
blk.second.address(),
blk.second.bb_addr(),
blk.second.size(),
tmp,
{blk.second.context_assignments().begin(),
Expand Down
Loading