aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-03-01 02:19:26 +0000
committerCraig Topper <craig.topper@intel.com>2019-03-01 02:19:26 +0000
commit4f61308af274c72fa30ae6441d6a5c799924f221 (patch)
tree0b5e0fb5d855fbc684e331aaf499d7c1855d7e84 /llvm/lib/Support/CommandLine.cpp
parent93317d82daf864956ae0608594ee94293e3a4257 (diff)
downloadllvm-4f61308af274c72fa30ae6441d6a5c799924f221.zip
llvm-4f61308af274c72fa30ae6441d6a5c799924f221.tar.gz
llvm-4f61308af274c72fa30ae6441d6a5c799924f221.tar.bz2
[Subtarget] Remove static global constructor call from the tablegened subtarget feature tables
Subtarget features are stored in a std::bitset that has been subclassed. There is a special constructor to allow the tablegen files to provide a list of bits to initialize the std::bitset to. This constructor isn't constexpr and std::bitset doesn't support many constexpr operations either. This results in a static global constructor being used to initialize the feature bitsets in these files at startup. To fix this I've introduced a new FeatureBitArray class that holds three 64-bit values representing the initial bit values and taught tablegen to emit hex constants for them based on the feature enum values. This makes the tablegen files less readable than they were before. I can add the list of features back as a comment if we think that's important. I've added a method to convert from this class into the std::bitset subclass we had before. I considered making the new FeatureBitArray class just implement the std::bitset interface we need instead, but thought I'd see how others felts about that first. I've simplified the interfaces to SetImpliedBits and ClearImpliedBits a little minimize the number of times we need to convert to the bitset. This removes about 27K from my local release+asserts build of llc. Differential Revision: https://reviews.llvm.org/D58520 llvm-svn: 355167
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions