diff options
| author | Michael Zolotukhin <mzolotukhin@apple.com> | 2015-02-06 20:02:51 +0000 |
|---|---|---|
| committer | Michael Zolotukhin <mzolotukhin@apple.com> | 2015-02-06 20:02:51 +0000 |
| commit | 4e8598eee3575db313966f24ffb116e06d38ea9c (patch) | |
| tree | 915b1d6c0de0f3bce968df873fe3930124b1b052 /polly/lib/Transform/CodePreparation.cpp | |
| parent | 8c89a82c880112d12f5163926ae26b7c7f3f0b11 (diff) | |
| download | bcm5719-llvm-4e8598eee3575db313966f24ffb116e06d38ea9c.tar.gz bcm5719-llvm-4e8598eee3575db313966f24ffb116e06d38ea9c.zip | |
[InstSimplify] Add SimplifyFPBinOp function.
It is a variation of SimplifyBinOp, but it takes into account
FastMathFlags.
It is needed in inliner and loop-unroller to accurately predict the
transformation's outcome (previously we dropped the flags and were too
conservative in some cases).
Example:
float foo(float *a, float b) {
float r;
if (a[1] * b)
r = /* a lot of expensive computations */;
else
r = 1;
return r;
}
float boo(float *a) {
return foo(a, 0.0);
}
Without this patch, we don't inline 'foo' into 'boo'.
llvm-svn: 228432
Diffstat (limited to 'polly/lib/Transform/CodePreparation.cpp')
0 files changed, 0 insertions, 0 deletions

