MCPcopy Create free account
hub / github.com/argotorg/solidity / differenceIfKnownConstant

Method differenceIfKnownConstant

libyul/optimiser/KnowledgeBase.cpp:49–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49std::optional<u256> KnowledgeBase::differenceIfKnownConstant(YulName _a, YulName _b)
50{
51 VariableOffset offA = explore(_a);
52 VariableOffset offB = explore(_b);
53 if (offA.reference == offB.reference)
54 return offA.offset - offB.offset;
55 else
56 return std::nullopt;
57}
58
59
60bool KnowledgeBase::knownToBeDifferentByAtLeast32(YulName _a, YulName _b)

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64