Browse Source

#include cleanups

cl-refactor
Paweł Bylica 10 years ago
parent
commit
4bcee00be9
  1. 3
      libevmjit/Arith256.cpp
  2. 1
      libevmjit/Arith256.h
  3. 14
      libevmjit/BasicBlock.cpp
  4. 3
      libevmjit/BasicBlock.h
  5. 11
      libevmjit/Cache.cpp
  6. 4
      libevmjit/Cache.h
  7. 1
      libevmjit/Common.h
  8. 29
      libevmjit/Compiler.cpp
  9. 4
      libevmjit/Compiler.h
  10. 6
      libevmjit/CompilerHelper.cpp
  11. 5
      libevmjit/CompilerHelper.h
  12. 6
      libevmjit/Endianness.cpp
  13. 3
      libevmjit/Endianness.h
  14. 4
      libevmjit/ExecStats.h
  15. 15
      libevmjit/ExecutionEngine.cpp
  16. 3
      libevmjit/ExecutionEngine.h
  17. 10
      libevmjit/Ext.cpp
  18. 4
      libevmjit/Ext.h
  19. 10
      libevmjit/GasMeter.cpp
  20. 2
      libevmjit/GasMeter.h
  21. 4
      libevmjit/Instruction.cpp
  22. 1
      libevmjit/Instruction.h
  23. 15
      libevmjit/Memory.cpp
  24. 1
      libevmjit/Memory.h
  25. 6
      libevmjit/Runtime.cpp
  26. 4
      libevmjit/Runtime.h
  27. 4
      libevmjit/RuntimeData.h
  28. 8
      libevmjit/RuntimeManager.cpp
  29. 1
      libevmjit/RuntimeManager.h
  30. 2
      libevmjit/Stack.cpp
  31. 3
      libevmjit/Stack.h
  32. 4
      libevmjit/Type.cpp
  33. 5
      libevmjit/Type.h
  34. 1
      libevmjit/Utils.cpp
  35. 1
      libevmjit/Utils.h
  36. 1
      libevmjit/preprocessor/llvm_includes_start.h

3
libevmjit/Arith256.cpp

@ -3,8 +3,9 @@
#include "Type.h" #include "Type.h"
#include "Endianness.h" #include "Endianness.h"
#include <llvm/IR/Function.h> #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h> #include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h"
#include <iostream> #include <iostream>

1
libevmjit/Arith256.h

@ -1,5 +1,4 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
namespace dev namespace dev

14
libevmjit/BasicBlock.cpp

@ -1,15 +1,15 @@
#include "BasicBlock.h" #include "BasicBlock.h"
#include "Type.h"
#include <iostream> #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/CFG.h> #include <llvm/IR/CFG.h>
#include <llvm/IR/Function.h> #include <llvm/IR/Function.h>
#include <llvm/IR/Instructions.h> #include <llvm/IR/Instructions.h>
#include <llvm/IR/IRBuilder.h> #include <llvm/IR/IRBuilder.h>
#include <llvm/Support/raw_os_ostream.h> #include <llvm/Support/raw_os_ostream.h>
#include "preprocessor/llvm_includes_end.h"
#include "Type.h" #include <iostream>
namespace dev namespace dev
{ {
@ -141,7 +141,7 @@ void BasicBlock::synchronizeLocalStack(Stack& _evmStack)
auto endIter = m_currentStack.end(); auto endIter = m_currentStack.end();
// Update (emit set()) changed values // Update (emit set()) changed values
for (int idx = m_currentStack.size() - 1 - m_tosOffset; for (int idx = (int)m_currentStack.size() - 1 - m_tosOffset;
currIter < endIter && idx >= 0; currIter < endIter && idx >= 0;
++currIter, --idx) ++currIter, --idx)
{ {
@ -308,7 +308,7 @@ void BasicBlock::linkLocalStacks(std::vector<BasicBlock*> basicBlocks, llvm::IRB
auto& initialStack = bblock.m_initialStack; auto& initialStack = bblock.m_initialStack;
initialStack.erase(initialStack.begin(), initialStack.begin() + info.inputItems); initialStack.erase(initialStack.begin(), initialStack.begin() + info.inputItems);
// Initial stack shrinks, so the size difference grows: // Initial stack shrinks, so the size difference grows:
bblock.m_tosOffset += info.inputItems; bblock.m_tosOffset += (int)info.inputItems;
} }
// We must account for the items that were pushed directly to successor // We must account for the items that were pushed directly to successor
@ -321,7 +321,7 @@ void BasicBlock::linkLocalStacks(std::vector<BasicBlock*> basicBlocks, llvm::IRB
auto& exitStack = bblock.m_currentStack; auto& exitStack = bblock.m_currentStack;
exitStack.erase(exitStack.end() - info.outputItems, exitStack.end()); exitStack.erase(exitStack.end() - info.outputItems, exitStack.end());
bblock.m_tosOffset -= info.outputItems; bblock.m_tosOffset -= (int)info.outputItems; // FIXME: Fix types
} }
} }

3
libevmjit/BasicBlock.h

@ -1,8 +1,7 @@
#pragma once #pragma once
#include <vector>
#include <llvm/IR/BasicBlock.h>
#include "Common.h" #include "Common.h"
#include "Stack.h" #include "Stack.h"
#include <vector>
namespace dev namespace dev
{ {

11
libevmjit/Cache.cpp

@ -1,14 +1,17 @@
#include "Cache.h" #include "Cache.h"
#include <unordered_map> #include "ExecutionEngine.h"
#include <cassert>
#include <iostream> #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Module.h> #include <llvm/IR/Module.h>
#include <llvm/IR/LLVMContext.h> #include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Instructions.h> #include <llvm/IR/Instructions.h>
#include <llvm/Support/Path.h> #include <llvm/Support/Path.h>
#include <llvm/Support/FileSystem.h> #include <llvm/Support/FileSystem.h>
#include <llvm/Support/raw_os_ostream.h> #include <llvm/Support/raw_os_ostream.h>
#include "ExecutionEngine.h" #include "preprocessor/llvm_includes_end.h"
#include <cassert>
#include <iostream>
namespace dev namespace dev
{ {

4
libevmjit/Cache.h

@ -1,8 +1,6 @@
#pragma once #pragma once
#include <memory>
#include <llvm/ExecutionEngine/ObjectCache.h> #include <llvm/ExecutionEngine/ObjectCache.h>
#include <memory>
namespace dev namespace dev
{ {

1
libevmjit/Common.h

@ -1,5 +1,4 @@
#pragma once #pragma once
#include <vector> #include <vector>
#include <tuple> #include <tuple>
#include <cstdint> #include <cstdint>

29
libevmjit/Compiler.cpp

@ -1,19 +1,4 @@
#include "Compiler.h" #include "Compiler.h"
#include <functional>
#include <fstream>
#include <chrono>
#include <sstream>
#include <llvm/ADT/PostOrderIterator.h>
#include <llvm/IR/CFG.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/IntrinsicInst.h>
#include <llvm/PassManager.h>
#include <llvm/Transforms/Scalar.h>
#include "Instruction.h" #include "Instruction.h"
#include "Type.h" #include "Type.h"
#include "Memory.h" #include "Memory.h"
@ -25,6 +10,20 @@
#include "Arith256.h" #include "Arith256.h"
#include "RuntimeManager.h" #include "RuntimeManager.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/ADT/PostOrderIterator.h>
#include <llvm/IR/CFG.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/IntrinsicInst.h>
#include <llvm/PassManager.h>
#include <llvm/Transforms/Scalar.h>
#include "preprocessor/llvm_includes_end.h"
#include <functional>
#include <fstream>
#include <chrono>
#include <sstream>
namespace dev namespace dev
{ {
namespace eth namespace eth

4
libevmjit/Compiler.h

@ -1,8 +1,4 @@
#pragma once #pragma once
#include <llvm/IR/IRBuilder.h>
#include "Common.h" #include "Common.h"
#include "BasicBlock.h" #include "BasicBlock.h"

6
libevmjit/CompilerHelper.cpp

@ -1,10 +1,6 @@
#include "CompilerHelper.h" #include "CompilerHelper.h"
#include <llvm/IR/Function.h>
#include <llvm/IR/Module.h>
#include "RuntimeManager.h" #include "RuntimeManager.h"
#include <llvm/IR/Module.h>
namespace dev namespace dev
{ {

5
libevmjit/CompilerHelper.h

@ -1,7 +1,8 @@
#pragma once #pragma once
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IRBuilder.h> #include <llvm/IR/IRBuilder.h>
#include "preprocessor/llvm_includes_end.h"
namespace dev namespace dev
@ -19,7 +20,7 @@ protected:
CompilerHelper(llvm::IRBuilder<>& _builder); CompilerHelper(llvm::IRBuilder<>& _builder);
CompilerHelper(const CompilerHelper&) = delete; CompilerHelper(const CompilerHelper&) = delete;
void operator=(CompilerHelper) = delete; CompilerHelper& operator=(CompilerHelper) = delete;
/// Reference to the IR module being compiled /// Reference to the IR module being compiled
llvm::Module* getModule(); llvm::Module* getModule();

6
libevmjit/Endianness.cpp

@ -1,9 +1,9 @@
#include "Endianness.h" #include "Endianness.h"
#include "Type.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h> #include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h"
#include "Type.h"
namespace dev namespace dev
{ {

3
libevmjit/Endianness.h

@ -1,7 +1,8 @@
#pragma once #pragma once
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IRBuilder.h> #include <llvm/IR/IRBuilder.h>
#include "preprocessor/llvm_includes_end.h"
namespace dev namespace dev
{ {

4
libevmjit/ExecStats.h

@ -1,8 +1,6 @@
#pragma once #pragma once
#include <string>
#include <chrono>
#include "ExecutionEngine.h" #include "ExecutionEngine.h"
#include <chrono>
namespace dev namespace dev
{ {

15
libevmjit/ExecutionEngine.cpp

@ -1,7 +1,10 @@
#include "ExecutionEngine.h" #include "ExecutionEngine.h"
#include "Runtime.h"
#include "Compiler.h"
#include "Cache.h"
#include "ExecStats.h"
#include "BuildInfo.gen.h"
#include <chrono>
#include <cstdlib> // env options
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Module.h> #include <llvm/IR/Module.h>
#include <llvm/ADT/Triple.h> #include <llvm/ADT/Triple.h>
@ -12,12 +15,8 @@
#include <llvm/Support/Host.h> #include <llvm/Support/Host.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include "Runtime.h" #include <array>
#include "Compiler.h" #include <cstdlib> // env options
#include "Cache.h"
#include "ExecStats.h"
#include "BuildInfo.gen.h"
#include <iostream> #include <iostream>
namespace dev namespace dev

3
libevmjit/ExecutionEngine.h

@ -1,7 +1,6 @@
#pragma once #pragma once
#include <memory>
#include "RuntimeData.h" #include "RuntimeData.h"
#include <memory>
namespace dev namespace dev
{ {

10
libevmjit/Ext.cpp

@ -1,15 +1,13 @@
#include "Ext.h" #include "Ext.h"
#include <llvm/IR/Function.h>
#include <llvm/IR/TypeBuilder.h>
#include <llvm/IR/IntrinsicInst.h>
#include "RuntimeManager.h" #include "RuntimeManager.h"
#include "Memory.h" #include "Memory.h"
#include "Type.h" #include "Type.h"
#include "Endianness.h" #include "Endianness.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

4
libevmjit/Ext.h

@ -1,8 +1,6 @@
#pragma once #pragma once
#include <array>
#include "CompilerHelper.h" #include "CompilerHelper.h"
#include <array>
namespace dev namespace dev
{ {

10
libevmjit/GasMeter.cpp

@ -1,13 +1,11 @@
#include "GasMeter.h" #include "GasMeter.h"
#include "Ext.h"
#include "RuntimeManager.h"
#include <llvm/IR/GlobalVariable.h> #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Function.h>
#include <llvm/IR/IntrinsicInst.h> #include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h"
#include "Type.h"
#include "Ext.h"
#include "RuntimeManager.h"
namespace dev namespace dev
{ {

2
libevmjit/GasMeter.h

@ -1,6 +1,4 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
#include "Instruction.h" #include "Instruction.h"

4
libevmjit/Instruction.cpp

@ -1,6 +1,8 @@
#include "Instruction.h" #include "Instruction.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/ADT/APInt.h> #include <llvm/ADT/APInt.h>
#include "preprocessor/llvm_includes_end.h"
namespace dev namespace dev
{ {

1
libevmjit/Instruction.h

@ -1,5 +1,4 @@
#pragma once #pragma once
#include "Common.h" #include "Common.h"
namespace llvm namespace llvm

15
libevmjit/Memory.cpp

@ -1,21 +1,14 @@
#include "Memory.h" #include "Memory.h"
#include <vector>
#include <iostream>
#include <iomanip>
#include <cstdint>
#include <cassert>
#include <llvm/IR/GlobalVariable.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/IntrinsicInst.h>
#include "Type.h" #include "Type.h"
#include "Runtime.h" #include "Runtime.h"
#include "GasMeter.h" #include "GasMeter.h"
#include "Endianness.h" #include "Endianness.h"
#include "RuntimeManager.h" #include "RuntimeManager.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

1
libevmjit/Memory.h

@ -1,5 +1,4 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
namespace dev namespace dev

6
libevmjit/Runtime.cpp

@ -1,9 +1,5 @@
#include "Runtime.h" #include "Runtime.h"
#include <cassert>
#include <llvm/IR/GlobalVariable.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/IntrinsicInst.h>
namespace dev namespace dev
{ {

4
libevmjit/Runtime.h

@ -1,8 +1,6 @@
#pragma once #pragma once
#include <csetjmp>
#include "RuntimeData.h" #include "RuntimeData.h"
#include <csetjmp>
namespace dev namespace dev
{ {

4
libevmjit/RuntimeData.h

@ -1,7 +1,5 @@
#pragma once #pragma once
#include "Common.h"
#include "Utils.h"
namespace dev namespace dev
{ {

8
libevmjit/RuntimeManager.cpp

@ -1,12 +1,8 @@
#include "RuntimeManager.h" #include "RuntimeManager.h"
#include <llvm/IR/GlobalVariable.h> #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Function.h>
#include <llvm/IR/IntrinsicInst.h> #include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h"
#include "RuntimeData.h"
#include "Instruction.h"
namespace dev namespace dev
{ {

1
libevmjit/RuntimeManager.h

@ -1,5 +1,4 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
#include "Type.h" #include "Type.h"
#include "RuntimeData.h" #include "RuntimeData.h"

2
libevmjit/Stack.cpp

@ -1,10 +1,8 @@
#include "Stack.h" #include "Stack.h"
#include "RuntimeManager.h" #include "RuntimeManager.h"
#include "Runtime.h" #include "Runtime.h"
#include "Type.h"
#include <llvm/IR/Function.h> #include <llvm/IR/Function.h>
#include <llvm/IR/TypeBuilder.h>
namespace dev namespace dev
{ {

3
libevmjit/Stack.h

@ -1,9 +1,6 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
#include <llvm/IR/Module.h>
namespace dev namespace dev
{ {
namespace eth namespace eth

4
libevmjit/Type.cpp

@ -1,8 +1,4 @@
#include "Type.h" #include "Type.h"
#include <llvm/IR/DerivedTypes.h>
#include "RuntimeManager.h" #include "RuntimeManager.h"
namespace dev namespace dev

5
libevmjit/Type.h

@ -1,9 +1,10 @@
#pragma once #pragma once
#include "Common.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Type.h> #include <llvm/IR/Type.h>
#include <llvm/IR/Constants.h> #include <llvm/IR/Constants.h>
#include "Common.h" #include "preprocessor/llvm_includes_end.h"
namespace dev namespace dev
{ {

1
libevmjit/Utils.cpp

@ -1,4 +1,3 @@
#include "Utils.h" #include "Utils.h"
namespace dev namespace dev

1
libevmjit/Utils.h

@ -1,5 +1,4 @@
#pragma once #pragma once
#include "Common.h" #include "Common.h"
namespace dev namespace dev

1
libevmjit/preprocessor/llvm_includes_start.h

@ -1,4 +1,5 @@
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 4267 4244 4800)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-parameter"

Loading…
Cancel
Save