Skip to content

Commit

Permalink
Merge pull request #671 from smackers/optimize-galloc
Browse files Browse the repository at this point in the history
Do not generate calls to $galloc procedures for functions
  • Loading branch information
zvonimir authored Dec 22, 2020
2 parents 45ff4d7 + e1f2339 commit 2552c01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/smack/SmackRep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,9 @@ std::list<Decl *> SmackRep::globalDecl(const llvm::GlobalValue *v) {
decls.push_back(Decl::axiom(Expr::eq(
Expr::id(name), pointerLit(globalsOffset -= (size + globalsPadding)))));
}
globalAllocations[v] = size;

if (!llvm::isa<Function>(v))
globalAllocations[v] = size;

return decls;
}
Expand Down

0 comments on commit 2552c01

Please sign in to comment.