Multiplatform easy-embeddable VM

I read http://lucille.atso-net.jp/blog/?p=496 and found the LLVM for the first time. These days I'm thinking about runtime optimization of PL language in the RDBMS. Although the SQL and 2-dimensional table structure is highly sophisticated and strict enough to make it persistent storage, sometimes you would like to put more complicated data like arrays and json. You can put them easily, for example PostgreSQL has even ARRAY[] syntax, in your database but it is a bit harder to operate them. You must write pl/pgSQL or user c function to do it. The pl/pgSQL has the functionality to solve this problem, with very high operation cost because of its capability to execute any syntax of SQL. e.g. SPI provides greate flexibility instead of c function performance.
I want more opration-oriented procedure language. There we don't have to execute SQL nor do something on tables but complicated data types. Customizable operaters would do in high percentage cases.

SELECT oper('{1, 2, 3}'::int4[], 'a * a');

=> '{1, 4, 9}' (int4[])

With LLVM will it be possible??