[llvm-dev] Cloning MachineFunctions

Lorenzo Casalino via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 6 07:27:48 PDT 2019


Hi Owen,

Looking to the API, I think MachineFunction cloning is something not
taken into consideration (e.g.,
copy-construction is forbidden).

Maybe, you could achieve your goal by building a new MachineFunction
with the provided constructor,
extracting the parameters from the copied MachineFunction, and using the
MachineFunction::getProperties
and MachineFunctionProperties::set() to copy the properties.

Does it work for you? Or did I miss some particular?

Concerning the utility of the cloning function, I do not see it, except
for specific applications. But this
is my personal opinion; someone else with more experience may properly
address your question.


-- Lorenzo




More information about the llvm-dev mailing list