[PATCH] D12882: [SimplifyCFG] do not speculate fdiv by default; it's expensive (PR24818)
firstname.lastname@example.org via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 16:13:30 PDT 2015
hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.
LGTM. Please go ahead and fix the FIXME and make UDiv and SDiv (and URem/SRem?) expensive by default. The targets can always override these if appropriate.
> What defines the "canonical" or "optimal" IR?
These are different things. Canonical form is designed to be simple, yes, but to expose further optimizations and limit the implementation complexity of different optimizations and analysis. Optimal IR need to be defined with respect to a particular backend and architecture, and might not be in canonical form.
> Less instructions? Less basic blocks?
> Less register pressure?
During canonicalization, we ignore this by design. During lowering (including late IR passes such as vectorization), it can be considered explicitly.
> Is it art or science?
More information about the llvm-commits