[LLVMdev] if-conversion
Devang Patel
dpatel at apple.com
Tue Jan 20 10:34:52 PST 2009
On Jan 20, 2009, at 2:29 AM, Ralf Karrenberg wrote:
> Hello everyone,
>
> I'd like to know if there is an optimization in llvm doing something
> like an if-conversion on the IR. I only found IfConversion.cpp which
> appears to only provide the desired functionality on machine code
> during
> code-generation.
>
> I want to transform branches into serial code with select-instructions
> as a pre-processing step for further transformations.
>
> If there is no such pass, I will possibly write one and share it
> (although I have no idea how to do so yet), so please let me know :).
There is not any pass that can transform branches into serial code
with select-instructions. Simplify CFG can handle simple cases of
selecting one value based on a condition, but its goal is to simplify
cfg. This may not be enough for your needs.
If you write a separate pass, we'd like to integrate it in mainline
llvm sources.
-
Devang
More information about the llvm-dev
mailing list