[LLVMdev] Alternate instruction sequences
Devang Patel
dpatel at apple.com
Wed Nov 9 09:27:30 PST 2011
On Nov 9, 2011, at 12:52 AM, cafxx wrote:
> I was wondering, is there any way to express in the IR that an
> instruction/instruction sequence/basic
> block/region/function/module/whatever is an alternate version of
> another?
There is not a way to represent --- instruction I1 is an alternative for instruction I2 --- in LLVM IR.
-
Devang
> e.g. let's keep things simple and say that I have an
> instruction I. An optimization pass reads it and could be able to
> produce one or more functionally-equivalent instructions I1, ..., In
> without being really able to ascertain which one is "best" w.r.t. the
> optimization goal. While this could be true even for a single, isolated,
> pass it's all the more true for chains of optimizations (i.e. 'which one
> of the alternate instructions will be the "best" after all other
> optimizations have run?'). In this case, wouldn't it be interesting to
> be able to insert into the IR all (or some of) the alternate versions,
> mark them as such and defer the decision about which one will be used
> after all optimizations have run?
> B.r.,
> Carlo Alberto
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list