Conversation started Dec 12, 2011 at 23:23.
Xeo
Xeo
Dec 12, 2011 23:23
I wonder if you'd get anything out of compiling native code to IL and then compiling to machine code on the installation site.
What do you think about that one?
@Xeo Knowledge of the supported extensions, for one.
So you can use SSSE8 or whatever new fancy thing is.
@FredOverflow Good night
Without runtime implementation swapping.
Xeo
Xeo
Hmm, should actually be doable with LLVM and libclang.
Now the only thing that needs to be done per-platform is the installer
sounds a bit like Java and .NET >_>"
Dec 12, 2011 23:26
Well, .NET does that.
Xeo
Xeo
just that this is "code once, install everywhere" not "code once, run everywhere"
Java only uses hot JIT.
Which is arguably better, because it has even more contextual knowledge.
that's hot jit
Dat JIT.
Xeo
Xeo
@CatPlusPlus Well, that makes the code kinda interpreted, which was not what I was going for. Only crossplatform installable without having to crosscompile yourself.
Dec 12, 2011 23:29
CPU is an interpreter.
universal binaries work like that or no?
@Xeo So, it's an installer that packs the source and compiler?
Xeo
Xeo
@RMartinhoFernandes Not directly the source
not the crosscompile at installation, I mean
Xeo
Xeo
IL compiled source
Dec 12, 2011 23:30
I only ever heard "universal binary" used in context of OSX PPC/x86 binaries.
Xeo
Xeo
@CatPlusPlus Fair point
You're going to compile anyway.
@Xeo What's the reason not to?
Xeo
Xeo
Though "double interpretion" sounds as bad as "double dereference" :P
@RMartinhoFernandes Smaller package, not releasing source code, dunno exactly. Something along those lines.
IL is high-level enough that getting source code back is trivial.
Time to rest
Cu guys
Good night
Xeo
Xeo
Dec 12, 2011 23:31
I know IL can be reverse-engineered pretty easily, but oh well
It's the same with most high-level bytecodes.
Xeo
Xeo
I'll find a reason to just include IL not the source. :P
The argument for smaller package is good though.
Xeo
Xeo
@CatPlusPlus Well, even using platform independent bytecode instead of IL would work, and just compiling that down to machine code on the install site
does LLVM actually have a bytecode?
IL is platform independent bytecode.
Xeo
Xeo
Dec 12, 2011 23:33
hm
What Cat said.
Yes, LLVM Intermediate Representation.
Xeo
Xeo
Hm, so no good for obscuring the original source a bit
It looks a bit like normal C syntax IIRC, right?
LLVM IR is more like assembler
you won't be able to reconstruct meaningful source from it, I think
Well, yes, IR is assembly. IR bitcode is output.
Dec 12, 2011 23:35
especially as you can put it through the optimizers first
It's bit lower level than IL.
I think the point was to optimize on-site.
And it's SSA.
0
Q: How to specify degenerate dimension of boost multi_array at runtime?

mezhakaI have a 3D multi_array and I would like to make 2D slices using dimensions specified at runtime. I know the index of degenerate dimension and an index of slice, that I want to extract in that degenerate dimension. Currently the ugly workaround looks like that: if (0 == degenerate_dimension) { ...

and reverse-engineering the optimized output is going to be non-trivial fo sho
Dec 12, 2011 23:36
But you can strip variable names and it'll work.
Yay, a multidimensional array question that doesn't annoy me.
@RMartinhoFernandes Because it uses MultiArray!
Xeo
Xeo
@DeadMG The intent was to compile and optimize at the installation site
@CatPlusPlus Exactly.
Xeo
Xeo
So you'd have the non-optimized code in the install package
Dec 12, 2011 23:37
you only need to instantiate the platform-specific libraries at the installation site
you can run it through plenty of generic optimizations before it gets there
Xeo
Xeo
True enough
like register lowering, inlining, and all that stuff
Well, you'll want to do some optimisations at compile-time anyway.
Xeo
Xeo
Hmm, makes me want to play around with that
I mean, LLVM IR is completely target-independent
Dec 12, 2011 23:38
You might want to delay e.g. power reduction to know whether it's profitable on target.
you can produce it, optimize it like a bitch, then link in the platform-specific libraries, do a little LTO, and then be done
But stuff like constant folding is generic.
 
Conversation ended Dec 12, 2011 at 23:38.