Compilers

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • can we find the optimization level from obj-file?

    1 answers - 884 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi All,
    This is regarding the assembly level optimization .Is it possible to
    find out from the object code to what level it is optimized .i.e. for
    e.g. in gcc compiler we have several level of optimizations so if once
    the compiler performs the optimization both architecture specific and
    non-architecture specific.
    Now after the assembler converts it into objcode than can it be
    determined at that time to which level that code is optimized
    Though according to me it's not possible but I need your suggestions
    on that.
    Thanks and Best Regards,
    *
    Jatin Bhateja
    Subject Matter Expert
    AMDCS INTEGRATED CUSTMER MANAGEMENT
    [I would think that for a particular compiler and target system, you could
    find patterns generated by each opt level, but in general it seems like a
    hopeless waste of time. -John]
  • No.1 | | 939 bytes | |

    2005-10-26, Jatin Bhateja <jatin.bhateja@amdocs.comwrote:
    Now after the assembler converts it into objcode than can it be
    determined at that time to which level that code is optimized
    Though according to me it's not possible but I need your suggestions
    on that.

    [I would think that for a particular compiler and target system, you could
    find patterns generated by each opt level, but in general it seems like a
    hopeless waste of time. -John]

    If the binary mustn't be extremely tight, simply add the compiler
    options used as a string in the binary.

    If not, as John says, you can implement heuristics, but these are horribly
    compiler, level, target and (even minor!) version dependant

    Moreover, with compilers like gcc, the levels are only global, and more
    finegrained control over optimization (on a per specific optimization basis)
    is usually possible.

Re: can we find the optimization level from obj-file?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Compilers"

EMSDN.COM