From: Dirk Mueller Date: Wed, 1 Oct 2003 10:19:08 +0000 (+0000) Subject: speed optimisation: assuming that a tempreg not related to %esp before X-Git-Tag: svn/VALGRIND_2_1_0~155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=959360f151f69a2d86c0e549f9e69f2f9148bc64;p=thirdparty%2Fvalgrind.git speed optimisation: assuming that a tempreg not related to %esp before is PUTed into %ESP, we do *know* that this tempreg points to %ESP afterwards, so track it. reduces the amount of expensive "DO_GENERIC" calls by 75% in Khtml. I've not observed a problem with it, but consider it experimental. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1878 --- diff --git a/coregrind/vg_translate.c b/coregrind/vg_translate.c index 390f436e74..cf6c9db074 100644 --- a/coregrind/vg_translate.c +++ b/coregrind/vg_translate.c @@ -1855,6 +1855,9 @@ UCodeBlock* vg_ESP_update_pass(UCodeBlock* cb_in) } else { /* Unknown delta */ DO_GENERIC; + /* now we know the temp that points to %ESP */ + if ( t_ESP == INVALID_TEMPREG ) + t_ESP = u->val1; } delta = 0;