search for: gbl_var

Displaying 2 results from an estimated 2 matches for "gbl_var".

2015 Jul 21
2
[LLVMdev] Loop localize global variables
Hello all, I am writing to get some feedback on an optimization that I would like to upstream. The basic idea is to localize global variables inside loops so that it can be allocated into registers. For example, transform the following sequence static int gbl_var; void foo() { for () { ...access gbl_var... } } into something like static int gbl_var; void foo() { int lcl_var; lcl_var = gbl_var; for () { ...access clc_var... } gbl_var = lcl_var; } This transformation helps a couple of EEMBC benchmarks on both Aarch64 and Hexagon...
2015 Jul 21
2
[LLVMdev] Loop localize global variables
...that will be ready, so I'm just sharing what I've found out, maybe it's helpful. I'd be interested to hear your thoughts / approach in greater detail. Thanks! --Charlie. On 21 July 2015 at 06:10, <sundeepk at codeaurora.org> wrote: > typo corrected > > lcl_var = gbl_var; > for () { > ...access lcl_var... > } > gbl_var = lcl_var; > > >> Hello all, >> >> I am writing to get some feedback on an optimization that I would like to >> upstream. The basic idea is to localize global variables inside loops so >> tha...