[LLVMbugs] [Bug 14559] New: Passing command line argument to llvm opt pass in dragonegg

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 10 03:57:40 PST 2012


             Bug #: 14559
           Summary: Passing command line argument to llvm opt pass in
           Product: dragonegg
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: New Bugs
        AssignedTo: baldrick at free.fr
        ReportedBy: augustin.degomme at inria.fr
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I'm trying to use a simple opt pass with dragonegg, as I saw that polly was
working this way (
https://groups.google.com/forum/?fromgroups=#!topic/polly-dev/Al0qy2HF_xI and
http://llvm.org/bugs/show_bug.cgi?id=13379 ). 

When I build dragonegg with the ENABLE_LLVM_PLUGINS=1 option, the pass is
loaded correctly, but the option to activate it is not understood by dragonegg.

This can be reproduced with the simple hello pass in llvm lib/Transform/Hello
folder , which uses the RegisterPass template to register its command line

gcc -fplugin=/path-to-dragonegg/dragonegg.so
-fplugin-arg-dragonegg-llvm-option=-hello test.c 

I've got 

cc1: Unknown command line argument '-hello'.  Try: 'cc1 -help'
cc1: Did you mean '-help'?

So the dragonegg plugin is loaded, the pass is also loaded (without
ENABLE_LLVM_PLUGINS -load is not understood, so I guess this works), but the
command line argument seems to be parsed before the pass is loaded and its
arguments added, so it is not seen as valid. 

I saw that polly uses a different way to handle pass options, more complex,
which is supported (-load then -polly works fine), but I was not able to
reproduce its behavior simply yet, and I would like to keep the pass simple, as
it works fine with clang. 

Thanks for the great job on these tools

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list