[LLVMdev] [PATCH][RFC] Add llvm.codegen Intrinsic To Support Embedded LLVM IR Code Generation

dag at cray.com dag at cray.com
Mon May 7 09:11:20 PDT 2012


Tobias Grosser <tobias at grosser.es> writes:

> I think we need several modules per file. Supporting AMDIL and PTX at
> the same time sounds more than useful.

Yes.

> Another question that pops up to me. If we go support several modules,
> how would the command line options to opt look like? Do we want to
> make all options sub-module specific? Getting this user friendly may
> be difficult. The same for the output of llc. At the moment llc can
> dump the assembly to stdout. Would you dump the assembly of the
> different modules to stdout or do you want to support multiple -o
> options to specify the various output files?

I think you're making this too complicated.  I think opt should continue
to work the way it does now.  Apply the same flags to all modules.  If
the user wants different transformations based on target either the
target characteristics should inform the optimizer or the file should be
split into multiple IR files.

> The same for the LLVM CodeGen/Target API. It must possibly be changed
> to support the output of several modules or the specification of
> different options for each module. We also have the same problems as
> Justin pointed out for the codegen intrinsic. Some llc options are
> globals, they would need to be made Codegen options, if we want to set
> them on a per-module basis.

Can you give me some examples?  What kinds of options would be
target-specific and not implied by the target attribute on the Module?

                              -Dave



More information about the llvm-dev mailing list