From 959360f151f69a2d86c0e549f9e69f2f9148bc64 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 1 Oct 2003 10:19:08 +0000 Subject: [PATCH] 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 --- coregrind/vg_translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coregrind/vg_translate.c b/coregrind/vg_translate.c index 390f436e7..cf6c9db07 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;