[PATCH] D21723: [RFC] Enhance synchscope representation

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 16:54:41 PDT 2017


kzhuravl added a comment.

> I think I mentioned in the past using target specific strings instead of integer in textual and bitcode serialization, why was this ruled out? This was intended to addressed such issues (and make the textual IR more readable)

I do not recall original reasons we did not go with target specific strings, but just thinking from the top of my head:

- Existing synchronization scope field is represented as 32 bits unsigned field in the bitcode
  - Introducing new synchronization scopes is naturally simple - minimal impact across the board
- I think changing the synchronization scope representation to strings will impose unnecessary complexity
  - On maintaining backwards compatibility for the bitcode (in addition, strings might be of arbitrary length)
  - On using existing synchronization scopes (CrossThread, SingleThread) within the llvm. Do we want to represent those as strings as well?
  - Few size-sensitive structures (e.g. MMO) have synchronization scope as a member, so changing syncscope to string will increase their size
  - +additional burden for carrying through strings throughout the compilation (compared to ints)


https://reviews.llvm.org/D21723





More information about the llvm-commits mailing list