1. One or more non-transitory computer-readable media holding executable instructions that when executed on a processing device replaces functions in model code, the media holding one or more instructions for: identifying a pattern in model code, where: the model code is associated with a graphical model having executable semantics, the pattern is associated with a function in the model code, and the function performs operations when the model code is executed; selecting, for the identified pattern, a hardware specific function that performs an operation equivalent to an operation performed by the function in the model code; replacing the function in the model code with the selected hardware specific function; and storing the model code.