This is an archive of the discontinued LLVM Phabricator instance.

Propagate fast math flags via IR optimizations and code generation
AbandonedPublic

Authored by mcberg2017 on May 4 2018, 5:11 PM.

Details

Summary

Here we introduce intrinsic fast math sub flag mapping, fma and interior expression fast math sub flag mapping as well as cmp and others with tests to exemplify where flags propagate and where they do not.

Diff Detail

Event Timeline

mcberg2017 created this revision.May 4 2018, 5:11 PM
mcberg2017 edited the summary of this revision. (Show Details)May 4 2018, 8:30 PM
spatel added a comment.May 6 2018, 9:05 AM

I'm still nervous about doing more than 1 thing in the same patch. I'd like to focus on the SelectionDAGBuilder part first. We should have tests now that verify at least some of those diffs. Can you split that change off?

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5481–5499

I don't like that we're going to miss FMF propagation for all of these intrinsics. I'd like to get propagation done in one place and completely, so we don't have to keep adding code every time there's a new intrinsic. See D37686 for an alternate idea.

mcberg2017 added inline comments.May 6 2018, 9:40 AM
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5481–5499

I had been considering moving it to setValue...

I'll look into doing the split with tests at SelectionDAGBuilder.

This review will still contain the propagation code, but will be stale for a bit while its code is split up into intervening reviews. Stay tuned...

mcberg2017 abandoned this revision.May 25 2018, 1:04 PM

This review is now represented in other reviews or ir partially checked in...