[llvmlinux] Supporting LLVM IR output during build process

Jan-Simon Moeller dl9pf at gmx.de
Thu Dec 4 22:36:15 UTC 2014


Am Donnerstag, 4. Dezember 2014, 17:34:02 schrieb Jason Gionta:
> Hi Jan-Simon,
> 
> I appreciate the quick reply. I am not currently using the build system so
> I appreciate the insight.
> 
> So I believe from what you wrote LLVMLinux can emit the IR but does not use
> it for final compilation. Is there LLVM IR->bzImage support?

No, we did not go that far. Back then the student just wanted the IR of the 
single kernel .o files . 
I'm not sure we can do IR->bzImage atm. 
IR->vmlinux maybe, but bzImage has some realmode code with might not go 
through IR to target properly right now.


> 
> Thanks again,
> 
> Jason
> 
> On Thu, Dec 4, 2014 at 3:50 PM, Jan-Simon Moeller <dl9pf at gmx.de> wrote:
> > Hi Jason,
> > 
> > Am Donnerstag, 4. Dezember 2014, 15:10:13 schrieb Jason Gionta:
> > > Hello all,
> > > 
> > > I was wondering if someone has looked at or has experience outputting
> > 
> > LLVM
> > 
> > > IR of LLVMLinux before linking. I hope to better understand the
> > 
> > feasibility
> > 
> > > of deploying IR to perform LTO per machine before final linkage. Does
> > > anyone have ideas on how much effort would it take to enable in the
> > 
> > current
> > 
> > > LLVMLinux build process (basically the linux build system)?
> > > 
> > > Thanks,
> > 
> > This works already with the LLVMLinux build system.  Actually we compile
> > every
> > file twice. One normal compilation and a run for IR .
> > 
> > cd targets/<yourtarget - eg x86> ; make BITCODE=1
> > 
> > from make help
> > * make BITCODE=1          - Output llvm bitcode to *.bc files
> > 
> > Best,
> > Jan-Simon



More information about the LLVMLinux mailing list