Hello All, Another newbie question. I am confused as to what options will work with "fplugin-arg-dragonegg-llvm-option" for dragonegg plugin. Readme says it is used to pass command-line options to llvm. I shall consolidate into 3 questions. For all examples below, I used combo- gcc 4.6 + dragonegg(trunk) + llvm(trunk) (1). Does 'fplugin-arg-dragonegg-llvm-option' allow all 'opt' options? $ gcc -fplugin=dragonegg.so -fplugin-arg-dragonegg-llvm-option='-disable-inlining' foo.c -S cc1: Unknown command line argument '-disable-inlining'. Try: 'cc1 -help' (2). Does 'fplugin-arg-dragonegg-llvm-option' allow ONLY 'opt' options? (by llvm options does it mean only opt) (3). Depending on answer to (2), currently is there a way to pass llc options to dragonegg? For instance -menable-unsafe-math? $ gcc -fplugin=dragonegg.so -fplugin-arg-dragonegg-llvm-option='-menable-unsafe-math' foo.c -S cc1: Unknown command line argument '-menable-unsafe-math'. Try: 'cc1 -help' The case for passing 'llc' options stems from the requirement that code generation is controlled by many llc options(math for example). Please correct if the options are wrong. - Anitha
Hello All, Another newbie question. I am confused as to what options will work with "fplugin-arg-dragonegg-llvm-option" for dragonegg plugin. Readme says it is used to pass command-line options to llvm. I shall consolidate into 3 questions. For all examples below, I used combo- gcc 4.6 + dragonegg(trunk) + llvm(trunk) (1). Does 'fplugin-arg-dragonegg-llvm-option' allow all 'opt' options? $ gcc -fplugin=dragonegg.so -fplugin-arg-dragonegg-llvm-option='-disable-inlining' foo.c -S cc1: Unknown command line argument '-disable-inlining'. Try: 'cc1 -help' (2). Does 'fplugin-arg-dragonegg-llvm-option' allow ONLY 'opt' options? (by llvm options does it mean only opt) (3). Depending on answer to (2), currently is there a way to pass llc options to dragonegg? For instance -menable-unsafe-math? $ gcc -fplugin=dragonegg.so -fplugin-arg-dragonegg-llvm-option='-menable-unsafe-math' foo.c -S cc1: Unknown command line argument '-menable-unsafe-math'. Try: 'cc1 -help' The case for passing 'llc' options stems from the requirement that code generation is controlled by many llc options(math for example). Please correct if the options are wrong. -- Anitha
Guess, no help? I am left to debug on my own :( A quick looks shows that dragonegg passes pseudo args to llvm::cl::ParseCommandLineOptions. After this, it is left to the commandline parser to crib. Probably the optionsMap is not initialized properly ..? On 8 August 2012 16:12, Anitha Boyapati <anitha.boyapati at gmail.com> wrote:> Hello All, > > Another newbie question. I am confused as to what options will work > with "fplugin-arg-dragonegg-llvm-option" for dragonegg plugin. Readme > says it is used to pass command-line options to llvm. I shall > consolidate into 3 questions. For all examples below, I used combo- > gcc 4.6 + dragonegg(trunk) + llvm(trunk) > > (1). Does 'fplugin-arg-dragonegg-llvm-option' allow all 'opt' options? > > $ gcc -fplugin=dragonegg.so > -fplugin-arg-dragonegg-llvm-option='-disable-inlining' foo.c -S > cc1: Unknown command line argument '-disable-inlining'. Try: 'cc1 -help' > > > (2). Does 'fplugin-arg-dragonegg-llvm-option' allow ONLY 'opt' > options? (by llvm options does it mean only opt) > > > (3). Depending on answer to (2), currently is there a way to pass llc > options to dragonegg? For instance -menable-unsafe-math? > > > $ gcc -fplugin=dragonegg.so > -fplugin-arg-dragonegg-llvm-option='-menable-unsafe-math' foo.c -S > cc1: Unknown command line argument '-menable-unsafe-math'. Try: 'cc1 -help' > > The case for passing 'llc' options stems from the requirement that > code generation is controlled by many llc options(math for example). > Please correct if the options are wrong. > > > > -- > Anitha-- Anitha