Improve function parameter register optimization handling