[llvm-dev] IR question re: constants

via llvm-dev
2015-09-02T18:16:58Z

I'm curious.  Is there a specific technical reason that the high-level
IR doesn't have an instruction to simply set a register to a constant?
This limitation means we cannot hoist an "expensive" constant out of a
loop until we lower the IR to MachineInstrs.  Or more to the point, it
forces backends to undo any such hoisting done by frontends.

Or am I not understanding something?

                           -David