Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor code and style improvements in ui/repl.c #9732

Merged
merged 7 commits into from
Jan 12, 2015

Commits on Jan 11, 2015

  1. Minor code and style improvements in ui/repl.c

    - use array variables instead of pointers
    - add const where possible
    - use enums to assign values for high getopt options insteaf of
      possibly error-prone manual assignment.  Also documents the
      code better
    drepper committed Jan 11, 2015
    Configuration menu
    Copy the full SHA
    892ebdb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    434362a View commit details
    Browse the repository at this point in the history
  3. Minor code and style improvements in ui/repl.c

    - use array variables instead of pointers
    - add const where possible
    - use enums to assign values for high getopt options insteaf of
      possibly error-prone manual assignment.  Also documents the
      code better
    drepper committed Jan 11, 2015
    Configuration menu
    Copy the full SHA
    6402cf8 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2015

  1. Speed up jl_egal

    jl_egal is an exported and recursively called function which puts
    some constraints on the optimizer.  The way jl_egal is currently
    structured it pretty much as all the code needed for the comparisons
    inlined, including the more complex parts to compare tuples and
    fields.  The code goes to great length to optimize special cases
    which can be treated simpler but the generalization of the rest of
    the code causes problems.
    
    Specifically, the more complex parts of the comparison process require
    more registers for the optimized code to use.  The results in the
    function starting with a large prologue which saves all the callee-save
    registers that are used, followed in the end by the respective epilogue.
    
    This means that even though in some cases the function will almost
    immediately return because of the special case handling, all the work
    for of the prologue and epilogue still has to be done.
    
    I ran limited profiling (mostly the arrayops test case) and the jl_egal
    function shows up on position 3 with 5.48%.  With the simple change in
    this patch this is reduced to 4.64%.
    
    The patch is trivial, no real code changes.  To prevent the complex
    prologue/epilogue from unconditionally bing created the complex code
    blocks are moved into their own functions and then these functions are
    called.  To prevent the optimizer from negating this work the functions
    must be marked appropriately.  Fortunately I've found that this is
    already done in some cases elsewhere in the code base so I'm sure the
    change will not create any problem.
    drepper committed Jan 12, 2015
    Configuration menu
    Copy the full SHA
    89f3b58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    30bedf0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7251bff View commit details
    Browse the repository at this point in the history
  4. Improve noinline use

    - introduce macros NOINLINE and NOINLINE_DECL
    - adjust existing code in task.c
    - rewrite change for jl_egal using NOINLINE
    - add extensive comment explaining jl_egal change
    drepper committed Jan 12, 2015
    1 Configuration menu
    Copy the full SHA
    df443d3 View commit details
    Browse the repository at this point in the history