Git Product home page Git Product logo

Comments (10)

michaelbrownuc avatar michaelbrownuc commented on May 10, 2024

You can patch the source by replacing createConstantPropagationPass with createInstSimplifyPass

This is an LLVM API change, I thought it was in 13, not 12 though.

from mcsema.

vladimirtelepov avatar vladimirtelepov commented on May 10, 2024

You can patch the source by replacing createConstantPropagationPass with createInstSimplifyPass

This is an LLVM API change, I thought it was in 13, not 12 though.

got this error

Optimize.cpp:913:17: error: no member named 'createInstSimplifyPass' in namespace 'llvm'
  fpm.add(llvm::createInstSimplifyPass());
          ~~~~~~^
1 error generated.
make[2]: *** [anvill/CMakeFiles/anvill.dir/build.make:314: anvill/CMakeFiles/anvill.dir/src/Optimize.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:405: anvill/CMakeFiles/anvill.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

from mcsema.

invlpg avatar invlpg commented on May 10, 2024

simply removed that optimization and it compiles.

// fpm.add(llvm::createInstSimplifyPass());

Also "getTypeByName" is not in "llvm::Module" it seems? https://reviews.llvm.org/D78793

had to remove this code to get it compiling on llvm 12.

auto seg_type = gModule->getTypeByName(type_name);

  auto seg_type = gModule->getTypeByName(type_name);
  if (seg_type) {
    return seg_type;
  }

from mcsema.

vladimirtelepov avatar vladimirtelepov commented on May 10, 2024

@michaelbrownuc
any updates on issue?
I tried build latest version(82c3106) but error still occur. File compiles after removing optimization. But other error occurs.
image
After removing quotes and next try other error occur.
image
image

from mcsema.

michaelbrownuc avatar michaelbrownuc commented on May 10, 2024

IIRC there are a few API changes to make, including the one in the second screenshot. In that case removing the -1 parameter should solve that compiler error.

from mcsema.

vladimirtelepov avatar vladimirtelepov commented on May 10, 2024

@michaelbrownuc
now have this error
image

from mcsema.

invlpg avatar invlpg commented on May 10, 2024

@michaelbrownuc now have this error image

#768 (comment)

from mcsema.

vladimirtelepov avatar vladimirtelepov commented on May 10, 2024

@invlpg seg_type is used and returned later in function GetSegmentType so just removing code doesnt work.

from mcsema.

xathrya avatar xathrya commented on May 10, 2024

simply removed that optimization and it compiles.

// fpm.add(llvm::createInstSimplifyPass());

Also "getTypeByName" is not in "llvm::Module" it seems? https://reviews.llvm.org/D78793

had to remove this code to get it compiling on llvm 12.

auto seg_type = gModule->getTypeByName(type_name);

  auto seg_type = gModule->getTypeByName(type_name);
  if (seg_type) {
    return seg_type;
  }

getTypeByName is moved to other place. Try this, it work for me

auto seg_type = llvm::StructType::getTypeByName(gModule->getContext(), type_name);

from mcsema.

vladimirtelepov avatar vladimirtelepov commented on May 10, 2024

Thanks, it works.

from mcsema.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.