[lkml]   [2007]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] CFS scheduler, -v8

    On Mon, 7 May 2007, Johannes Stezenbach wrote:
    > One baffling example where gcc rewrites code is when
    > conditionals depend on signed integer overflow:

    Yes. This is one of my favourite beefs with gcc. Some of the optimization
    decisions seem to make no sense.

    Your example is a good one, but my private beef has been in alias
    handling. Alias analysis is an important part of optimization, and there's
    two kinds: the static (and exact, aka "safe") kind that you can do
    regardless of any language definitions, because you *know* that you aren't
    actually changing behaviour, and the additional type-based heuristics that
    the C language allows.

    So which ones would you expect a compiler to consider more important?

    And which one do you think gcc will use?

    Right. You can have static analysis that *guarantees* that two objects
    alias, but if gcc determins that they have different types and thus might
    not alias, it decides to use the heuristic instead of the firm knowledge,
    and generate code that doesn't work.

    "Because the language definition allows it".

    Oh well.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-05-07 21:03    [W:0.019 / U:21.124 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site