[PATCH] D40170: [llvm-tblgen] - Stop using std:string in RecordKeeper.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 00:44:40 PST 2017


grimar added a comment.

In https://reviews.llvm.org/D40170#928757, @zturner wrote:

> As for this patch, I would actually prefer if we didn't even use `std::map`.  Is ordering important here?  Can this be changed to a `llvm::StringMap`?


`RecordKeeper` has `getClasses` and `getDefs` which are used for iterations over `std::map` returned currently, so I think ordering is important.

I tried to use `StringMap` + `std::vector` (demo of this is https://reviews.llvm.org/D40239) and X86CommonTableGen rebuild time changes from 1446 seconds to 1430 for me
(FWIW I am using MSVS built in timing for calculation), or about 1%. Do you think we can use such approach ?


https://reviews.llvm.org/D40170





More information about the llvm-commits mailing list