What ARM architectures does LLVM support?
architecture, arm, llvm
Solution
Their source code lists the following archs:
// ARM architectures.
def ArchV4T : SubtargetFeature<"v4t", "ARMArchVersion", "V4T", "ARM v4T">;
def ArchV5T : SubtargetFeature<"v5t", "ARMArchVersion", "V5T", "ARM v5T">;
def ArchV5TE : SubtargetFeature<"v5te", "ARMArchVersion", "V5TE", "ARM v5TE, v5TEj, v5TExp">;
def ArchV6 : SubtargetFeature<"v6", "ARMArchVersion", "V6", "ARM v6">;
def ArchV6M : SubtargetFeature<"v6m", "ARMArchVersion", "V6M", "ARM v6m", [FeatureNoARM, FeatureDB]>;
def ArchV6T2 : SubtargetFeature<"v6t2", "ARMArchVersion", "V6T2", "ARM v6t2", [FeatureThumb2]>;
def ArchV7A : SubtargetFeature<"v7a", "ARMArchVersion", "V7A", "ARM v7A", [FeatureThumb2, FeatureNEON, FeatureDB]>;
def ArchV7M : SubtargetFeature<"v7m", "ARMArchVersion", "V7M", "ARM v7M", [FeatureThumb2, FeatureNoARM, FeatureDB, FeatureHWDiv]>;
Problem
I work on software written in C that runs on a variety of ARM processors with different architectures (ARMv5, ARMv6 mostly). We currently compile our code with a few different versions of RVDS, but we are looking at compiling some code with LLVM in order to add some custom instrumentation. I know LLVM has ARM and Thumb targets, but what architectures does it support, specifically? Will LLVM generated code work on ARMv5? What limitations should I be aware of?