HomePhabricator

[NFC] Simpler and faster key computation for getSubtargetImpl memoization

Authored by serge-sans-paille on Mar 22 2021, 1:52 AM.

Description

[NFC] Simpler and faster key computation for getSubtargetImpl memoization

There's no use in computing a large key that's only used for a memoization
optimization.

Details

Committed
serge-sans-pailleMar 22 2021, 2:02 AM
Parents
rGc691b9686b77: [mlir] Add an option to still use bottom-up traversal
Branches
Unknown
Tags
Unknown

Event Timeline

Apologize that I also wrote these comments in github. Not sure the best place to ensure visibility.

/llvm/lib/Target/X86/X86TargetMachine.cpp
251

Clang passes a large string with -march=skylake-avx512 or -march=native on a modern CPU. Definitely larger than 64.

287

I think I put this separator in case CPU or TuneCPU where empty so it wouldn't be ambiguous.