Giter Club home page Giter Club logo

Comments (11)

yuleisui avatar yuleisui commented on September 27, 2024

Any idea to fix this?

from svf.

LeoneChen avatar LeoneChen commented on September 27, 2024

I don't have a global view of svf project right now, if it's feasible to update the replacement value or other similar solutions while adding per element to LLVMConst2SVFConst?

from svf.

yuleisui avatar yuleisui commented on September 27, 2024

What is the replacement value? Shall we use this value for global or use the previous one. We will need to map multiple global values to the one actually used?

from svf.

LeoneChen avatar LeoneChen commented on September 27, 2024

Sorry I mean global replacement usually used in optimization for global value.
https://chatgpt.com/share/2d4cc8ce-9ce4-4b87-afd6-7fcffb4347ad

I'm not sure how to fix it

from svf.

LeoneChen avatar LeoneChen commented on September 27, 2024

Any idea about this statement const Value* llvmVal = LLVMUtil::getGlobalRep(val);

from svf.

yuleisui avatar yuleisui commented on September 27, 2024

This is used to get the representation global if we have multiple global symbols referring to the same global variable, so that we could use a unique global to represent all.

looks like we didn’t set the rep global first.

from svf.

LeoneChen avatar LeoneChen commented on September 27, 2024

Ok I got it, let me test if updating LLVMConst2SVFConst using the representation global works

from svf.

yuleisui avatar yuleisui commented on September 27, 2024

Thanks

from svf.

LeoneChen avatar LeoneChen commented on September 27, 2024

I've added a patch to fix the issue I was having, but I don't think this fix the root cause, i.e. it does not fully examine the use of global representation in the whole project.

The reason why I add V = LLVMUtil::getGlobalRep(V); is that val is converted to global representation in collectObj to perform insert on symInfo->objSymMap

void SymbolTableBuilder::collectObj(const Value* val)
{
val = LLVMUtil::getGlobalRep(val);
SymbolTableInfo::ValueToIDMapTy::iterator iter = symInfo->objSymMap.find(
LLVMModuleSet::getLLVMModuleSet()->getSVFValue(val));
if (iter == symInfo->objSymMap.end())
{
SVFValue* svfVal = LLVMModuleSet::getLLVMModuleSet()->getSVFValue(val);
// if the object pointed by the pointer is a constant data (e.g., i32 0) or a global constant object (e.g. string)
// then we treat them as one ConstantObj
if (isConstantObjSym(val) && !symInfo->getModelConstants())
{
symInfo->objSymMap.insert(std::make_pair(svfVal, symInfo->constantSymID()));

from svf.

yuleisui avatar yuleisui commented on September 27, 2024

Could you make a pull request?

from svf.

LeoneChen avatar LeoneChen commented on September 27, 2024

PR #1484
Ok, but I'm not sure that it fixes all of these problems

from svf.

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.