How to instrument a module to spit out the addresses of global variables during initialization?

My objective is to instrument a module such that the addresses of all global variables are printed out BEFORE even any real code is executed, i.e. during module initialization. I slipped in the following code snippet in the doIntialization() method of a FunctionPass. Unfortunately, I can’t see any code inserted in the IR generated.

To be precise, I am not being able to insert any appropriate builder.SetInsertPoint() call inside doInitialization() method.