The invention discloses a compilation optimization pass combination optimization method based on deep
reinforcement learning. The method comprises the following steps: 1) collecting a reference program
data set for various
general function tests; 2) constructing a deep
reinforcement learning-based compilation optimization pass-combination optimization strategy model for a compilation optimization pass-combination optimization process, wherein the compilation optimization pass-combination optimization strategy model comprises agent D3QN construction and definition of a reward space, a
state space and an action space; 3) introducing a composite program feature combined with basic features such as a
control flow embedding vector extracted by the graph neural network, an instruction number, a
basic block number and the like into the expression of the
state space, enriching the expression ability of the state, optimizing the pass based on the state selection and acting on the intermediate expression by the D3QN, generating an award, and obtaining the
state space; and repeating the loop of
feature extraction-
action selection-reward generation until the maximum action upper limit is reached, and generating an optimized pass combination adapted to the program features. The problem that in existing compiling optimization, the compiling optimization effect on part of programs is poor is solved.