I was wondering why building of LLVM takes so much time for me and
tried to profile llvm-tblgen, which calls for X86CommonTableGen module looks
take about 24 minutes on my i7-4970k@~4.0 under windows with MSVS 2015 for debug build.
I found RecordKeeper::getDef() shows up in profiling and it
creates std::string instance for each search in RecordMap though RecordKeeper::RecordMap
can use StringRef as a key instead to avoid that I believe.
Total time seem reduces for about 12 seconds (from initial ~24minutes) so it is not so significant, but still a bit better.
(During investigation I found LLVM_OPTIMIZED_TABLEGEN flag and going to check how it helps, but still looks
we can fix that place to avoid excessive allocations too).
Sorry I also not sure who should be reviewer for that, and code looks really old,
so added people who modified code around that place.