Bug 25142 - Add optimization levels
Summary: Add optimization levels
Status: NEW
Alias: None
Product: dwz
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Nobody
Depends on:
Reported: 2019-10-28 14:13 UTC by Tom de Vries
Modified: 2024-02-03 13:47 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2019-10-28 14:13:05 UTC
Both for the purposes of:
- bug analysis (for the dwz developer)
- bug workaround (for the dwz user)
it would be good to be able to somehow control the optimization level.

So, it would be possible to work around bugs in -O<n> by using -O<n-1>.

A possible optimization level distribution could be:
- O1: read in and write out, no duplicate DIE elimination: 
  - rewrite .debug_abbrev sections (merging abbreviation tables for different
    CUs to eliminate duplicate table entries),
  - use minimal reference encoding (f.i., rewrite DW_FORM_ref8 into
- O2: eliminate duplicate DIEs intra-CU
- O3: eliminate duplicate DIEs inter-CU