Abstract:Application-specific custom instructions can reduce the length of exectutable code, improve efficiency and reduce system power consumption. Instruction at the candidate selection plays an important role in automa- tice instruction set extension. It influences the performance and efficiency of the instruction extension directly. Although the existing heuristic algorithm has better time performance, it still has room for improvement in time performance and selection result. Thus, this paper proposes a heuristic algorithm based on the directive expansion of inter-relevance. Experimental results show that this algorithm can be quicker and more effective than the existing heuristic algorithm in finding better combinations of the candidate instructions.