Mercurial > projects > ldc
comparison gen/toobj.cpp @ 605:e235b80c92bc
Removed useless assert in ArrayLiteralExp::toConstElem
Added second verification pass after optimization
Commented an optimization pass out from lvl2, it turns the IR invalid, see llvm PR 2800
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 16 Sep 2008 16:06:39 +0200 |
parents | 12bda38ea366 |
children | 26fce59fe80a |
comparison
equal
deleted
inserted
replaced
604:a30fc28e8f23 | 605:e235b80c92bc |
---|---|
152 } | 152 } |
153 | 153 |
154 // run optimizer | 154 // run optimizer |
155 llvmdc_optimize_module(ir.module, global.params.optimizeLevel, global.params.llvmInline); | 155 llvmdc_optimize_module(ir.module, global.params.optimizeLevel, global.params.llvmInline); |
156 | 156 |
157 // verify the llvm | |
158 if (!global.params.novalidate && (global.params.optimizeLevel >= 0 || global.params.llvmInline)) { | |
159 std::string verifyErr; | |
160 Logger::println("Verifying module... again..."); | |
161 LOG_SCOPE; | |
162 if (llvm::verifyModule(*ir.module,llvm::ReturnStatusAction,&verifyErr)) | |
163 { | |
164 error("%s", verifyErr.c_str()); | |
165 fatal(); | |
166 } | |
167 else { | |
168 Logger::println("Verification passed!"); | |
169 } | |
170 } | |
171 | |
157 // eventually do our own path stuff, dmd's is a bit strange. | 172 // eventually do our own path stuff, dmd's is a bit strange. |
158 typedef llvm::sys::Path LLPath; | 173 typedef llvm::sys::Path LLPath; |
159 LLPath bcpath = LLPath(objfile->name->toChars()); | 174 LLPath bcpath = LLPath(objfile->name->toChars()); |
160 LLPath llpath = bcpath; | 175 LLPath llpath = bcpath; |
161 llpath.eraseSuffix(); | 176 llpath.eraseSuffix(); |