Giter VIP home page Giter VIP logo

gcc-passes's Introduction

Discover GCC Optimization Passes

This project is a script which, in conjunction with the included GCC plugin, allows to discover which optimization passes GCC executes for which optimization level. All the levels of -O are supported (0, g, 1, s, 2, 3, fast).

When the script is called with one of the levels as the command line argument it shows all the passes by name, nested according to the part of the compiler they belong too.

When the script is given two parameters the passes used in the invocations according to the two optimization levels are compared and differences highlighted.

As an example see the beginning of the output of the following command:

 $ ./gcc-passes.sh 0
 GIMPLE pass:
     pass *warn_unused_result
     pass omplower
     pass lower
     pass ehopt
     pass eh
     pass cfg
     pass *warn_function_return
     pass ompexp
     pass *build_cgraph_edges
 simple IPA pass:
     pass *free_lang_data
     pass visibility
     pass build_ssa_passes
 GIMPLE pass:
     pass    fixup_cfg
     pass    ssa
     pass    *rebuild_cgraph_edges
 simple IPA pass:
     pass opt_local_passes
 GIMPLE pass:
     pass    fixup_cfg
     pass    *rebuild_cgraph_edges
     pass    local-fnsummary
     pass    einline

This output shows the different types of passes (GIMPLE, IPA, โ€ฆ). This might vary from compiler version to version. What this also shows that even with -O0 some optimization passes are executed.

Author: Ulrich Drepper [email protected]

gcc-passes's People

Contributors

drepper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.