Aiming at the problems of interdisciplinary integration, difficulty in personalized learning, and lack of real-time feedback in the traditional teaching of compiler courses, this paper proposes an AI-enabled human-machine collaborative teaching mode and builds an intelligent AI teaching platform. This mode integrates students, teachers, and AI into an organic whole. AI provides students with personalized services such as relevant course knowledge recommendation, learning resource recommendation, and quiz push, and provides teachers with intelligent services such as automatic homework correction and learning data analysis feedback. Teaching practice analysis shows that this mode has improved students’ final exam scores and learning experience.