jansvoboda11 added a comment.

Yeah, in some cases, we'd be just replacing the index-based indirection with 
address-based indirection (e.g. when working with `SearchDirToHSEntry`).

However, most existing `HeaderSearch` algorithms already work with the index 
and use that to get the `DirectoryLookup` from `SearchDirs`. We'd be adding 
another level of indirection for them: first they'd need to get 
`DirectoryLookup *` from `SearchDirs` with the index and then dereference the 
pointer. Maybe that's not very important from performance perspective 
(especially if we bump-ptr-allocate them), but something to be aware of IMO.

The `SearchDirsUsage` member is a bit-vector that's being inserted into the 
same way `SearchDirs` is, so no need to fiddle with indices there. As for 
`ModuleToSearchDirIdx`: yes, we'd need to update indices the same way we do 
here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116750/new/

https://reviews.llvm.org/D116750

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to