bjorn3 commented on issue #4659:
This is a nonsensical constraint: the entry block must come first in the
compiled code's layout, so it cannot also be sunk to the end of the
function.If you want to mark all blocks calling a cold function as cold, you did have to special case the entry block if the entry block isn't allowed to be cold. cg_clif just barely avoids this issue as the first codegened MIR basic block corresponds to the second Cranelift basic block as the entry block only handles storing arguments in the right location.
cfallin commented on issue #4659:
That's a fair point, but it still seems like a reasonable thing for a producer to have to ensure, IMHO; the only way it could be valid would be if the entire function body is marked cold, and that doesn't make sense (cold compared to what?).
Last updated: Dec 23 2024 at 12:05 UTC