llvm.org GIT mirror llvm / 1ace67c
A couple minor fixes suggested by Matthijs Kooijman git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49729 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all

The final line above actually creates the function that the prototype will

328328 correspond to. This indicates the type, linkage and name to use, as well as which
329 module to insert into. "external linkage"
329 module to insert into. "external linkage"
330330 means that the function may be defined outside the current module and/or that it
331331 is callable by functions outside the module. The Name passed in is the name the
332332 user specified: since "TheModule" is specified, this name is registered

In this case, the LHS and RHS of the multiplication are the same value. We'd

124124 really like to see this generate "tmp = x+3; result = tmp*tmp;" instead
125 of computing "x*3" twice.

125 of computing "x+3" twice.


Unfortunately, no amount of local analysis will be able to detect and correct

128128 this. This requires two transformations: reassociation of expressions (to