This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Improve Jump Threading 3 of N


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Found by inspection while working on another threading patch.


DOM tracks equivalences in a stack so that it can restore the state of
the known equivalences as it completes processing a block in the
dominator tree.

The threading code also utilizes this stack so that it can temporarily
record equivalences as it threads through the cfg successors of leafs in
the dominator tree.

The threading code removes the equivalences it records through the
remove_temporary_equivalences call.  However, in the case where we
successfully thread through a block, we end up calling
remove_temporary_equivalences twice from the threading code.  This
results in removing too many equivalences and ultimately missed
optimizations.

Ultimately it's a missing return statement.  This has gone unnoticed
since I introduced the problem in gcc-4.2; of course the only symptom of
this problem is missed optimizations.

Bootstrapped, regression tested on x86_64-unknown-linux-gnu.  Installed
as obvious.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNu4Y3AAoJEBRtltQi2kC7XKQIAJrS/agWlbPkKaUoA6I9wZmA
WSI/k8UrLhnm9QPgAGislM7j+Z3v8kURnIx1zvA/aCrO2eDAOGUhqi16q8x9n4O8
pExfhRoDRgaZhBPofC8cQ4ruW2PSGgKOUkVzsHHX8sA2Sr8lC8yVnHeBc0kxBPva
m9ygcf5Cm/1egXoEhG1m1Egwvu1dv83XUP0JhZJs80GQkCdHO4dWQxowGnTwtJh1
/yP2nYOEwbUblPr/FvD9kAheOFeU4+qktGi7NAhXL39Q9wVb//ma3aW5g2tAfvsa
+Yc6w3vRKmXH0NfVfiCPk9QPSNf4tcl7hEa5+4z9aQwgez1u6cqPZpavlDLP9Gc=
=85sA
-----END PGP SIGNATURE-----

Attachment: patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]