bondhugula added a comment. In D112284#3088531 <https://reviews.llvm.org/D112284#3088531>, @tra wrote:
> In D112284#3086499 <https://reviews.llvm.org/D112284#3086499>, @bondhugula > wrote: > >> @tra While on this, I also wanted to ask as to why clang cuda codegen is >> using an argument on the global ctor and the dtor it's generating. > > It's a good question, and I don't have a good answer. It's quite possible > that the parameter is not needed. As a result of this parameter, there appears to be a lot of code in `CodegenModule.cpp` to add the ctor/dtor to the global lists. All of that would disappear with a single call to `appendToGlobalCtors` or `appendToGlobalDtors` if we got rid of the argument. Perhaps the extra argument was used initially for debugging or the fact that an extra argument bumps up the stack frame and makes something else work? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112284/new/ https://reviews.llvm.org/D112284 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits