title: Compiler generated feedback for Large Language Models
summary: We introduce a novel paradigm in compiler optimization powered by Large
  Language Models with compiler feedback to optimize the code size of LLVM
  assembly. The model takes unoptimized LLVM IR as input and produces optimized
  IR, the best optimization passes, and instruction counts of both unoptimized
  and optimized IRs. Then we compile the input with generated optimization passes
  and evaluate if the predicted instruction count is correct, generated IR is
  compilable, and corresponds to compiled code. We provide this feedback back to
  LLM and give it another chance to optimize code. This approach adds an extra
  0.53% improvement over -Oz to the original model. Even though, adding more
  information with feedback seems intuitive, simple sampling techniques achieve
  much higher performance given 10 or more samples.
paper_authors._id: 66010123e3faf4b4d95c4484
paper_authors.name: Dejan Grubisic
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2024-03-25T11:47:04.538Z
paper_authors._id: 65d8b5a3132f10d591f3c00f
paper_authors.avatarUrl: /avatars/3939f9582d882128dc2e64b0220f3844.svg
paper_authors.fullname: Dejan Grubisic
paper_authors.type: user
paper_authors.user: dejangrubisic
paper_authors._id: 66010123e3faf4b4d95c4485
paper_authors.name: Chris Cummins
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2024-03-25T11:47:11.670Z
paper_authors._id: 63d32301c20657d2434d2fcb
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1674781395584-noauth.jpeg
paper_authors.fullname: Chris Cummins
paper_authors.type: user
paper_authors.user: ChrisCummins
paper_authors._id: 66010123e3faf4b4d95c4486
paper_authors.name: Volker Seeker
paper_authors._id: 66010123e3faf4b4d95c4487
paper_authors.name: Hugh Leather
paper_title: Compiler generated feedback for Large Language Models
paper_summary: We introduce a novel paradigm in compiler optimization powered by Large
  Language Models with compiler feedback to optimize the code size of LLVM
  assembly. The model takes unoptimized LLVM IR as input and produces optimized
  IR, the best optimization passes, and instruction counts of both unoptimized
  and optimized IRs. Then we compile the input with generated optimization passes
  and evaluate if the predicted instruction count is correct, generated IR is
  compilable, and corresponds to compiled code. We provide this feedback back to
  LLM and give it another chance to optimize code. This approach adds an extra
  0.53% improvement over -Oz to the original model. Even though, adding more
  information with feedback seems intuitive, simple sampling techniques achieve
  much higher performance given 10 or more samples.