2001-06-06 22:29:01 +02:00
|
|
|
implementation
|
|
|
|
|
|
|
|
int "FuncToInline"()
|
|
|
|
begin
|
|
|
|
%x = add int 1, 1 ; Instrs can be const prop'd away
|
|
|
|
%y = sub int -1, 1
|
|
|
|
%z = add int %x, %y
|
|
|
|
ret int %z ; Should equal %0
|
|
|
|
end
|
|
|
|
|
|
|
|
int "FuncToInlineInto"(int %arg) ; Instrs can be const prop'd away
|
|
|
|
begin
|
|
|
|
%x = add int %arg, 1
|
|
|
|
%y = sub int 1, -1
|
2001-10-03 16:50:12 +02:00
|
|
|
%p = call int %FuncToInline()
|
2001-06-06 22:29:01 +02:00
|
|
|
%z = add int %x, %y
|
|
|
|
%q = add int %p, %z
|
|
|
|
|
|
|
|
ret int %q
|
|
|
|
end
|
|
|
|
|
2001-08-23 19:08:51 +02:00
|
|
|
int "main"()
|
2001-06-06 22:29:01 +02:00
|
|
|
begin
|
2001-10-03 16:50:12 +02:00
|
|
|
%z = call int %FuncToInlineInto(int 1)
|
2001-06-06 22:29:01 +02:00
|
|
|
ret int %z
|
|
|
|
end
|
|
|
|
|