[LLVMdev] force inlineing a function using opt

Hari Pyla harip at vt.edu
Tue Jan 4 14:19:51 PST 2011


Hi,
  I am instrumenting the stores in a program by inserting a function 
call (store_prologue) before every store instruction in the IR file. I 
set the prologue function's attribute to "AlwaysInline" using 
addFnAttr(). In the program the prologue function is defined as static 
inline. I am using opt to generate an optimized (inline the calls to the 
store prologue) using the following options "-always-inline". I also 
tried "-inline". However, the calls to the prologue function are not 
inlined. I was wondering if I am doing something wrong?. Is there any 
way to force inline a function. I really appreciate your help.

  Best,
  --Hari






More information about the llvm-dev mailing list