查看gcc如何按计划(时间表)指示按滴答滴答的水平 [英] View, how gcc plan (schedule) instructions on tick-by-tick level
问题描述
你能说,哪个版本的gcc可以显示这样的转储,以及打开这个转储的选项是什么?
例如,对于Core2,有一个定义了解码器和执行端口的 core2.md
,每条指令的延迟。我希望看到,gcc如何使用它以及在指令调度中做了什么决定。换句话说:例如程序:
int main(){
int i; int j = 0; (i = 0; i <1000000; i ++)
j + = i ^((i + 5)&(i> 2)&(i> 5)+ I>&→2)及(I>→5)) - (I + 5);
返回j%250;
}
我怎样才能得到每次迭代时gcc如何计划滴答? / p>
我不确定你的意思,但 -fsched-verbose = n
(尝试n = 6)转储一些调度信息,看起来就像你在做什么。
As I remember, with gcc for Pentium it was possible to view advanced dump of compilation process, where gcc shows, how it plans (schedules) assembler instructions for U and V pipelines and also shows how many ticks (CPU clocks) will take each instruction.
Can you say, which versions of gcc can show such dumps and what option is to turn this on?
E.g. for Core2 there is a core2.md
with decoders and execution ports defined, latencies for every instruction. I want to see, how gcc uses this and what decisions are done in instruction scheduling.
In other words: for example program:
int main() {
int i; int j=0;
for(i=0;i<1000000;i++)
j+=i^((i+5)&(i>>2)&(i>>5) + (i>>2)&(i>>5))-(i+5);
return j%250;
}
how can I get, how ticks are planned by gcc for each iteration?
I'm not sure exactly what you mean, but the -fsched-verbose=n
(try with n=6) dumps some scheduling information which looks like what you're after.
这篇关于查看gcc如何按计划(时间表)指示按滴答滴答的水平的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!