Bug 111535

Summary: Troubles with libxml2-2.6.2 regression tests
Product: Red Hat Enterprise Linux 3 Reporter: Daniel Veillard <veillard>
Component: gccAssignee: Diego Novillo <dnovillo>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-06 10:15:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Veillard 2003-12-04 22:45:43 UTC
gcc-ssa-3.5ssa-0.20031202.105

This is actually on RH9, I intalled the RPMs from
  http://people.redhat.com/dnovillo/pub/tree-ssa-snapshot/RPMS/
the gcc-ssa component is not listed on FC
                                                                     
          
I tried the new compiler on libxml2 CVs checkout, this should
be reproductable with libxml2-2.6.2 (ftp://xmlsoft.org/) and
earlier versions. The compiled code seems fine except for the
XPath regression tests:
make tests ...
...
## URI module regression tests
## XPath regression tests
floats result
48c48 < Object is a number : -Infinity --- > Object is a number :
Infinity 76c76 < Object is a Boolean : false --- > Object is a Boolean
: true 80c80 < Object is a Boolean : true --- > Object is a Boolean :
false 168c168 < Object is a number : -Infinity --- > Object is a
number : Infinity 180c180 < Object is a number : -Infinity --- >
Object is a number : Infinity 184c184 < Object is a number : -Infinity
--- > Object is a number : Infinity 196c196 < Object is a number :
-Infinity --- > Object is a number : Infinity 200c200 < Object is a
number : -Infinity --- > Object is a number : Infinity
functions result
32c32 < Object is a number : 0 --- > Object is a number : -0 52c52 <
Object is a number : 0 --- > Object is a number : -0 56c56 < Object is
a number : 0 --- > Object is a number : -0 88c88 < Object is a number
: 0 --- > Object is a number : -0
## XPointer regression tests
## XInclude regression tests
....
                                                                     
          
  It seems that somewhat the evaluation on double leads to a
+0 / -0 mismatch more precisely:
                                                                     
          
paphio:~/XML -> ./testXPath --expr -f test/XPath/expr/floats > res
paphio:~/XML -> diff -c result/XPath/expr/floats res
*** result/XPath/expr/floats    2002-07-06 21:50:39.000000000 +0200
--- res 2003-12-04 14:06:28.000000000 +0100
***************
*** 45,51 ****
                                                                     
          
  ========================
  Expression: 1 div -0
! Object is a number : -Infinity
                                                                     
          
  ========================
  Expression: (1 div 0) > 0
--- 45,51 ----
                                                                     
          
  ========================
  Expression: 1 div -0
! Object is a number : Infinity
                                                                     
          
  ========================
  Expression: (1 div 0) > 0
***************
*** 73,83 ****
                                                                     
          
  ========================
  Expression: (1 div -0) > 0
! Object is a Boolean : false
                                                                     
          
  ========================
  Expression: (1 div -0) < 0
! Object is a Boolean : true
                                                                     
          
  ========================
  Expression: 0 div 0 = 0 div 0
--- 73,83 ----
                                                                     
          
  ========================
  Expression: (1 div -0) > 0
! Object is a Boolean : true
                                                                     
          
  ========================
  Expression: (1 div -0) < 0
! Object is a Boolean : false
                                                                     
          
  ========================
  Expression: 0 div 0 = 0 div 0
***************
*** 165,171 ****
                                                                     
          
  ========================
  Expression: 1 div floor(-0)
! Object is a number : -Infinity
                                                                     
          
  ========================
  Expression: 1 div floor(0)
--- 165,171 ----
                                                                     
          
  ========================
  Expression: 1 div floor(-0)
! Object is a number : Infinity
                                                                     
          
  ========================
  Expression: 1 div floor(0)
***************
*** 177,187 ****
                                                                     
          
  ========================
  Expression: 1 div ceiling(-0.1)
! Object is a number : -Infinity
                                                                     
          
  ========================
  Expression: 1 div ceiling(-0)
! Object is a number : -Infinity
                                                                     
          
  ========================
  Expression: 1 div ceiling(0)
--- 177,187 ----
                                                                     
          
  ========================
  Expression: 1 div ceiling(-0.1)
! Object is a number : Infinity
                                                                     
          
  ========================
  Expression: 1 div ceiling(-0)
! Object is a number : Infinity
                                                                     
          
  ========================
  Expression: 1 div ceiling(0)
***************
*** 193,203 ****
                                                                     
          
  ========================
  Expression: 1 div round(-0.1)
! Object is a number : -Infinity
                                                                     
          
  ========================
  Expression: 1 div round(-0)
! Object is a number : -Infinity
                                                                     
          
  ========================
  Expression: 1 div round(0)
--- 193,203 ----
                                                                     
          
  ========================
  Expression: 1 div round(-0.1)
! Object is a number : Infinity
                                                                     
          
  ========================
  Expression: 1 div round(-0)
! Object is a number : Infinity
                                                                     
          
  ========================
  Expression: 1 div round(0)
paphio:~/XML ->
                                                                     
          
  they look like problems for x div 0 in general.
                                                                     
          
W.r.t. the code genrerated, it is slightly smaller:
                                                                     
          
paphio:~/XML -> size xmllint.orig xmllint.ssa
   text    data     bss     dec     hex filename
 660856   25216   53076  739148   b474c xmllint.orig
 655677   24656   53876  734209   b3401 xmllint.ssa
paphio:~/XML -> rpm -q gcc-ssa
gcc-ssa-3.5ssa-0.20031202.105
                                                                     
          
On the other hand performances are worse currently than
for the existing compiler, but it really depends what kind
of code is being run (selecting the best out of 3 runs for each):
                                                                     
          
paphio:~/XML -> time ./xmllint.orig --stream db100000.xml
                                                                     
          
real    0m1.280s
user    0m1.230s
sys     0m0.010s
paphio:~/XML -> time ./xmllint.ssa --stream db100000.xml
                                                                     
          
real    0m1.458s
user    0m1.390s
sys     0m0.030s
paphio:~/XML ->  ./xmllint.orig --timing --valid --noout --repeat
test/valid/REC-xml-19980210.xml
100 iterations took 2118 ms
paphio:~/XML ->  ./xmllint.ssa --timing --valid --noout --repeat
test/valid/REC-xml-19980210.xml
100 iterations took 2133 ms
paphio:~/XML ->
                                                                     
          
  I hope this helps,
                                                                     
          
Daniel

Comment 1 Diego Novillo 2004-04-05 19:55:53 UTC
Daniel,

Could you try the tests again with a more recent snapshot?  GCC-SSA
has been pulled out of Fedora Core, but I keep a yum repository with
daily snapshots.

[gcc-ssa]
name=GCC-SSA Daily Snapshots
baseurl=http://people.redhat.com/dnovillo/pub/tree-ssa/snapshot


Thanks.  Diego.

Comment 2 Daniel Veillard 2004-04-06 10:15:09 UTC
Okido, current version passes libxml2 and libxslt regressions tests
without troubles, tested on FC2t2 (rawhide actually).
I also checked quickly the performances when compiling with -O2:

 gcc version 3.3.3 20040311:

localhost:~/XML -> make Timingtests VTimingtests
## Timing tests to try to detect performance
## as well a memory usage breakage when streaming
## 1/ using the file interface
## 2/ using the memory interface
## 3/ repeated DOM parsing
## 4/ repeated DOM validation
Parsing took 1033 ms
Parsing took 998 ms
100 iterations took 2053 ms
100 iterations took 4348 ms
localhost:~/XML -> 

  gcc version 3.5-tree-ssa 20040405

localhost:~/XML -> make Timingtests VTimingtests
## Timing tests to try to detect performance
## as well a memory usage breakage when streaming
## 1/ using the file interface
## 2/ using the memory interface
## 3/ repeated DOM parsing
## 4/ repeated DOM validation
Parsing took 972 ms
Parsing took 949 ms
100 iterations took 2018 ms
100 iterations took 4334 ms
localhost:~/XML ->

  So the SSA branch is also generating faster code, congratulation !
(but compiling with -O2 is quite slower ...)

Daniel

Comment 3 Diego Novillo 2004-04-12 22:02:33 UTC
Good news.  Thanks.  The compile time problems are known and something
we are addressing now.  The SSA bits add about 45-50 optimizer passes
and we still haven't removed many of the old GCC passes that we are
replacing.

Compile times should improve over time.