[LLVMdev] lower-lever IR (A-normal form)

Tim Northover t.p.northover at gmail.com
Wed Jul 10 12:25:20 PDT 2013


Hi Eirini,

> i would like to get something like this (in A-normal form (without nested
> instructions):

The nested instructions come from anything LLVM can identify as a
constant (specifically, any value that's a subclass of Constant).

I'm not aware of a pass to turn them back into non-constant Values,
though one could clearly be written. It would probably count more as a
pessimisation than an optimisation though. The Constants have a
reasonable chance at resulting in no instructions at all, which I
doubt the expanded form would.

What are you trying to do where you think it would be an advantage?
Perhaps there's a better way without compromising optimisations.

Cheers.

Tim.



More information about the llvm-dev mailing list