[LLVMdev] Void values
Chris Lattner
clattner at apple.com
Sat Jun 12 08:45:00 PDT 2010
On Jun 12, 2010, at 5:37 AM, Kenneth Uildriks wrote:
> Are there any platforms where it wouldn't Just Work if the code
> generator generated a {} return everywhere it presently generates a
> void return? I'm not saying make those changes to the code generator,
> I'm just asking if VMCore replaced void with {} would any code
> generators need changing? I don't think X86 would be affected - EAX
> is not preserved even if the function returns void.
I don't think so, but noone has done the experiment to see the fallout. The biggest issue is that in code like this:
%1 = add i32 ...
store ...
%2 = mul i32 %1, ...
That the numbering gets broken because store now produces a (unit) value. For this issue alone, it may be an "llvm 3.0" sort of change.
-Chris
More information about the llvm-dev
mailing list