<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Create a Target description API which is able (and responsible) to parse all common options"
href="http://llvm.org/bugs/show_bug.cgi?id=20683">20683</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Create a Target description API which is able (and responsible) to parse all common options
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Target Description Classes
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>renato.golin@linaro.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>