机器值类型是什么“其他"? llvm SDnodes中的均值 [英] what does machine value type "other" mean in llvm SDnodes

查看:104
本文介绍了机器值类型是什么“其他"? llvm SDnodes中的均值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图更深入地了解llvm中的指令选择过程,为此,我正在逐步调试CodeGenAndEmitDAG函数.在合并步骤之前,我已经打印了一个小功能(见下文),即上述功能的第一步.在图中,我看到了蓝线,并且它们似乎总是指向"ch",我认为这意味着其他"机器值类型.我不明白蓝线的含义...这种依赖性是什么?而且,我对"ch"的含义是否正确?是其他"吗?

I am trying to understand more deeply the instruction selection process in llvm and for that I am debuging step-by-step the CodeGenAndEmitDAG function. I have printed a small function (see below) just before the combine step - the first step in the above function. In the graph I see blue lines and it seems that they are always pointing at "ch" , which I think means "other" machine value type. What I don't understand is the meaning of the blue lines... what is this dependency ? And, am I right about the meaning of "ch" ? is it "other" ?

推荐答案

虚线蓝色箭头表示之间的非数据流依赖性 说明并强制执行它们之间的特定顺序.例如, 可能会重新访问可能访问同一内存的存储和装载, 尽管它们之间没有数据依赖性.在这种情况下,蓝色 箭头用于表示这种隐藏的依赖性.这些蓝色箭头 消费Other类型的链值(ch).

Dashed blue arrows represent non-dataflow dependencies between instructions and enforce specific order between them. For example, stores and loads which may access the same memory shouldn't be reordered, though there's no data dependency between them. In such cases blue arrows are used to represent such hidden dependency. These blue arrows consume chain values (ch) of type Other.

每个DAG都有一个特殊类型OtherEntryToken,它可以提供 基本块的初始链值.

Every DAG has a special EntryToken of type Other which supplies the initial chain value for the basic block.

请考虑以下示例.注意加载和存储之间的控件依赖关系(蓝色箭头),因为允许它们指向相同的内存.还要注意将两个指令粘合在一起的红色箭头(胶水).

Consider the following example. Notice the control dependency (blue arrow) between load and store because they're allowed to point to the same memory. Also notice the red arrow (Glue) which glues two instructions together.

int foo(int *a, int *b) {
  a[0] = 42;
  return b[0];
}

这篇关于机器值类型是什么“其他"? llvm SDnodes中的均值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆