当前位置: 首页>>代码示例>>C++>>正文


C++ SgProject::get_suppressConstantFoldingPostProcessing方法代码示例

本文整理汇总了C++中SgProject::get_suppressConstantFoldingPostProcessing方法的典型用法代码示例。如果您正苦于以下问题:C++ SgProject::get_suppressConstantFoldingPostProcessing方法的具体用法?C++ SgProject::get_suppressConstantFoldingPostProcessing怎么用?C++ SgProject::get_suppressConstantFoldingPostProcessing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SgProject的用法示例。


在下文中一共展示了SgProject::get_suppressConstantFoldingPostProcessing方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: postProcessingSupport


//.........这里部分代码省略.........
               printf ("Calling resetConstantFoldedValues() \n");
             }

       // DQ (10/4/2012): Added this pass to support command line option to control use of constant folding 
       // (fixes bug pointed out by Liao).
       // DQ (9/14/2011): Process the AST to remove constant folded values held in the expression trees.
       // This step defines a consistent AST more suitable for analysis since only the constant folded
       // values will be visited.  However, the default should be to save the original expression trees
       // and remove the constant folded values since this represents the original code.
#if 1
       // DQ (1/28/2014): This is mostly needed for C++, so that name qualification will be handled on 
       // the original expression trees.  This function replaces the constant folded values with the
       // original expression trees so that the support for them is seamless.
       // resetConstantFoldedValues(node);  Avoiding this function for C dramatically improves the 
       // performance on the C application "wireshark" but does not make much difference elsewhere.
       // Since it is not required for C we can just skip it.
#if 0
          if (SageInterface::is_Cxx_language() == true)
             {
               resetConstantFoldedValues(node);
             }
#else
          SgProject* project = isSgProject(node);
#if 0
          printf ("In postProcessingSupport: project = %p \n",project);
#endif
          if (project != NULL)
             {
            // DQ (1/31/2014):  This is a performance optimization: for wireshark: 
            // packet-gmr1_rr.c, packet-gmr1_common.c, packet-gopher.c, packet-gsm_a_rp.c,
            // packet-gsm_a_dtap.c, packet-gpef.c, packet-gsm_a_bssmap.c, packet-gsm_a_gm.c,
            // packet-gprs-llc.c, packet-gnutella.c, packet-gre.c.
#if 0
               printf ("In postProcessingSupport: project->get_suppressConstantFoldingPostProcessing() = %s \n",project->get_suppressConstantFoldingPostProcessing() ? "true" : "false");
#endif
               if (project->get_suppressConstantFoldingPostProcessing() == false)
                  {
                 // DQ (1/28/2014): I think we might require this for the OMP support to work (testing).
                    resetConstantFoldedValues(node);
                  }
                 else
                  {
                    printf ("In postProcessingSupport: skipping call to resetConstantFoldedValues(): project->get_suppressConstantFoldingPostProcessing() = %s \n",project->get_suppressConstantFoldingPostProcessing() ? "true" : "false");
                  }
             }
            else
             {
            // DQ (1/31/2014): I don't think we can make this an error: called by some tests in: 
            //      tests/roseTests/astRewriteTests/.libs/testIncludeDirectiveInsertion
               printf ("Error: postProcessingSupport should not be called for non SgProject IR nodes \n");
            // ROSE_ASSERT(false);
             }
#endif
#else
       // DQ (10/11/2012): This is helpful to allow us to see both expression trees in the AST for debugging.
          printf ("Skipping AST Postprocessing resetConstantFoldedValues() \n");
#endif

#if 0
       // DQ (4/26/2013): Debugging code.
          printf ("In postProcessingSupport: Test 4: Calling postProcessingTestFunctionCallArguments() \n");
          postProcessingTestFunctionCallArguments(node);
#endif

          if (SgProject::get_verbose() > 1)
             {
开发者ID:brushington,项目名称:rose-develop,代码行数:67,代码来源:astPostProcessing.C


注:本文中的SgProject::get_suppressConstantFoldingPostProcessing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。