what does machine value type “other” mean in llvm SDnodes

喜夏-厌秋 提交于 2019-12-02 00:26:20

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.

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];
}

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!