aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/CoverageMappingTest.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-08-04 17:50:06 -0700
committerFangrui Song <maskray@google.com>2020-08-04 17:50:06 -0700
commit0c7af8c83bd1acb0ca78f35ddde29b6fde4363a0 (patch)
treec45ef9375d6ec68137da9aa6f522594989b4e043 /llvm/unittests/ProfileData/CoverageMappingTest.cpp
parent4c9ed3ed3d2fc7622acf5fc0d80ad20b44cf376a (diff)
downloadllvm-0c7af8c83bd1acb0ca78f35ddde29b6fde4363a0.zip
llvm-0c7af8c83bd1acb0ca78f35ddde29b6fde4363a0.tar.gz
llvm-0c7af8c83bd1acb0ca78f35ddde29b6fde4363a0.tar.bz2
[X86] Optimize getImpliedDisabledFeatures & getImpliedEnabledFeatures after D83273
Previously the time complexity is O(|number of paths from the root to an implied feature| * CPU_FWATURE_MAX) where CPU_FEATURE_MAX is 92. The number of paths can be large (theoretically exponential). For an inline asm statement, there is a code path `clang::Parser::ParseAsmStatement -> clang::Sema::ActOnGCCAsmStmt -> ASTContext::getFunctionFeatureMap` leading to potentially many calls of getImpliedEnabledFeatures (41 for my -march=native case). We should improve the performance a bit in case the number of inline asm statements is large (Linux kernel builds). Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D85257
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
0 files changed, 0 insertions, 0 deletions