[PATCH] [CodeGenPrepare.cpp] Feedback on changing logic when to convert select to branch
Gerolf Hoflehner
ghoflehner at apple.com
Mon Oct 27 00:03:27 PDT 2014
Hi grosbach, chandlerc, jmolloy,
The current logic in OptimizeSelectInst() converts a
select to a branch when the select is expensive (determined by a (sub-)target
specific flag) or the branch is cheaper (by some heuristic). The proposed change
enables the heuristic check to kick in even when the target specific flag
suggest any select is cheap and therefore should not be converted. Eventually we want good
heuristics when to prefer a branch over a select. Changing the condition when to
enable them is the first step doing so. At least on cyclone treating all selects
as 'cheap' results in regressions. I'm still evaluating the peformance impact of this change,
and look for feedback on the general direction.
http://reviews.llvm.org/D5998
Files:
lib/CodeGen/CodeGenPrepare.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5998.15472.patch
Type: text/x-patch
Size: 1160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141027/7474b644/attachment.bin>
More information about the llvm-commits
mailing list