The application discloses a CPU
performance index prediction method based on a gated graph neural network, which obtains data of CPU performance
bottleneck related indexes of the same architecture of multiple C language projects, and constructs a
data set; C functions are extracted from the C language projects and an
abstract syntax tree is constructed; data flow information,
control flow information and code sequence information are integrated in the
abstract syntax tree; code information graphs are obtained; then a
deep learning model based on the gated graph neural network is built and trained, and finally, CPU performance
bottleneck related indexes of the C functions are predicted under the same architecture as the
data set. The method can statically evaluate CPU performance
bottleneck indexes of the C functions without actually running the codes, and does not require developers to write tests, perform compilation and construction and the like for the codes, thereby avoiding time length overhead of a traditional
dynamic program analysis method, and improving the efficiency of the developers in CPU performance bottleneck positioning and CPU performance optimization.