First Last Prev Next    No search results available
Details
: Empty compaction tables defined
Bug#: 430
: libraries
: Bitcode Writer
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.3
: P2
: normal
: 1.4

:
: regression
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Robert Mykland <robert@ascenium.com>
Assigned To: Reid Spencer <rspencer@reidspencer.com>

Attachments
Bytecode For Robert's First Example (201 bytes, application/octet-stream)
2004-08-26 15:29, Reid Spencer
Details
Bytecode For Robert's Second Example (470 bytes, application/octet-stream)
2004-08-26 15:30, Reid Spencer
Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2004-08-26 14:55
In all the simple code cases I've examined by hand so far, empty compaction
tables are defined for the functions that remain after full linking and inlining
(in both the cases below, a single function remains).

Case #1
-----
int main( void )
{
    return( 0 );
}
-----

Case #2
-----
#include <stdio.h>

int main( void )
{
    puts( "Hello world!" );
    return( 0 );
}
-----
------- Comment #1 From Reid Spencer 2004-08-26 15:29:26 -------
Created an attachment (id=168) [details]
Bytecode For Robert's First Example

This bytecode file has an empty compaction table in it.
------- Comment #2 From Reid Spencer 2004-08-26 15:30:22 -------
Created an attachment (id=169) [details]
Bytecode For Robert's Second Example

This also has an empty compaction table in it.
------- Comment #3 From Reid Spencer 2004-08-26 15:32:50 -------
Verified that this is a bug.  The empty compaction table is not being elided.
------- Comment #4 From Reid Spencer 2004-08-26 16:11:36 -------
This is a regression introduced in release 1.3 with the Type != Value change.
The problem is that the compaction table now consists of a Type list followed by
a set of planes of Values. Previously, it had just the planes of Values (because
Types were Values). Because the type list must write a 0 byte to indicate there
are no types, the block is not zero length and thus not automatically elided,
even if there are no planes of Values.

The fix for this isn't straight foward. You don't know that the planes of Values
won't all be omitted until you traverse them all (the compaction table can be
full of empty planes if that makes any sense).

I'll look into this when I have time. It only affects the size of the bytecode
file, not the quality of it.

First Last Prev Next    No search results available