[PATCH] [ARM] Add knowledge of FPU subtarget features to TargetParser
John Brawn
john.brawn at arm.com
Thu Jun 4 08:26:40 PDT 2015
> Another is to move the parsing logic from ARMAsmParser to a new method, one outside the ARMTargetParser and ARMAsmParser, that uses a Features vector and common both assembler's and Clang's feature bits parsing, but only changes in the assembler side (LLVM patch). ARMSubTarget is probably the best place for it.
The problem with moving that part to ARMSubTarget is that then clang can't see it, as nothing in lib/Target/TargetName is exposed in include/llvm/Target. I could maybe put something in MC/SubtargetFeature or MC/MCSubtargetInfo, but that would mean ARM-specific stuff is polluting a target-independent interface unless I do something like add a target-independent TargetParser layer on top of ARMTargetParser.
REPOSITORY
rL LLVM
================
Comment at: include/llvm/Support/TargetParser.h:18
@@ -17,1 +17,3 @@
+#include <vector>
+
----------------
rengolin wrote:
> This will include <vector> is a lot of other files that don't need it. Can you use SmallVector or something and declare it like StringRef?
std::vector is the standard way of handling lists of subtarget feature flags in clang, so using something else would make the interface with clang messier. Also there are quite a lot of headers that include <vector>, and looking at the places TargetParser is used they're probably including one of them already.
http://reviews.llvm.org/D10237
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list