summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/Object.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-09-19 18:42:34 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-09-19 18:42:34 +0000
commitaffd201967f7d5cfeecf06b13347897087da42bf (patch)
tree9de3d9c019f1f5ee14b75d32ea857d974c1f3ce7 /llvm/tools/llvm-objcopy/Object.cpp
parente79dda31e9ed6cfc97d06ad87976fb16e53f3780 (diff)
downloadbcm5719-llvm-affd201967f7d5cfeecf06b13347897087da42bf.tar.gz
bcm5719-llvm-affd201967f7d5cfeecf06b13347897087da42bf.zip
Recommit r313647 now that GCC seems to accept the offering
Add some member types to MachineValueTypeSet::const_iterator so that iterator_traits can work with it. Improve TableGen performance of -gen-dag-isel (motivated by X86 backend) The introduction of parameterized register classes in r313271 caused the matcher generation code in TableGen to run much slower, particularly so in the unoptimized (debug) build. This patch recovers some of the lost performance. Summary of changes: - Cache the set of legal types in TypeInfer::getLegalTypes. The contents of this set do not change. - Add LLVM_ATTRIBUTE_ALWAYS_INLINE to several small functions. Normally this would not be necessary, but in the debug build TableGen is not optimized, so this helps a little bit. - Add an early exit from TypeSetByHwMode::operator== for the case when one or both arguments are "simple", i.e. only have one mode. This saves some time in GenerateVariants. - Finally, replace the underlying storage type in TypeSetByHwMode::SetType with MachineValueTypeSet based on std::array instead of std::set. This significantly reduces the number of memory allocation calls. I've done a number of experiments with the underlying type of InfoByHwMode. The type is a map, and for targets that do not use the parameterization, this map has only one entry. The best (unoptimized) performance, somewhat surprisingly came from std::map, followed closely by std::unordered_map. DenseMap was the slowest by a large margin. Various hand-crafted solutions (emulating enough of the map interface not to make sweeping changes to the users) did not yield any observable improvements. llvm-svn: 313660
Diffstat (limited to 'llvm/tools/llvm-objcopy/Object.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud