Something to think about: when compiling to machine code the first trickiest optimization compilers need to do is to store as much data as it can within CPU registers.
And in doing so they need to make sure each variable isn't in the same register as any used to compute it.
Throw in the inherently finite number of registers and this becomes the Map Colouring Problem! NP-hard.
It would take forever to compute optimal solutions to this, but they don't need to do a perfect job.
@ksteimel I haven't looked too deeply into OpenMP, but I'd imagine so.
I'm talking about register allocators.