summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/AddReadAttrs.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename AddReadAttrs to FunctionAttrs, and teach it howDuncan Sands2008-12-311-166/+0
| | | | | | | | to work out (in a very simplistic way) which function arguments (pointer arguments only) are only dereferenced and so do not escape. Mark such arguments 'nocapture'. llvm-svn: 61525
* Experiments show that looking through phi nodesDuncan Sands2008-12-291-0/+2
| | | | | | | | | | and select instructions doesn't buy anything here except extra complexity: the only difference in the entire testsuite was that a readonly function became readnone in MiBench/consumer-typeset. Add a comment about this. llvm-svn: 61478
* Allow readnone functions to read (and write!) globalDuncan Sands2008-12-291-4/+19
| | | | | | | | | | | | | | | | constants, since doing so is irrelevant for aliasing purposes. While this doesn't increase the total number of functions marked readonly or readnone in MultiSource/ Applications (3089), it does result in 12 functions being marked readnone rather than readonly. Before: readnone: 820 readonly: 2269 After: readnone: 832 readonly: 2257 llvm-svn: 61469
* Ignore loads from and stores to local memory (i.e. allocas)Duncan Sands2008-10-041-9/+26
| | | | | | | | when deciding whether to mark a function readnone/readonly. Since the pass is currently run before SROA, this may be quite helpful. Requested by Chris on IRC. llvm-svn: 57050
* add AU.setPreservesCFG() since this pass only adds and removes function ↵Nuno Lopes2008-09-301-0/+5
| | | | | | attributes llvm-svn: 56868
* Speed up these passes when the callgraph hasDuncan Sands2008-09-291-3/+8
| | | | | | | huge simply connected components. Suggested by Chris. llvm-svn: 56787
* Tweak some comments.Duncan Sands2008-09-291-4/+6
| | | | llvm-svn: 56784
* Rename isWeakForLinker to mayBeOverridden. Use itDuncan Sands2008-09-291-1/+1
| | | | | | | instead of hasWeakLinkage in a bunch of optimization passes. llvm-svn: 56782
* Now Attributes are divided in three groupsDevang Patel2008-09-261-2/+2
| | | | | | | | | | | | | - return attributes - inreg, zext and sext - parameter attributes - function attributes - nounwind, readonly, readnone, noreturn Return attributes use 0 as the index. Function attributes use ~0U as the index. This patch requires corresponding changes in llvm-gcc and clang. llvm-svn: 56704
* Large mechanical patch.Devang Patel2008-09-251-2/+2
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* Implement review feedback from Devang: make useDuncan Sands2008-09-201-26/+11
| | | | | | of mayReadFromMemory and mayWriteToMemory. llvm-svn: 56387
* Add a new pass AddReadAttrs which works out which functionsDuncan Sands2008-09-191-0/+135
can get the readnone/readonly attributes, and gives them it. The plan is to remove markmodref (which did the same thing by querying GlobalsModRef) and delete the analogous functionality from GlobalsModRef. llvm-svn: 56341
OpenPOWER on IntegriCloud