Skip to content

ConstantFolding

Functions

Name

Description

buildResultValueExp_float_t
template< typename T1, typename T2> static SgValueExp* buildResultValueExp_float_t(SgBinaryOp* binaryOperator, SgValueExp* lhsValue, SgValueExp* rhsValue);

buildResultValueExp_t
template< typename T1, typename T2> static SgValueExp* buildResultValueExp_t(SgBinaryOp* binaryOperator, SgValueExp* lhsValue, SgValueExp* rhsValue);

buildResultValueExp_u_t
template< typename T1, typename T2> static SgValueExp* buildResultValueExp_u_t(SgUnaryOp* unaryOperator, SgValueExp* theValue);

calculate_float_t
template<typename T> T calculate_float_t(SgBinaryOp* binaryOperator, T lhsValue, T rhsValue);

Calculate the result of a binary operation on two constant float‐kind values,

calculate_string_t
template<typename T> T calculate_string_t(SgBinaryOp* binaryOperator, T lhsValue, T rhsValue);

string type and binary operator: the allowed operations on string values

calculate_t
template<typename T> T calculate_t(SgBinaryOp* binaryOperator, T lhsValue, T rhsValue);

calculate_u_t
template<typename T> T calculate_u_t(SgUnaryOp* unaryOperator, T theValue);

cf_get_value_t
template< typename T1, typename T2> T1 cf_get_value_t(T2* sg_value_exp);

constantFoldingOptimization
void constantFoldingOptimization(SgNode* n, bool internalTestingAgainstFrontend = false);

This is the external interface of constant folding:

constantUnFoldingTest
void constantUnFoldingTest(SgNode* n);

returnConstantFoldedValueExpression
SgValueExp* returnConstantFoldedValueExpression(SgNode* n, bool internalTestingAgainstFrontend = false);

Created with MrDocs