首页 > 其他 > 详细

Capabilities and Limitations of Optimizing Compilers

时间:2016-12-08 20:48:34      阅读:152      评论:0      收藏:0      [点我收藏+]

 

Computer Systems A Programmer‘s Perspective Second Edition

 

 1 #include <stdio.h>
 2 
 3 main(){
 4     int wr;
 5     wr = func1();
 6 //    wr=func2();
 7     printf("%d",wr);
 8 }
 9 
10 int counter = 0;
11 int w(){
12     return counter++;
13 }
14 
15 int func1(){
16     return w()+w()+w()+w();
17 }
18 
19 int func2(){
20     return 4*w();
21 }
 
Modern compilers employ sophisticated algorithms to determine what values are
computed in a program and how they are used. 

 

Capabilities and Limitations of Optimizing Compilers

原文:http://www.cnblogs.com/yuanjiangw/p/6146260.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!