[LLVMdev] A couple questions

Brian Fahs bfahs at uiuc.edu
Thu Dec 4 16:21:02 PST 2003

Question 1:

I am trying to get a function not to be inlined.  What are llvm's rules 
pertaining to inlining?  I have tried all of the standard gcc options 
for turning off inlining and they do not seem to work.  Here is the 
sample code that I am working with:

#include <stdio.h>

  void print_string(char* strval);

int main()
	char* strval = "Hello world\n";

	return 0;

print_string(char* strval)
	int i;
		putc(strval[i], stdout);

gcc 3.2.2 does not inline this by default.  Also, on 
llvm.cs.uiuc.edu/demo, the compiler does not inline the function.  
However, on my version of the compiler, the function print_string is 
inlined by default.

Question 2:

What is the behavior of the function "recompileAndRelinkFunction" (in 
VM.{h,cpp}) if a program running in lli is currently executing within 
the function that is being recompiled?

Thanks in advance,

Brian M. Fahs
Graduate Student
University of Illinois

More information about the llvm-dev mailing list