Re: detecting constants at runtime

"Gene" <>
21 Nov 2005 22:43:59 -0500

          From comp.compilers

Related articles
detecting constants at runtime ( (2005-11-19)
Re: detecting constants at runtime (Gene) (2005-11-21)
Re: detecting constants at runtime (Gene) (2005-11-21)
| List of all articles for this month |

From: "Gene" <>
Newsgroups: comp.compilers
Date: 21 Nov 2005 22:43:59 -0500
References: 05-11-090
Keywords: optimize
Posted-Date: 21 Nov 2005 22:43:59 EST

Certainly you can translate assembly instructions to basic blocks of
tuples and do constant detection and folding with the same algorithms
a compiler would use. You'll only detect new constants if your
constant folding algorithm is better than the original compiler's.

I believe profiling is irrelevant for constant detection because
determining in all cases whether a quantity is constant at run time is
an undecidable problem. The best you can do is "estimate" what's
constant from static program structure.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.