Hi;<div><br></div><div>Both -fplugin-arg-dragonegg-emit-ir and -flto works for creating llvm bitcode that can be run with lli.  Thanks to Nick for the suggestion.</div><div><br></div><div>Now, trying to run an OpenMP hello world program.</div>
<div><br></div><div>llvm-gcc -fopenmp p_hello.c -flto -S -o p_hello.ll</div><div><div>lli p_hello.ll</div><div><br></div><div>output: LLVM ERROR: Program used external function 'GOMP_parallel_start' which could not be resolved!</div>
<div><br></div><div>I am guessing that I have to link libgomp.a somehow but want to know the correct way to do it.</div><div><br></div><div>Other way around using gcc:</div><div><br></div><div><div>llvm-gcc -fopenmp p_hello.c -flto -S -o p_hello.ll</div>
<div>llc p_hello.ll</div></div><div><div>gcc -fopenmp p_hello.s -o p_hello</div></div><div>./p_hello</div><div><br></div><div>output:</div><div><br></div><div><div>Hello World</div><div>Hello World</div><div>Hello World</div>
<div>Hello World</div></div><div><br></div><div>I guess this is not the (only) way to run OpenMP programs. I can guess that compiling the libgomp into LLVM IR and then linking it with the hello.ll will allow me to run it with lli?</div>
<div>Any other suggestion on how to run them?</div>-- <br>Arnamoy Bhattacharyya<br>Athabasca Hall 143<br>Department of Computing Science - University of Alberta<br>Edmonton, Alberta, Canada, T6G 2E8<br>587-710-7073<br>
</div>