[LLVMdev] Loop localize global variables (original) (raw)
sundeepk at codeaurora.org sundeepk at codeaurora.org
Mon Jul 20 22:10:33 PDT 2015
- Previous message: [LLVMdev] Loop localize global variables
- Next message: [LLVMdev] Loop localize global variables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 that it can be allocated into registers. For example, transform the following sequence static int gblvar; void foo() { for () { ...access gblvar... } } into something like static int gblvar; void foo() { int lclvar; lclvar = gblvar; for () { ...access clcvar... } gblvar = lclvar; } This transformation helps a couple of EEMBC benchmarks on both Aarch64 and Hexagon backends. I was wondering if there is interest to get this optimization upstreamed or if there is a better way of doing this. Thanks, Sundeep Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
- Previous message: [LLVMdev] Loop localize global variables
- Next message: [LLVMdev] Loop localize global variables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]