[LLVMdev] Getting rid of phi instructions?

Eli Friedman eli.friedman at gmail.com
Wed Aug 31 02:43:37 PDT 2011


On Wed, Aug 31, 2011 at 2:35 AM, Teemu Rinta-aho
<teemu.rinta-aho at nomadiclab.com> wrote:
> On 31.8.2011, at 11.41, Eli Friedman wrote:
>
>> Mmm... reg2mem will transform IR with PHI's into IR without them, but
>> it generates a bunch of alloca's, which I would assume are not cheap
>> to lower to VHDL.  You might have to write your own pass to get the
>> precise transformation you're looking for.
>
> Right. Thanks. I need to see the reg2mem source code.

lib/Transforms/Scalar/Reg2Mem.cpp in the LLVM source tree.

-Eli




More information about the llvm-dev mailing list