I think I have found some very interesting things when I am trying to accelerate a function using "FunctionCompile".
The list iterator like "i", "j" in build-in function Sum cannot be recognized as local variables by "FunctionCompile". You have to define it ahead and then use it. It may not be a problem, as it is a tradition in other low-level languages like C. But it confused me a little and it is quite different from wolfram language usages. See the following codes for example.
FunctionCompile[Function[Typed[arg,"Real64"],Sum[arg^2+i, {i, 10}]]]
the above code gives an error "Cannot find a definition for i".
A dramatic thing happened when I try to fix this problem. Adding the definition of the iterator "i", it gives me an error "TypeError. Cannot find a definition for Sum."
FunctionCompile[Function[{Typed[arg,"Real64"],Typed[i,"Real64"]},Sum[arg^2+i, {i, 10}]]]
I think that is very interesting. Although the function Sum can be replaced by other functions like Total in some time, it is still a frequently used function in many programs. Other build-in function like Table, Power, Gamma or even Pochhammer and LaguerreL seems allright.
I hope it is an exception and can be fixed by a simple upgrade, or reload.