Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Constant folding


Related Topics

  
  Better constants and constant folding - perl6:
There are many ways to use named "constants" in Perl, but they all have drawbacks: runtime initialization costs, the extra overhead of loading another module, the inability to use the constants in certain situations, and so on.
Constants should be first-class citizens in Perl, and should be constant folded with a vengeance by a clever compiler.
An ideal Perl constant can be used anywhere that a Perl variable of the same type can be used: a constant scalar can be used in place of any scalar, a constant array can be used in place of any array, and so on.
dev.perl.org /rfc/113.html   (509 words)

  
  5.4.2 Constant Folding   (Site not responding. Last check: 2007-10-10)
Constant folding is an optimization that replaces a call of constant arguments with the constant result of that call.
Constant folding is done on all standard functions for which it is legal.
Constant folding is also helpful when writing macros or inline functions, since it usually eliminates the need to write a macro that special-cases constant arguments.
www.umiacs.umd.edu /~resnik/ling645_sp2002/cmu_manual/node133.html   (133 words)

  
 CS 434 Lecture Notes -- Constant Folding and Algebraic Transformations   (Site not responding. Last check: 2007-10-10)
One could easily change your code generators to check to see if all the operands to an operator node were constants and in that case perform the operation at compile time.
If the sum of the two constants is too big for the arithmetic type being used, combining the constants might result in an arithmetic overflow while, at run-time, the value of "variable" might have been a negative number big enough to avoid the overflow.
Constant folding that is willing to perform algebraic transformations can be particularly productive in expressions generated to perform address arithmetic and, in this context, "additive constants" are particularly interesting.
www.cs.williams.edu /~tom/courses/434/outlines/lect18_3.html   (883 words)

  
 HX -- Hydrogen Exchange
Since ata was developed as a model system for protein folding at the stage where secondary structures interact and become mutually stabilizing, it is of interest to investigate the increase in stability that occurs with helix association.
The equilibrium constant for folding of ata was estimated from the deltaG as 338 and from hydrogen exchange measurements as 259.
Since folding intermediates, molten globules, and our own peptide model system have protection factors in the range of 200-1000 it does not seem unreasonable that a molten globule-like intermediate could provide sufficient stability to account for the changes in stability factors which we observe.
www.rowland.org /organization/past_research/folding/hx.html   (2147 words)

  
 10.1.3 Local Common Subexpression Elimination   (Site not responding. Last check: 2007-10-10)
Constants are produced, not only by the programmer, but also by the compiler.
The programmer may initialize a variable to be 1, using this as both the loop counter and as an array index.
A related optimization computes constant expressions at compile-time rather than generating code to perform the optimization.
www.cs.wpi.edu /~kal/PLT/PLT10.1.3.html   (126 words)

  
 Constant Folding   (Site not responding. Last check: 2007-10-10)
Constant Folding ---------------- Constant folding is an optimization that replaces a call of constant arguments with the constant result of that call.
(1- limit)...)) Constant folding is also helpful when writing macros or inline functions, since it usually eliminates the need to write a macro that special-cases constant arguments.
Constant folding of a user defined function is enabled by the `extensions:constant-function' proclamation.
www.cis.ksu.edu /VirtualHelp/Info/develop/cmu-user.info.Constant_Folding.html   (144 words)

  
 [No title]   (Site not responding. Last check: 2007-10-10)
Because the optimization techniques are repeated, even complex expressions containing only constants will eventually be reduced to a single value.\par \tab Variables that are assigned a constant value directly (ex., "a = 3") are flagged as "constant" until their next assignment (or until a loop is reached that contains an assignment to a non-constant).
If a variable flagged as "constant" is used in an expression, it is replaced with the constant to which it was assigned.
The "-counts" command line option was invoked to determine the number of arithmetic and branch operations executed by both the optimized and unoptimized versions of the code (these measurements were chosen because of their relevance to constant folding and jump chaining).\par \par \b Results\par \par \b0 Improvements are marked with an asterisk *.
www.cs.uga.edu /~reed/DrC/Optimizer.rtf   (965 words)

  
 CS 509 - Advanced Programming II Programming Assignment 2
Constant folding and compile-time evaluation are two simple but important optimizations frequently used in compilers.
If a variable is known to contain a constant value at compile time, then references to the variable can be replaced by the constant value, which eliminates the need to access the variable at run time.
is known to be a constant in the second statement.
bluehawk.monmouth.edu /rclayton/web-pages/s02-509/pa2.html   (724 words)

  
 Code Optimization Using the GNU C Compiler LG #71
Constant folding is the simplest code optimization to understand.
In the above case constant folding lead to a decrease in run time (since all the computations are done at compile time) and also to a decrease in the space requirements.
It has to keep track of various things like variables, their storage places (memory or registers), expression evaluations, constant expressions, dead code etc. It is because of this high complexity of the process that the compiler takes much longer to compile a program with optimization enabled.
www.linuxgazette.com /issue71/joshi.html   (2868 words)

  
 Programming Assignment 6
For this assignment it is acceptable to implement constant folding only for IR trees.
If the recursive calls return exactly the same subtrees, and no constant folding is possible at the current node, then the node itself can be returned as a result.
If one or both of the recursive calls do some constant folding, or some constant folding is possible on the subtrees, then a new node must be constructed as the result of constant folding.
www.cs.cornell.edu /courses/cs412/2001sp/hw/pa6.html   (1415 words)

  
 dBforums - Where constant folding is allowed/prohibited.
Especially interesting are the cases when we are allowed (or not allowed even if this seems possible) to fold constants and/or constant expressions.
Standard C has the concept of a `constant expression' which is related
(suitably corrected), h, i and j are constant expressions.
www.dbforums.com /t651491.html   (603 words)

  
 Documentation of class 'Parser'   (Site not responding. Last check: 2007-10-10)
Constant folding: The parser has various modes for constant folding; by default, only numeric expressions involving integers and floats are constant folded (i.e.
Constant folding can be turned off completely (setting FoldConstants to nil) to ``secure folding'', which only folds constant numbers (#level1) or to #full.
In full mode, more constant expressions are folded (for example: '1.0 @ 1.0' is reduced to a constant point), but the resulting code may not be compatible with other smalltalk systems (consider the case, where the point is modified using #x: or #y: messages).
www.exept.de:8080 /ClassDoc/classDocOf,Parser   (4006 words)

  
 Research Overview
A highlight was the redesign of the folding pathway of protein G, a small protein containing two beta-hairpins separated by an alpha-helix.
The design of a new globular protein fold and the close correspondence of the crystal structure to the design model have broad implications for protein design and protein-structure prediction and open the door to the exploration of the large regions of the protein universe not yet observed in nature.
The picture of protein folding that motivates our approach to ab initio protein tertiary structure prediction is that sequence-dependent local interactions bias segments of the chain to sample distinct sets of local structures, and that nonlocal interactions select the lowest free-energy tertiary structures from the many conformations compatible with these local biases.
boinc.bakerlab.org /rosetta/rah_research.php   (2184 words)

  
 Architectures and Compilers to Support Reconfigurable Computing
Compilation Techniques Suitable for RC As detailed in [15], to develop an effective RW> compiler it is necessary to understand the state of the art in two research fields: compilers and ECAD (Electronic Computer-Aided Design).
The simple cases occur when there is multiplication or division of an operand by a constant which is a power of two (accomplished by a simple shifting of the non-constant operand).
In the general case, the multiplication by a constant can be transformed into a series of shifts and additions/subtractions (Figure 5).
www.acm.org /crossroads/xrds5-3/rcconcept.html   (4168 words)

  
 5.4.1 Let Optimization   (Site not responding. Last check: 2007-10-10)
Whenever the value of a let variable is a constant, a constant variable or a constant (local or non-notinline) function, the variable is deleted, and references to the variable are replaced with references to the constant expression.
A constant variable is a lexical variable that is never assigned to, always keeping its initial value.
Constant variables with only a single use are also optimized away, even when the initial value is not constant.
www.umiacs.umd.edu /~bonnie/courses/programming/cmu_manual/node132.html   (436 words)

  
 constant
This is usually only applied to built-in numerical and boolean operators whereas partial evaluation is more general in that expressions involving user-defined functions may also be evaluated at compile time.
This requires that the angular velocity of the disk be larger when the reading or writing tracks closer to the axis.
However, as mechanical stability puts an upper limit on the angular velocity (and not the linear velocity) using the same linear velocity throughout, i.e., using less then the maximal angular velocity at outer tracks means that the full potential of the drive is not used.
www.linuxguruz.com /foldoc/foldoc.php?constant   (635 words)

  
 [No title]   (Site not responding. Last check: 2007-10-10)
DOCOMM(): Returns a constant signifying whether the actual communication primitives (send/receive/sync) are to be invoked.
IS_EXPR(expr): Returns a constant signifying whether expr is an expression (meaning there is an operator and a left and right subexpression).
Dim must be an integer constant, and array must be an array or an array reference.
www.cs.cmu.edu /afs/cs.cmu.edu/project/cmcl/link.fx/ccom/extfun.doc   (1375 words)

  
 CodeGuru : Thinking in C++   (Site not responding. Last check: 2007-10-10)
Whenever the compiler must allocate storage, constant folding is prevented (since there’s no way for the compiler to know for sure what the value of that storage is – if it could know that, it wouldn’t need to allocate the storage).
In an array definition, the compiler must be able to generate code that moves the stack pointer to accommodate the array.
Constants were introduced in early versions of C++ while the Standard C specification was still being finished.
kia.etel.ru /lib/thcpp/tic0092.html   (1310 words)

  
 Compiler Optimization Meets Compiler Verification COCV 2003   (Site not responding. Last check: 2007-10-10)
Constant folding is a well-known optimization of compilers which evaluates constant expressions already at compile time.
Constant folding is valid only if the results computed by the compiler are exactly the same as the results which would be computed at run-time by the target machine arithmetic.
Using the order relation in these lattices, we formalize a necessary and sufficient criterion under which constant folding can be done in a residue class arithmetic that is different from the one of the target machine.
sunshine.cs.uni-dortmund.de /~knoop/COCV2003/Abstract/6.html   (176 words)

  
 Alberts Forth lectures. # 5. Optimisation in Forth.
It means that if an operator works on constants the result may be replaced by a constant that is calculated at compile time.
Folding refers to all words that can be replaced by simpler words in case they receive constant data on the stack.
As a rule of thumb constants are moved to the top of the stack, where they fall prey to folding.
home.hccnet.nl /a.w.m.van.der.horst/forthlecture5.html   (2585 words)

  
 [No title]   (Site not responding. Last check: 2007-10-10)
Constant Folding: The first optimization you will implement is constant folding.
The idea is to remove operations where both operands are constants, and replace the temporary result with the precomputed constant.
You need to keep track of which temporaries have been replaced with constants, and what their constant value is. This can be done easily using the STL map.
www.cse.msu.edu /~cse450/Labs/Lab07/lab7.txt   (401 words)

  
 [No title]   (Site not responding. Last check: 2007-10-10)
Write one or more source programs that could be used to determine whether or not a compiler does (a) constant folding, (b) constant propagation.
Choose a compiler of your choice (e.g., gcc), learn how to read the assembly or machine language it generates, and determine whether or not it performs constant folding and/or constant propagation by default and with optimisation on.
Discuss what is involved in (a) retargeting a compiler to produce target code for a new machine and (b) rehosting a compiler to run on a new machine.
www.cit.gu.edu.au /teaching/3136CIT/Tutorials/tute2.txt   (236 words)

  
 Program Optimisation Catalogue - Constant Folding aka Constant Expression Evaluation   (Site not responding. Last check: 2007-10-10)
Constant folding is the replacement of an side-effectless expression whose inputs are all constants with the constant that would result at run-time.
In these cases, the evaluation would instead be replaced with a raised exception, and a warning could be issued to the programmer at compile-time.
Constant folding can lead to better instruction selection.
users.chariot.net.au /~matty/optcat/constant_folding.html   (305 words)

  
 Other System-Related Factors that Affect Application Results   (Site not responding. Last check: 2007-10-10)
Because of this, the parsing of a floating-point constant might change if the exact value of the constant lies extremely close to the halfway point between two representable values.
The zeal with which the compiler pursues opportunities for constant folding may vary from one compiler release to another and may depend on the optimization level and other compiler options.
In any case, if the libraries on the build-time system change, the compiler's constant folding may yield a different result, and the application, regardless of which system it is run on, may also yield a different result.
docs.hp.com /en/B3906-90004/ch03s04.html   (1518 words)

  
 How the folding rate constant of simple, single-domain proteins depends on the number of native contacts -- Makarov et ...
In this article, we present a kinetic model that leads to an expression for the rate constant that is similar in spirit to
The rate constants and the probabilities that the conformers are present are connected by the detailed balance equation
We assume that the folding rate equals the rate of forming the N contacts present in the native state.
www.pnas.org /cgi/content/full/99/6/3535   (3133 words)

  
 [No title]
Calcuate Tm and enthalpy of folding which best fit the data of a two state transition of a monomer from a folded to unfolded state.
Two state transition of a monomer between a folded and unfolded state assumining that there is a change in heat capacity of the folded and unfolded forms.
Calculation of Tm(apparent) and Enthalpy of folding assuming a folded trimer converts to an unfolded monomer in a two-state transition.
www2.umdnj.edu /cdrwjweb/thermody.txt   (843 words)

  
 Monte Carlo Simulations of beta -Hairpin Folding at Constant Temperature -- Sung 76 (1): 164 -- Biophysical Journal
folding is driven mainly by the hydrophobic interaction.
To simulate folding at constant temperature, two approaches have been tested: using a detailed representation of the protein-solvent
Dill, K. Theory for the folding and stability of globular proteins.
www.biophysj.org /cgi/content/full/76/1/164   (5988 words)

  
 Constant Folding   (Site not responding. Last check: 2007-10-10)
Expressions with constant operands can be evaluated at compile time, thus improving run-time performance and reducing code size by avoiding evaluation at compile-time.
All C compilers can fold integer constant expressions that are present after macro expansion (ANSI C requirement).
Most C compilers can fold integer constant expressions that are introduced after other optimizations.
www.nullstone.com /htmls/category/consfold.htm   (160 words)

  
 Programming Assignment 5: Register Allocation
The constant folding optimization replaces expressions that have constant arguments with either their result or a simplified expression.
If the recursive calls return exactly the same sub-trees, and no constant folding is possible at the current node, then the node itself can be returned as a result.
If one or both of the recursive calls do some constant folding, or some constant folding is possible on the sub-trees, then a new node must be constructed as the result of constant folding.
www.cs.cornell.edu /courses/cs412/1999sp/25-pa5.html   (837 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.