Stop calling the flat out insane ARM target parsing code unless the
authorChandler Carruth <chandlerc@gmail.com>
Sun, 30 Aug 2015 09:54:34 +0000 (09:54 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 30 Aug 2015 09:54:34 +0000 (09:54 +0000)
commit45ecdf96ee5c1bc5ce3881518ac8fb0bda07ed06
treebdf744418d6a337451401fda9a457901e25857ae
parent2ff230d5c9658b0f1e6f789344e4d2cffc03b51e
Stop calling the flat out insane ARM target parsing code unless the
architecture string is something quite weird. Similarly delay calling
the BPF parsing code, although that is more reasonable.

To understand why I was motivated to make this change, it cuts the time
for running the ADT TripleTest unittests by a factor of two in
non-optimized builds (the developer default) and reduces my 'check-llvm'
time by a full 15 seconds. The implementation of parseARMArch is *that*
slow. I tried to fix it in the prior series of commits, but frankly,
I have no idea how to finish fixing it. The entire premise of the
function (to allow 'v7a-unknown-linux' or some such to parse as an
'arm-unknown-linux' triple) seems completely insane to me, but I'll let
the ARM folks sort that out. At least it is now out of the critical path
of every developer working on LLVM. It also will likely make some other
folks' code significantly faster as I've heard reports of 2% of time
spent in triple parsing even in optimized builds!

I'm not done making this code faster, but I am done trying to improve
the ARM target parsing code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246378 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Triple.cpp