[Galaxy S Plus I9001 Android Development] Calin:
Resurrection Remix V5.4.4 ARCHI

Hi guys, after several compilations a finally reached to compile RR including also the ArchiDroid Optimizations

But meanwhile the build is still in upload on AFH i want to explain to you what these optimizations are:

As we almost know all the apps, libraries and even kernels are compiled using a toolchain, and the one in use is obviously the Google one (stock)

But the one in sue is the 4.8 one and the level optimization of target ARM is the 02 one but with ARCHI the default one is O3 .

I had compilations errors because some libs or even parts of libs couldn't be compiled because of the O3 flag so i had to compile them with the old O2 Flag

This happens because of the GCC which is now quite outdated so i think that from the next builds if everything would be ok i will use also the ArchiToolchain in order to eliminate those errors completely.

From the performance part i can't tell you there are significant changes but there is a slight increment of it as i saw in the last minutes on the phone, keep mind that this is an old device already so i think that these optimizations can be see better on a newer one.

Now i made also a benchmark test, don't know how it is because i didn't made a benchamark test for our device from long time ago but i think is quite good.

​

For those who want a changelog here are the main optimizations made:

- Optimized for speed yet more all instructions - ARM and THUMB (-O3)
- Optimized for speed also parts which are compiled with Clang (-O3)
- Turned off all debugging code (lack of -g)
- Eliminated redundant loads that come after stores to the same memory location, both partial and full redundancies (-fgcse-las)
- Ran a store motion pass after global common subexpression elimination. This pass attempts to move stores out of loops (-fgcse-sm)
- Performed interprocedural pointer analysis and interprocedural modification and reference analysis (-fipa-pta)
- Performed induction variable optimizations (strength reduction, induction variable merging and induction variable elimination) on trees (-fivopts)
- Didn't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions (-fomit-frame-pointer)
- Attempted to avoid false dependencies in scheduled code by making use of registers left over after register allocation. This optimization most benefits processors with lots of registers (-frename-registers)
- Tried to reduce the number of symbolic address calculations by using shared “anchor” symbols to address nearby objects. This transformation can help to reduce the number of GOT entries and GOT accesses on some targets (-fsection-anchors)
- Performed tail duplication to enlarge superblock size. This transformation simplifies the control flow of the function allowing other optimizations to do a better job (-ftracer)
- Performed loop invariant motion on trees. It also moved operands of conditions that are invariant out of the loop, so that we can use just trivial invariantness analysis in loop unswitching. The pass also includes store motion (-ftree-loop-im)
- Created a canonical counter for number of iterations in loops for which determining number of iterations requires complicated analysis. Later optimizations then may determine the number easily (-ftree-loop-ivcanon)
- Assumed that loop indices do not overflow, and that loops with nontrivial exit condition are not infinite. This enables a wider range of loop optimizations even if the loop optimizer itself cannot prove that these assumptions are valid (-funsafe-loop-optimizations)
- Moved branches with loop invariant conditions out of the loop (-funswitch-loops)
- Constructed webs as commonly used for register allocation purposes and assigned each web individual pseudo register. This allows the register allocation pass to operate on pseudos directly, but also strengthens several other optimization passes, such as CSE, loop optimizer and trivial dead code remover (-fweb)
- Sorted the common symbols by alignment in descending order. This is to prevent gaps between symbols due to alignment constraints (-Wl,--sort-common)

Download link will be also available in a few minutes so happy flashing and post also a feedback regarding ;)

Have a nice weekend you all

nilac