optimize away function calls with const arguments