[PATCH] D21520: [SelectionDAG] use <mutex> instead of LLVM home-grown primitive

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 13:52:57 PDT 2016

rafael added a subscriber: rafael.
rafael added a comment.

Gosh, this code is horrible.

It uses a global for a set of structs that include a pointer to a LLVM type. The type itself is not global, it is part of the LLVMContext.

So while this change is probably fine, how much harder would it be to avoid the lock completely by moving the guarded globals to LLVMContext? You might need to use a "void *CodeGenData" pointer to work around the library layering.


More information about the llvm-commits mailing list