aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2020-07-16 20:14:20 -0700
committerCraig Topper <craig.topper@intel.com>2020-07-16 21:41:45 -0700
commitaddbf732c83b54259d6aa2c6ed982099be0aeeaf (patch)
treee0088bda8163974a508e07570b9be4bf07707127 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent1b3c25e7b61f44b80788f8758f0d7f0b013135b5 (diff)
downloadllvm-addbf732c83b54259d6aa2c6ed982099be0aeeaf.zip
llvm-addbf732c83b54259d6aa2c6ed982099be0aeeaf.tar.gz
llvm-addbf732c83b54259d6aa2c6ed982099be0aeeaf.tar.bz2
[X86] Reorder how the subtarget map key is created.
We use a SmallString<512> and attempted to reserve enough space for CPU plus Features, but that doesn't account for all the things that get added to the string. Reorder the string so the shortest things go first which shouldn't exceed the small size. Finally add the feature string at the end which might be long. This should ensure at most one heap allocation without needing to use reserve. I don't know if this matters much in practice, but I was looking into something else that will require more code here and noticed the odd reserve call.
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions