Refactoring gc_relocate related code in CodeGenPrepare.cpp