This paper investigates a device-to-device (D2D) cooperative computing system, where an user can offload part of its computation task to nearby idle users with the aid of an intelligent reflecting surface (IRS). We propose to minimize the total computing delay via jointly optimizing the computation task assignment, transmit power, bandwidth allocation, and phase beamforming of the IRS. To solve the formulated problem, we devise an alternating optimization algorithm with guaranteed convergence. In particular, the task assignment strategy is derived in closed-form expression, while the phase beamforming is optimized by exploiting the semi-definite relaxation (SDR) method. Numerical results demonstrate that the IRS enhanced D2D cooperative computing scheme can achieve a much lower computing delay as compared to the conventional D2D cooperative computing strategy.