William Dillon via llvm-dev
2016-Jan-06 17:55 UTC
[llvm-dev] Diff to add ARMv6L to Target parser
Taking the suggestions of the group under consideration, I’ve generated a new diff. The thing to note is that armv6l is now treated identically to armv6hl. I’ve also added a unit test. This seems to me to be the least invasive method, and holds to existing conventions as closely as possible. Thoughts? -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-armv6l.diff Type: application/octet-stream Size: 2198 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160106/31b7528c/attachment.obj> -------------- next part --------------> On Jan 5, 2016, at 9:51 AM, Renato Golin <renato.golin at linaro.org> wrote: > > On 5 January 2016 at 17:24, William Dillon <william at housedillon.com> wrote: >> How is this for a proposed solution? What if I add logic to >> llvm::ARM::getCanonicalArchName() that matches the trailing ‘l’ (or ‘b’) and >> treats it the same way that ‘el’ and ‘eb’ are now? This function would >> return v7 or v6 in the case of armv7l or armv6l, respectively (or, if it’s >> preferred, v7a or v6a). It seems like this is closer to the “correct” >> approach. It does show potentially inappropriate deference to Linux’s >> choice in the matter, but at least it’s not making sub-architectures that >> don’t exist. > > This is the final "better" solution, but it can't be implemented right > now due to current expectations of what "armv7l" and "armv6l" mean. > > If you return "v7" from "armv7l", it'll set the arch to generic ARMv7 > which has none of the current ARMv7A attributes that makes code runs > *much* faster. That would be a major regression in performance. > > The quick hack is to leave "armv7l" as it is, add "armv6l" to the > expected "armv6?" variant that means RaspberryPi, and add a number of > FIXMEs to the parser: > 1. To remove both L/B variants as aliases > 2. To implement L/B in getCanonical in the same way as EB/BE > 3. But only once Triple/Tuple can replace the "v7l" -> "v7a when > Linux" OR "v7R when RTLinux" logic (I have no idea how this will pan > out). > > To know about the progress on Tuple, check with Daniel Sanders and > Eric Christopher (CC'd). > > Adding this hack to the Driver now could make the mess even worse at this stage. > > cheers, > --renato
Artyom Skrobov via llvm-dev
2016-Jan-06 18:02 UTC
[llvm-dev] Diff to add ARMv6L to Target parser
William, what revision of LLVM is your patch based on? The trunk hasn't had ARM_ARCH("armv6hl") since r252903 (Nov 12th) -----Original Message----- From: William Dillon [mailto:william at housedillon.com] Sent: 06 January 2016 17:55 To: Renato Golin Cc: Tim Northover; LLVM Dev; nd; Artyom Skrobov; Daniel Sanders; Eric Christopher Subject: Re: [llvm-dev] Diff to add ARMv6L to Target parser Taking the suggestions of the group under consideration, I’ve generated a new diff. The thing to note is that armv6l is now treated identically to armv6hl. I’ve also added a unit test. This seems to me to be the least invasive method, and holds to existing conventions as closely as possible. Thoughts?
William Dillon via llvm-dev
2016-Jan-07 18:02 UTC
[llvm-dev] Diff to add ARMv6L to Target parser
Oops, I neglected to reply-all…. The current stable branch at github still has it: https://github.com/apple/swift-llvm/blob/stable/include/llvm/Support/ARMTargetParser.def#L106 <https://github.com/apple/swift-llvm/blob/stable/include/llvm/Support/ARMTargetParser.def#L106> Should I get the head of the non-swift repository and generate a new diff? Also, I suspect that it’s not a good idea to have armv6l map to armv6k, because that seems like quite an assumption to make. Clearly, armv6 sub architectures that aren’t v6k will still be v6l in linux. (provided they’re little-endian). I’ve already made that change, and it would be included in any revised diff that I send out. Thanks, - Will> On Jan 6, 2016, at 10:02 AM, Artyom Skrobov <Artyom.Skrobov at arm.com> wrote: > > William, what revision of LLVM is your patch based on? > > The trunk hasn't had ARM_ARCH("armv6hl") since r252903 (Nov 12th) > > > -----Original Message----- > From: William Dillon [mailto:william at housedillon.com] > Sent: 06 January 2016 17:55 > To: Renato Golin > Cc: Tim Northover; LLVM Dev; nd; Artyom Skrobov; Daniel Sanders; Eric Christopher > Subject: Re: [llvm-dev] Diff to add ARMv6L to Target parser > > Taking the suggestions of the group under consideration, I’ve generated a new diff. The thing to note is that armv6l is now treated identically to armv6hl. I’ve also added a unit test. > This seems to me to be the least invasive method, and holds to existing conventions as closely as possible. > > Thoughts? >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160107/e8e3c936/attachment.html>