mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
Cleanups
This commit is contained in:
parent
9c244ed08e
commit
98a30815ac
3 changed files with 4 additions and 11 deletions
|
|
@ -59,7 +59,6 @@ public:
|
|||
BasicBlock(const BasicBlock&) = delete;
|
||||
void operator=(const BasicBlock&) = delete;
|
||||
|
||||
operator llvm::BasicBlock*() { return m_llvmBB; } // TODO: Remove it
|
||||
llvm::BasicBlock* llvm() { return m_llvmBB; }
|
||||
|
||||
bytes::const_iterator begin() { return m_begin; }
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ std::unique_ptr<llvm::Module> Compiler::compile(bytes const& _bytecode, std::str
|
|||
Stack stack(m_builder, runtimeManager);
|
||||
Arith256 arith(m_builder);
|
||||
|
||||
m_builder.CreateBr(m_basicBlocks.empty() ? m_stopBB : m_basicBlocks.begin()->second);
|
||||
m_builder.CreateBr(m_basicBlocks.empty() ? m_stopBB : m_basicBlocks.begin()->second.llvm());
|
||||
|
||||
for (auto basicBlockPairIt = m_basicBlocks.begin(); basicBlockPairIt != m_basicBlocks.end(); ++basicBlockPairIt)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,19 +20,13 @@ public:
|
|||
struct Options
|
||||
{
|
||||
/// Optimize stack operations between basic blocks
|
||||
bool optimizeStack;
|
||||
bool optimizeStack = true;
|
||||
|
||||
/// Rewrite switch instructions to sequences of branches
|
||||
bool rewriteSwitchToBranches;
|
||||
bool rewriteSwitchToBranches = true;
|
||||
|
||||
/// Dump CFG as a .dot file for graphviz
|
||||
bool dumpCFG;
|
||||
|
||||
Options():
|
||||
optimizeStack(true),
|
||||
rewriteSwitchToBranches(true),
|
||||
dumpCFG(false)
|
||||
{}
|
||||
bool dumpCFG = false;
|
||||
};
|
||||
|
||||
using ProgramCounter = uint64_t;
|
||||
|
|
|
|||
Loading…
Reference in a new issue