jckarter / clay

The Clay programming language
http://claylabs.com/clay
Other
404 stars 34 forks source link

add more options for code generation #475

Closed crabtw closed 11 years ago

crabtw commented 11 years ago

This patch adds command line options to allow us to specify more detailed features for target platform.

stepancheg commented 11 years ago

What are option names in clang to specify these features? I think we should be as compatible with clang command-line interface as possible.

crabtw commented 11 years ago

-target-cpu and -soft-float can be renamed as clang's options. For -target-features, some names are different from llvm accepted names. We have to translate them before passing to Target::createTargetMachine.

jckarter commented 11 years ago

Yeah, Clang does some nontrivial translation of GCC-compatible -m switches to LLVM attributes. A good compromise might be to adopt llc's -mattr=... syntax for target attributes so we're at least consistent with other LLVM tools, if not Clang and GCC.

crabtw commented 11 years ago

I renamed these options.

jckarter commented 11 years ago

Looks good.

crabtw commented 11 years ago

I revert -msoft-float to -soft-float so these options are compatible with llc now.

ghost commented 11 years ago

Merged in 3a006374b044c6df1c9dfd497ed65915964525bb. Thanks @crabtw.