search for: powerfunc

Displaying 1 result from an estimated 1 matches for "powerfunc".

2007 Nov 21
1
[LLVMdev] program specialization vs LTO in LLVM
...nal > from each other. One is an optimization technique > and the other is a time that optimization can > occur. Please explain a bit more about what you are > trying to accomplish. A contrived example I had in mind is a program that computes a power function. In pseudocode: int powerFunc( int x, int n ) { if n is 0 return 1 if n is even return square( powerFunc( x, 0.5*n ) ) if n is odd return x * powerFunc( x, n - 1 ) } If we know what the exponent (say n = 5) is at compile time, program can be optimized via specialization (partial evaluation) to g...