[LLVMdev] Question about 'side-effect' and 'chain'

Heyu Zhu zhu.heyu at gmail.com
Sun Dec 6 03:58:15 PST 2009


Hi everyone,

It says in document  'The LLVM Target-Independent Code Generator ':

"SelectionDAGs contain two different kinds of values: those that represent
data flow and those that represent control flow dependencies. Data values
are simple edges with an integer or floating point value type. Control edges
are represented as "chain" edges which are of type MVT::Other. These edges
provide an ordering between nodes that have side effects (such as loads,
stores, calls, returns, etc). All nodes that have side effects should take a
token chain as input and produce a new one as output. "

Due to my poor knowledge of compiler i have several questions.

1 What side effects do operatios of  loads/stores/calls/returns have? (maybe
i don't understand concept of side effect )
2 What's "control edge"/"chain"?
3 Why do loads/stores have control edges?(maybe i could get the answer by
myself if i understand  control edge/chain)

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091206/c66ec2f0/attachment.html>


More information about the llvm-dev mailing list