CUDA compiler warnings

When compiling some complicated kernels, CUDA generates the below warnings, and then it will become very very slow and consumes much main memory. Does anyone has some ideas? Thanks in advance!

Warning: Cannot tell what pointer points to, assuming global memory space
… (the same as above)
Warning: To override Olimit for all functions in file, use -OPT:Olimit=1152401> (Compiler may run out of memory or run very slowly for large Olimit values)