GCC compiles on several platforms and each of these platforms have a different native pointer size (e.g. 32-bit on x86, 64-bit on x64). And on 64-bit platforms, you can even pass it an mx32 flag to make it 'cross compile' to x86.
How would a GCC plugin detect the target (i.e. the platform GCC is generating code for) pointer size?
That was actually quite easy. Here it is.
pointerSizeInBits = TYPE_PRECISION(integer_ptr_type_node);