When --fast-math is enabled, tell LLVM about it, too.

This commit is contained in:
Matt Pharr
2011-09-09 09:32:59 -07:00
parent 785d8a29d3
commit 4cf831a651

View File

@@ -153,6 +153,9 @@ extern void yy_delete_buffer(YY_BUFFER_STATE);
int int
Module::CompileFile() { Module::CompileFile() {
if (g->opt.fastMath == true)
llvm::UnsafeFPMath = true;
// FIXME: it'd be nice to do this in the Module constructor, but this // FIXME: it'd be nice to do this in the Module constructor, but this
// function ends up calling into routines that expect the global // function ends up calling into routines that expect the global
// variable 'm' to be initialized and available (which it isn't until // variable 'm' to be initialized and available (which it isn't until