add Hardgen call in compiler