[llvm-dev] [JIT] Cross references

via llvm-dev llvm-dev at lists.llvm.org
Fri May 25 00:27:31 PDT 2018


Hello LLVM-people,

I have a question!
Lets take I have two bc-files: "Plansch.bc" and "Becken.bc"

"Plansch.bc" has an external variable which will be found in "Becken.bc"
"Becken.bc" has also an external variable which will be found in "
Plansch.bc"
They cross reference each other.

As I understand - the ExecutionEngine will easily merge those files and 
resolve them as one big file.
So "Plansch.bc" and "Becken.bc" will be "Planschbecken.bc"

That's cool! But what if I don't want that to happen? I want to load "
Plansch.bc" and "Becken.bc" to their own memory addresses but also want to 
cross-reference them.

I thought:
First I load "Plansch.bc". Then the ExecutionEngine will get an undefined 
reference to the extern variable coming from "Becken.bc". What now?

1.) Can I tell the ExecutionEngine something like "Please wait for the 
address and skip it for now"?
2.) Can I trigger in that moment another ExecutionEngine loading "
Becken.bc" to resolve at least that address?
-> But then "Becken.bc" would run into its own undefined reference to "
Plansch.bc" and I don't think I would get the value at that point.

Any ideas, solutions or opinions on that?

Kind regards
Björn

Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, 
USt.ID-Nr. DE 114 165 789
Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, 
Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180525/1669f685/attachment-0001.html>


More information about the llvm-dev mailing list