1. 17 Jul, 2018 2 commits
  2. 15 Apr, 2013 2 commits
  3. 12 Apr, 2013 3 commits
    • Chia-Wei Chang's avatar
      Rewrite documents · 2ae4e433
      Chia-Wei Chang authored
      Original documents are out-of-date, modify documents to give users a brief
      concept about how to use PinaVM.
      2ae4e433
    • Chia-Wei Chang's avatar
      Remove Targetinfo/ in Simple Backend · 4b8c8e4a
      Chia-Wei Chang authored
      Only configure file and svn files here. They are dead code,
      so remove it.
      4b8c8e4a
    • Chia-Wei Chang's avatar
      Remove out-of-date installation shell script · 3628bfd2
      Chia-Wei Chang authored
      Since most of installation scripts are out-of-date and have substitute
      in cmake, those code or scripts have little chance to be used again.
      
      Keep config.mk.in because systemc-examples/* are still relying
      MakeFile to launch testcases. Modify config.sh.in to export
      LLVM_COMPILER and LLVMC_FLAGS. Users can simply "source config.sh"
      to get handy environment variables.
      3628bfd2
  4. 08 Apr, 2013 3 commits
    • Chia-Wei Chang's avatar
      clone a frontend/config.h for basic.h · 925a1c58
      Chia-Wei Chang authored
      According to LLVM Coding Standards, iostream is deprecated.
      http://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden
      
      Some implementation of llvm use raw_ostream as default output,
      For example, llvm::Type only prints it's type name like i8, i32* to
      raw_ostream. and it is inconvenient to print llvm::Type to std::string.
      
      Due to previous reason, raw_ostream is the default ostream in
      frontend/config.h. Basic.h may be include by systemc-examples/*.
      In order not to mix systemc code with llvm headers, I think that basic
      should keep a basic_config.h of it's own. Also, if one day there is
      a user code which brings with it's own config.h, then it may include
      pianvm/frontend/config.h rather than it's own config.h
       (ifndef CONFIG_H...)
      925a1c58
    • Chia-Wei Chang's avatar
      Add Support to configure without llvm cmake module · 7bfc9a68
      Chia-Wei Chang authored
      The llvm installed from package manager usually contains
      no CMake module in their package. Find_package(llvm) may
      fail in some case. If find_package fails, cmake script will
      use llvm-config to generate necessary flags for pinavm.
      
      the reason I keep find_package() part is that it gives me
      a chance to compare results from llvm-config executable and
      LLVMCONFIG.cmake. It may be helpful if somebody wants porting
      pinavm to newer llvm.
      
      Just keep them modular, I seperate the finding CMake module
      part from findLLVM.cmake into loadLLVMModule.cmake.
      7bfc9a68
    • Chia-Wei Chang's avatar
      Add auto install LLVM feature in CMake · 0e7ea387
      Chia-Wei Chang authored
      API of LLVM changes frequently, so pianvm usually depends
      to certain version of llvm. some linux distribution may not
      provide llvm-3.2 package.
      
      In case of that users want to build llvm from the source code,
      pianvm provide a autoinstall script which can automatically
      download, extract, configure, build and install LLVM
      tools(with Clang and compiler-rt).
      
      Actually my patch does the same thing as scripts/install-lib.sh,
      but which is written in cmake and doing more checking. It checks
      whether where is a source code downloaded from offical site, and
      checks md5sum too. the cmake autoinstall script also downloads llvm
      version according to pre-set version number in scripts/findLLVM.cmake.
      It may be convenient if somebody wants to port pinavm to newer llvm.
      (if naming schemes of llvm.org is not changed...)
      
      To enable it, "cmake /where/pinavm -DAUTOINSTALL=TRUE"
      NOTE that the command still configures pinavm after installing llvm.
      
      Optional, you can also specify llvm prefix you want to install.
      cmake /where/pinavm -DAUTOINSTALL=TRUE -DLLVM_ROOT=/install/llvm/prefix
      0e7ea387
  5. 03 Apr, 2013 6 commits
  6. 01 Apr, 2013 3 commits
  7. 31 Mar, 2013 2 commits
    • Chia-Wei Chang's avatar
      Implement ClockChannel · 2257e141
      Chia-Wei Chang authored
      Get four properties of sc_clock :
       - Period
       - StartTime
       - DutyCycle
       - PosedgeFirst
      2257e141
    • Chia-Wei Chang's avatar
      Use External bitcode in Tweto Backend · ec1d3fbe
      Chia-Wei Chang authored
       - Originally, Tweto needs to include some call method in source code
         to analysis something. I use llvm::Linker to link target module
         with external bitcode instead of including it in SystemC source
         manually.
      
       - This feature may be used by other backends in future, so add it in util/
      ec1d3fbe
  8. 29 Mar, 2013 1 commit
    • Chia-Wei Chang's avatar
      accepts Multiple arguments of user's SystemC bitcode · 620ea13b
      Chia-Wei Chang authored
       - Originally, PinaVM use -arg xxx to specify arguments for user's bitcode.
         Using cl::ConsumeAfter to collect arguments after input bitcode, which
         will not be interpreted by llvm::ParseCommandLine().
      
       - User should use pinavm in such styles as "/bin/sh -args foo.sh bar"
         For example : "pinavm -b promela -inline main.bc -foo -bar"
         The executed bitcode thinks that it is running with arguments
         "main.exe -foo -bar"
      
       - Makefile of systemc-examples is changed to meet the command format.
      620ea13b
  9. 28 Mar, 2013 4 commits
  10. 27 Mar, 2013 14 commits
    • Chia-Wei Chang's avatar
      Change Timeout of compiler in testcase makefile · 646111d6
      Chia-Wei Chang authored
      clang runs slower than gcc, so change timeout from 3 to 30.
      646111d6
    • Chia-Wei Chang's avatar
      modify CMakeList to use cmake module of LLVM · 3a70590d
      Chia-Wei Chang authored
      find_package(LLVM) seems to be more mature in LLVM 3.2, so apply it.
      http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project
      3a70590d
    • Chia-Wei Chang's avatar
      Fix some problem in Simple Backend while porting · e6fbc21a
      Chia-Wei Chang authored
      In previous commits while porting, I comment out OpaqueType
      because OpaqueType is removed in LLVM 3.2. Now, I use
      StructType::isOpaque() instead.
      
      Also, use visitFenceInst() to replace llvm.mem_barrier
      intrinsic in printing.
      
      delete mcRegisterInfo & mcObjectFileInfo to free memory.
      e6fbc21a
    • Chia-Wei Chang's avatar
      Fix some problem in 42 Backend while porting · cc0f32a6
      Chia-Wei Chang authored
      In previous commits while porting, I comment out OpaqueType
      because OpaqueType is removed in LLVM 3.2. Now, I use
      StructType::isOpaque() instead.
      
      Also, use visitFenceInst() to replace llvm.mem_barrier
      intrinsic in printing.
      
      delete mcRegisterInfo & mcObjectFileInfo to free memory.
      cc0f32a6
    • Chia-Wei Chang's avatar
      Fix some problem in Promela Backend while porting · decd63cc
      Chia-Wei Chang authored
      In previous commits while porting, I comment out OpaqueType
      because OpaqueType is removed in LLVM 3.2. Now, I use
      StructType::isOpaque() instead.
      
      Also, use visitFenceInst() to replace llvm.mem_barrier
      intrinsic in printing.
      
      delete mcRegisterInfo & mcObjectFileInfo to free memory.
      decd63cc
    • Chia-Wei Chang's avatar
      Fix fail to return issue · 790c01c8
      Chia-Wei Chang authored
      Adds "return 0;" in sc_main() for some systemc-examples.
      Otherwise, ExecutionEngine will crash due to finding no returns.
      790c01c8
    • Chia-Wei Chang's avatar
      Port Simple Backend to LLVM 3.2 · dc805bb3
      Chia-Wei Chang authored
      Change log :
       - const Tpye -> Type
       - Attribute -> Attributes
       - Change TargetMachine's argument list to match LLVM 3.2
       - Create some MC objects to meet MCContext constructor
       - give ArrayRef instead of pointer & size to ExtractValueInst(...)
      
      There are a known bug that in SimpleWriter:2961
      syntax wc->getMissingValue () may returns a nullptr if JIT can resolve the
      writing value.
      dc805bb3
    • Chia-Wei Chang's avatar
      Port 42 Backend to LLVM 3.2 · bd4b2a1a
      Chia-Wei Chang authored
      Change log :
       - const Tpye -> Type
       - Attribute -> Attributes
       - Change TargetMachine's argument list to match LLVM 3.2
       - Create some MC objects to meet MCContext constructor
       - give ArrayRef instead of pointer & size to ExtractValueInst(...)
      bd4b2a1a
    • Chia-Wei Chang's avatar
      Fix Tweto backend bug while Porting LLVM 3.2 · aae8b669
      Chia-Wei Chang authored
        - move tweto_*_method in systemc-examples/basic*
          to tweto_call_method.h
        - make tweto_write(read)_method returns with right type.
        - remove some code to make assert(nai==newProc->arg_end()) pass.
      
        - Note that tweto backend fails simulation for testcases which
          contains 2 or more initiators, even they do not attach to
          the same router. This is a bug from tweto backend itself, I
          can reproduce this error in LLVM-2.8
      aae8b669
    • Chia-Wei Chang's avatar
      modified systemc-examples to use clang with llvm3.2 · ff78c317
      Chia-Wei Chang authored
      use clang to replace llvm-gcc.
      add flag -fno-use-cxa-atexit to make execution engine able to resolve.
      add -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS if using Support/DataType.h
      
      Currently you should cd to each test directory and make.
      Make all at systemc-example/ will results error for unknown reason.
      ff78c317
    • Chia-Wei Chang's avatar
      Fix PromelaWritter::isSystemCType() because of Clang · 40be9971
      Chia-Wei Chang authored
      While using Clang-3.2 to compile SystemC, SystemC namespace is
      treated as class_sc_core, not struct_sc_core.
      40be9971
    • Chia-Wei Chang's avatar
      Fix print error · eb637334
      Chia-Wei Chang authored
      Type->Name() is removed from LLVM API.
      
      To print ordinary Type name, the easiest way is type->dump() or
      raw_ostream << type (raw_string_ostream is also a solution)
      
      frontend/config.h is changed to use raw_ostream instead of cout
      eb637334
    • Chia-Wei Chang's avatar
      Solve PinaVM linking problem · 1c144461
      Chia-Wei Chang authored
      Move exception handle from toplevel.cpp to pinavm.cpp
      add needs_no_riit() to several CMakeLists.txt
      1c144461
    • Chia-Wei Chang's avatar
      Devide TLMBasicPass into two parts for rtti issue. · 9565d101
      Chia-Wei Chang authored
      LLVM not allow ModulePass with rtti by default.
      seperate into rtti and no-rtti parts.
      9565d101