[llvm-dev] Diff to add ARMv6L to Target parser

William Dillon via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 4 08:53:52 PST 2016


> On Jan 4, 2016, at 6:42 AM, Artyom Skrobov <Artyom.Skrobov at arm.com> wrote:
> 
>>> Going back through SVN history, I cannot find any evidence that ARMv6L ever existed.
>> 
>> Oh, my bad!! I was thinking of ARMv7l... :/
>> 
>> Nevertheless, I'll leave you guys to review this one, as I lost touch with the parser a while ago.
> 
> Ah, I see: ARMv7L is now an alias for ARMv7A.

Do you have a reference to where it’s defined as an alias?  I agree that would be the better approach.  I grep’d the source tree for ‘armv7l’ (case insensitive) and it doesn’t shed any light on the subject:

wdillon at tegra-ubuntu:~/apple-llvm$ grep -RIi "armv7l" *
include/llvm/Support/ARMTargetParser.def:ARM_ARCH("armv7l", AK_ARMV7L, "7-L", "v7l", ARMBuildAttrs::CPUArch::v7,
include/llvm/Support/ARMTargetParser.def:ARM_CPU_NAME("cortex-a8", AK_ARMV7L, FK_NEON, true, AEK_SEC)
lib/Support/Triple.cpp:  case ARM::AK_ARMV7L:
lib/Support/TargetParser.cpp:  case ARM::AK_ARMV7L:
lib/Support/TargetParser.cpp:  case ARM::AK_ARMV7L:
test/CodeGen/ARM/legalize-unaligned-load.ll:; RUN:  llc -O3 -code-model=default -relocation-model=default -mtriple=armv7l-unknown-linux-gnueabihf -mcpu=generic %s -o - | FileCheck %s
test/CodeGen/ARM/struct-byval-frame-index.ll:target triple = "armv7l-unknown-linux-gnueabihf"
unittests/ADT/TripleTest.cpp:    llvm::Triple Triple("armv7l-linux-gnueabihf”);

Other than the unit test (should I be thinking about adding a unit test?) and codegen these occurrences are what I modeled the ARMv6 patch to match.

> 
> So, if William has to add support for ARMv6L, I'd suggest he adds it as an alias, and not as an architecture variant.
> 
>>>> However, because the DefaultTargetTriple is armv6l-unknown-linux-gnueabihf
> 
> Where is this "armv6l" coming from? Is it a legacy GNU thing? Or is it a newly-coined name?

the armv6l is coming from linux.  

wdillon at raspberrypi:~ $ uname -a
Linux raspberrypi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux

The default target triple comes from the logic in the swift compiler.  The use case is to canonicalize the arm architecture part of the triple.  Because there is so much logic in llvm to make the correct decisions, it makes sense to me to let llvm do the work of decoding the arm architecture, rather than trying to hack something together within swift.

Thanks for the feedback! :)
- Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160104/75dd4874/attachment.html>


More information about the llvm-dev mailing list