MCPcopy Create free account
hub / github.com/bytedance/bolt / isConstant

Method isConstant

bolt/expression/Expr.cpp:1741–1751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1739}
1740
1741bool Expr::isConstant() const {
1742 if (!isDeterministic()) {
1743 return false;
1744 }
1745 for (auto& input : inputs_) {
1746 if (!input->is<ConstantExpr>()) {
1747 return false;
1748 }
1749 }
1750 return true;
1751}
1752
1753namespace {
1754

Callers 3

tryFoldIfConstantFunction · 0.45
toConstantFunction · 0.45
constructSpecialFormMethod · 0.45

Calls 1

isDeterministicFunction · 0.85

Tested by

no test coverage detected