diff --git a/llvm/examples/Kaleidoscope/toy.cpp b/llvm/examples/Kaleidoscope/toy.cpp index 0035f3928d7c..4f9e94982928 100644 --- a/llvm/examples/Kaleidoscope/toy.cpp +++ b/llvm/examples/Kaleidoscope/toy.cpp @@ -1125,6 +1125,8 @@ int main() { // Simplify the control flow graph (deleting unreachable blocks, etc). OurFPM.add(createCFGSimplificationPass()); + OurFPM.doInitialization(); + // Set the global so the code gen can use this. TheFPM = &OurFPM;