码迷,mamicode.com
首页 > 其他好文 > 详细

Capabilities and Limitations of Optimizing Compilers

时间:2016-12-08 20:50:29      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:div   abi   computer   int   cond   min   rspec   stdio.h   and   

 

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

标签:div   abi   computer   int   cond   min   rspec   stdio.h   and   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!