Skip to content

SageInterface::constantFolding

Constant folding an AST subtree rooted at 'r' (replacing its children with their constant values, if applicable). Please be advised that constant folding on floating point computation may decrease the accuracy of floating point computations! It is a wrapper function for ConstantFolding::constantFoldingOptimization(). Note that only r's children are replaced with their corresponding constant values, not the input SgNode r itself. You have to call this upon an expression's parent node if you want to fold the expression.

Synopsis

Declared in <SageIII/sageInterface/sageInterface.h>

[[visibility]]
void
constantFolding(SgNode* r);

Parameters

Name

Description

r

This class represents the base class for all IR nodes within Sage III.

Created with MrDocs