Details
Diff Detail
- Repository
- rC Clang
Event Timeline
Just a side note - seeing a problem with dyld wrt original tsan_init solution, do we have the same problem with msan_init, which was similarly solved in D55647?
llvm/test/Instrumentation/ThreadSanitizer/tsan_basic.ll | ||
---|---|---|
2 ↗ | (On Diff #181026) | I don't need to test tsan, just the pass pipeline specifics. The other tests appeared to mainly test tsan specifics, so I didn't touch them. I can absolutely port the others, but that will (in theory at least) double the runtime. Do you have suggestions which other tests are meaningful to the pipeline? |
Insert the constructor and init functions only once per module.
Do you think the current check on the ctor function is sufficient, or should I
also check whether it actually contains the init call as well?
OK, this makes sense to me now. Minor comment below, but LGTM with that.
llvm/lib/Transforms/Utils/ModuleUtils.cpp | ||
---|---|---|
183–184 ↗ | (On Diff #181237) | Can you add a FIXME to sink the get-or-insert style logic into the module API much like we have for globals? That will (eventually) make this much easier to move into a concurrent model. |
Execute appendtoGlobalCtors lazily as well. Previously the inserted ctor was
still added multiple times to the global ctors list. Doing this lazily requires
knowing when the ctor is actually created, so I added a callback to handle the
insertion.
Oh, and a nit. Minor though.
llvm/include/llvm/Transforms/Utils/ModuleUtils.h | ||
---|---|---|
71 ↗ | (On Diff #181821) | Use a llvm::function_ref here? Should be much cheaper. |