This is an archive of the discontinued LLVM Phabricator instance.

FastMathFlags: Make it easier to unset individual ones.
ClosedPublic

Authored by Nicola on May 24 2018, 6:45 AM.

Details

Summary

This makes the various flags similar to current setAllowContract.

I added a default argument that sets them to true to avoid breaking the current uses.

Diff Detail

Repository
rL LLVM

Event Timeline

Nicola created this revision.May 24 2018, 6:45 AM
spatel accepted this revision.May 24 2018, 8:06 AM

LGTM - thanks!

See https://bugs.llvm.org/show_bug.cgi?id=37581 for an independent bug based on this code.

include/llvm/IR/Operator.h
210–214 ↗(On Diff #148400)

Run clang-format on this?

Would be easier to see that these are all the same basic logic if they all had the function body on a separate line.

This revision is now accepted and ready to land.May 24 2018, 8:06 AM
Nicola added inline comments.May 24 2018, 8:13 AM
include/llvm/IR/Operator.h
210–214 ↗(On Diff #148400)

I did, that's how it ended up like that :(

I'll make it look "nice" again and submit.

This revision was automatically updated to reflect the committed changes.