[llvm] r179957 - SimplifyCFG: If convert single conditional stores
Krzysztof Parzyszek
kparzysz at codeaurora.org
Mon Apr 29 14:59:26 PDT 2013
On 4/24/2013 1:47 PM, Chandler Carruth wrote:
>
> I feel like we need a better strategy long-term. Increasingly, I'm of
> the opinion that as we move away from the SelectionDAG's basic block
> limitations, we should also move away from canonicalizing to the
> if-converted code. These days I would rather see us add utilities to
> LLVM to look across basic blocks which form PHI-only CFGs as-if they
> were straight line code, and to have the canonical form of predicated
> values be PHI-only CFGs. This has a nice advantage of simplifying the IR
> model, and being strictly more general than selects. However, it
> *requires* that we don't have a basic-block granularity hard limitation
> in passes, and that's just not the world we live in currently. Maybe
> eventually.
This may or may not work in practice. For example, loop unrolling may
be beneficial in cases where the code is straight-line, but not when it
has branches in it. With canonicalization either way we won't always
know if the final code will be a straight-line or not until long after
optimizations that may be interested in such knowledge have taken place.
Personally, I don't think that one size will ever fit all. IMO, a lot
better thing would be to have a collection of tools (passes, etc.) that
each target can put together to form their own compiler instead of
having one common optimizer. From what I remember this goes directly
against the original intent of LLVM, but I doubt that there will ever be
a common optimizer that works for all.
-Krzysztof
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-commits
mailing list