Artyom Skrobov via llvm-dev
2016-Jan-04 14:42 UTC
[llvm-dev] Diff to add ARMv6L to Target parser
>> 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. 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-gnueabihfWhere is this "armv6l" coming from? Is it a legacy GNU thing? Or is it a newly-coined name?
William Dillon via llvm-dev
2016-Jan-04 16:53 UTC
[llvm-dev] Diff to add ARMv6L to Target parser
> 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>
Artyom Skrobov via llvm-dev
2016-Jan-04 17:07 UTC
[llvm-dev] Diff to add ARMv6L to Target parser
>> Ah, I see: ARMv7L is now an alias for ARMv7A. > > Do you have a reference to where it’s defined as an alias?Yes, see getArchSynonym in TargetParser.cpp> Other than the unit test (should I be thinking about adding a unit test?)Yes, certainly: that's the only way to ensure that armv6l wouldn't be washed away by future refactorings.>> 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/LinuxOK, fair enough.
Tim Northover via llvm-dev
2016-Jan-05 08:33 UTC
[llvm-dev] Diff to add ARMv6L to Target parser
On 4 January 2016 at 14:42, Artyom Skrobov via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Ah, I see: ARMv7L is now an alias for ARMv7A.The "armv7l" comes directly from the Linux kernel I believe: "armv7" + "little-endian" (arch/arm/kernel/setup.c:638 ish). I'm not entirely convinced the "l" belongs in any triple seen by LLVM, but if we do support it we should probably handle it analogously to the "el"/"eb" suffixes. Cheers. Tim.
James Molloy via llvm-dev
2016-Jan-05 08:49 UTC
[llvm-dev] Diff to add ARMv6L to Target parser
Hi, IMO we should support this, even though if given the option I'd have asked the linux guys not to invent a new triple. It's in linux now, and `uname -a` is a very standard way of obtaining the host's triple. James On Tue, 5 Jan 2016 at 08:34 Tim Northover via llvm-dev < llvm-dev at lists.llvm.org> wrote:> On 4 January 2016 at 14:42, Artyom Skrobov via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Ah, I see: ARMv7L is now an alias for ARMv7A. > > The "armv7l" comes directly from the Linux kernel I believe: "armv7" + > "little-endian" (arch/arm/kernel/setup.c:638 ish). I'm not entirely > convinced the "l" belongs in any triple seen by LLVM, but if we do > support it we should probably handle it analogously to the "el"/"eb" > suffixes. > > Cheers. > > Tim. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160105/0c17289d/attachment.html>