Automatic optimization of C / C ++ code

I would like to optimize the C / C ++ code and get an optimized version in C or intermediate representation (for example, LLVM IR), without actually compiling the code, mainly due to the lack of dependencies. In other words, I am looking for a way to see the optimization results on specific pieces of C code, assuming that any compiler will not compile the code due to missing libraries and dependencies.

Is it possible to use optimizations built into open source C / C ++ compilers (like GCC and Clang) without compiling the code? I'm mainly interested in the flow control graph (CFG) of functions after optimization. I am fully aware of the fact that this will not be entirely possible and will almost certainly give different results compared to when dependencies are present (due to nesting, for example).

+3
optimization c gcc clang llvm


source to share


No one has answered this question yet

Check out similar questions:

2847
Improve SQLite performance per second per second?
2116
Why are stigmental additions so much faster in individual cycles than in combined cycles?
1938
Why doesn't GCC optimize a * a * a * a * a * a to (a * a * a) * (a * a * a)?
1470
What ":-!!" in C code?
1250
Replacing 32-bit loop counter with 64-bit values ​​leads to crazy performance deviations
590
How to reach the theoretical maximum of 4 FLOPs per cycle?
480
Does the C ++ standard allow uninitialized bool to crash?
400
Why is GCC generating 15-20% faster code if I optimize for size instead of speed?
87
LLVM C ++ IDE for Windows
13
How is clang able to manage optimization of C / C ++ code?



All Articles
Loading...
X
Show
Funny
Dev
Pics