Check if already compiled

Is it possible to check if an expression f(x1, x2) will need to compile more or if it has already been compiled?