[LLVMbugs] [Bug 20683] New: Create a Target description API which is able (and responsible) to parse all common options

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 16 05:12:37 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20683

            Bug ID: 20683
           Summary: Create a Target description API which is able (and
                    responsible) to parse all common options
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Target Description Classes
          Assignee: unassignedbugs at nondot.org
          Reporter: renato.golin at linaro.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Currently, code that parses assembly directives which have the exact same
syntax as command line options (ex. -mfpu and .fpu) are duplicated in LLVM and
Clang, because on both places the usage is restricted to a particular target
and it's hidden within target specific code. To avoid breaking tools when not
building certain backends, LLVM needs to keep everything else completely
independent of target specific classes.

Worse still, the classes that represent target specific options are also
duplicated in Clang, so this is not just two similar parsers, but the whole
arhc/subarch representation (features, options, behaviour) being duplicated.
But the target description in Clang is not tied up with target-specific
parsing, which is done at the driver level, on static local functions.

Duplicating the same code in clang and llvm, and worse still, other tools and
external third-party tools, is far from ideal and will generate conflicts,
bit-rot and other problems that we're already seeing. Therefore, we need a
target-specific API that both LLVM and tools can use, which mean the same thing
and can parse the same syntax (or be specific about different syntaxes meaning
the same thing).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140816/3a6ec8df/attachment.html>


More information about the llvm-bugs mailing list