comparison gen/toobj.cpp @ 951:e71c61befd6d

Now that we're using LLVM 2.5, we can stop always running the CFGSimplification pass. The pass was originally added as a workaround for a LLVM 2.4 bug where debug info would reference labels that have been optimized away.
author Christian Kamm <kamm incasoftware de>
date Thu, 12 Feb 2009 18:39:03 +0100
parents 1714836f2c0b
children a8cb25d478c4
comparison
equal deleted inserted replaced
948:780530d1cad3 951:e71c61befd6d
193 } 193 }
194 else { 194 else {
195 Logger::println("Verification passed!"); 195 Logger::println("Verification passed!");
196 } 196 }
197 } 197 }
198
199 // always run this pass to eliminate dead code that breaks debug info
200 llvm::PassManager pm;
201 pm.add(new llvm::TargetData(ir.module));
202 pm.add(llvm::createCFGSimplificationPass());
203 pm.run(*ir.module);
204 198
205 // run optimizer 199 // run optimizer
206 ldc_optimize_module(ir.module, global.params.optimizeLevel, global.params.llvmInline); 200 ldc_optimize_module(ir.module, global.params.optimizeLevel, global.params.llvmInline);
207 201
208 // verify the llvm 202 // verify the llvm