[cfe-dev] Adding constant optimizations to Clang AST

dmanatunga manatunga at gmail.com
Wed Feb 6 12:17:04 PST 2013

I am working on implementing a constant reassociation optimization to the AST
which will take an expression, such as:
x = 10 + a + 5
and reassociate it to some form of:
x = 10 + 5 + a.

Where would be the best place to apply this optimization? Should it be done
through a plugin using a visitor (can plugins edit the AST before final
compilation)? Or do I need to manually edit certain locations in the source


View this message in context: http://clang-developers.42468.n3.nabble.com/Adding-constant-optimizations-to-Clang-AST-tp4030322.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list