optimization - What compilers can detect pure mathematical functions and optimize them (without telling you so)? -
I have seen it.
Is the compiler able to detect pure mathematical operations and optimize them (without informing you so)?
To do this is naturally risky in languages which are lacking indicators and global compilation ; Analysis. Therefore, if any one operation has been declared non-present, then the compiler should admit that it may have side effects.
Example:
// getx.cpp int GetX Int input) {int * pData = (int *) Input; * Pidata = 50; Return 0; } // gety.cpp int GetY (int input) {Getx (Input + 4); } // main.cpp int main () {int arg [] {0, 4}; Return GetY (int) arg); } When compiling the compiler Getty
, it can not say that GetX
considers its argument as an indicator and dereferences And modifies data Non-functional, side-effect-prone methods This information is available only during linking so that the concept of link to include many code creation and analysis to support you Have to search again.
Comments
Post a Comment