[LLVMdev] Void vs int

Eli Friedman eli.friedman at gmail.com
Wed Dec 30 23:23:40 PST 2009


On Wed, Dec 30, 2009 at 11:37 PM, Jon Harrop <jon at ffconsultancy.com> wrote:
>
> Is it more efficient to return void rather than the int 0, e.g. does it reduce
> register pressure?

"ret void" and "ret i32 undef" should lead to exactly the same code on
any architecture; returning zero is slightly more expensive, but
shouldn't affect register pressure.

-Eli



More information about the llvm-dev mailing list