Stream: cranelift

Topic: Where is the actual enum for values defined?


view this post on Zulip osa1 (May 22 2020 at 21:02):

The Value type is just an index into something, but I'm not sure why. Can anyone point me to the Vec that holds the actual values? Thanks!

view this post on Zulip fitzgen (he/him) (May 22 2020 at 21:08):

see various methods of DataFlowGraph eg value_def: https://docs.rs/cranelift-codegen/0.63.0/cranelift_codegen/ir/dfg/struct.DataFlowGraph.html

internally Value is a key for a PrimaryMap<Value, ValueData> where ValueData is roughly equivalent to ValueDef but with under-the-covers support for aliasing values to one another

view this post on Zulip osa1 (May 22 2020 at 21:11):

Thanks!


Last updated: Nov 22 2024 at 17:03 UTC