summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
Commit message (Collapse)AuthorAgeFilesLines
* dont specialize weak functions and the likeNuno Lopes2008-10-081-1/+1
| | | | llvm-svn: 57305
* 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
* Clean up some multiple-return-value code that is no longerDan Gohman2008-10-031-5/+1
| | | | | | applicable. llvm-svn: 57033
* Teach internalize to preserve the callgraph.Duncan Sands2008-10-031-0/+7
| | | | | | Why? Because it was there! llvm-svn: 56996
* revert the addition of Preverves(CallGraph), per Duncan's commentsNuno Lopes2008-10-011-2/+0
| | | | llvm-svn: 56917
* add preserversCFG() + preservers(CallGraph)Nuno Lopes2008-09-301-0/+6
| | | | llvm-svn: 56887
* 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-292-4/+16
| | | | | | | huge simply connected components. Suggested by Chris. llvm-svn: 56787
* remove redundant test (mayBeOverriden() includes hasLinkOnceLinkage)Nuno Lopes2008-09-291-1/+1
| | | | llvm-svn: 56786
* Tweak some comments.Duncan Sands2008-09-291-4/+6
| | | | llvm-svn: 56784
* Rename isWeakForLinker to mayBeOverridden. Use itDuncan Sands2008-09-293-3/+3
| | | | | | | instead of hasWeakLinkage in a bunch of optimization passes. llvm-svn: 56782
* Implement function notes as function attributes. Devang Patel2008-09-263-3/+4
| | | | llvm-svn: 56716
* Now Attributes are divided in three groupsDevang Patel2008-09-265-19/+44
| | | | | | | | | | | | | - 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-2510-90/+90
| | | | | | | | | | | | | | | 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
* s/ParamAttrsWithIndex/FnAttributeWithIndex/gDevang Patel2008-09-243-19/+19
| | | | llvm-svn: 56535
* Put FN_NOTE_AlwaysInline and others in FnAttr namespace.Devang Patel2008-09-243-3/+3
| | | | llvm-svn: 56527
* Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.Devang Patel2008-09-233-3/+3
| | | | | | Do not check isDeclaration() in hasNote(). It is clients' responsibility. llvm-svn: 56524
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-234-15/+15
| | | | llvm-svn: 56513
* Use parameter attribute store (soon to be renamed) forDevang Patel2008-09-233-3/+3
| | | | | | Function Notes also. Function notes are stored at index ~0. llvm-svn: 56511
* Add hasNote() to check note associated with a function.Devang Patel2008-09-223-3/+3
| | | | llvm-svn: 56477
* Initial support for the CMake build system.Oscar Fuentes2008-09-221-0/+24
| | | | llvm-svn: 56419
* 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
* Make safer variant of alias resolution routine to be defaultAnton Korobeynikov2008-09-091-2/+1
| | | | llvm-svn: 56005
* Resolve aliases, when possibleAnton Korobeynikov2008-09-091-0/+22
| | | | llvm-svn: 56001
* Update the callgraph correctly.Duncan Sands2008-09-081-1/+4
| | | | llvm-svn: 55896
* Update the callgraph correctly in ArgumentPromotion.Duncan Sands2008-09-081-0/+7
| | | | llvm-svn: 55895
* Reapply 55859. This doesn't change anything asDuncan Sands2008-09-081-7/+4
| | | | | | | long as the callgraph is correct. It checks for wrong callgraphs more strictly. llvm-svn: 55894
* Correct a comment and strip trailing whitespace.Duncan Sands2008-09-071-25/+25
| | | | llvm-svn: 55883
* fix crash when the malloc/free function is defined or is a declaration with ↵Nuno Lopes2008-09-061-4/+2
| | | | | | | | 0 parameters. this pass doesnt seem to be used, but still it's now a little more correct llvm-svn: 55873
* When PruneEH turned an invoke into an ordinaryDuncan Sands2008-09-061-0/+6
| | | | | | | | | | | | call (thus changing the call site) it didn't inform the callgraph about this. But the call site does matter - as shown by the testcase, the callgraph become invalid after the inliner ran (with an edge between two functions simply missing), resulting in wrong deductions by GlobalsModRef. llvm-svn: 55872
* Revert r55859. This is breaking the build in the abscence of its companion ↵Owen Anderson2008-09-051-4/+7
| | | | | | commit. llvm-svn: 55865
* Delete the removeCallEdgeTo callgraph method,Duncan Sands2008-09-051-7/+4
| | | | | | | | | | | | | | | because it does not maintain a correct list of callsites. I discovered (see following commit) that the inliner will create a wrong callgraph if it is fed a callgraph with correct edges but incorrect callsites. These were created by Prune-EH, and while it wasn't done via removeCallEdgeTo, it could have been done via removeCallEdgeTo, which is an accident waiting to happen. Use removeCallEdgeFor instead. llvm-svn: 55859
* Use removeAllCalledFunctions rather than removingDuncan Sands2008-09-051-5/+3
| | | | | | edges one by one by hand. llvm-svn: 55836
* Make this pass return that it made a change ifDuncan Sands2008-09-051-1/+5
| | | | | | it modifies a functions attributes. llvm-svn: 55831
* try to seperate the mechanism into something others can useAndrew Lenharth2008-09-041-20/+70
| | | | llvm-svn: 55785
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-0419-25/+25
| | | | llvm-svn: 55779
* cleanup as per Duncan's reviewAndrew Lenharth2008-09-041-33/+42
| | | | llvm-svn: 55766
* Update inline threshold for current function if the notes say, optimize for ↵Devang Patel2008-09-031-2/+9
| | | | | | size. llvm-svn: 55745
* Initial version of a Partial Specialization IPO pass. It triggers a couple ↵Andrew Lenharth2008-09-031-0/+127
| | | | | | hundred times on 176.gcc. I don't know the performance impact yet, the heuristic is quite simple still. llvm-svn: 55734
* Fix typo in a comment.Devang Patel2008-09-031-1/+1
| | | | llvm-svn: 55720
* Add parentheses to make code more readable.Devang Patel2008-09-031-1/+1
| | | | llvm-svn: 55717
* Fix comments.Devang Patel2008-09-031-2/+3
| | | | llvm-svn: 55716
* Add custom inliner that handles only functions that are marked as always_inline.Devang Patel2008-09-031-0/+70
| | | | llvm-svn: 55713
* Handle "always inline" note during inline cost analysis.Devang Patel2008-09-031-6/+1
| | | | llvm-svn: 55712
* Check noinline note and ignore other notes.Devang Patel2008-09-031-1/+1
| | | | llvm-svn: 55711
* Handle "noinline" note inside the simple inliner.Devang Patel2008-09-032-4/+7
| | | | llvm-svn: 55708
* s/FP_AlwaysInline/FN_NOTE_AlwaysInline/gDevang Patel2008-09-021-2/+2
| | | | llvm-svn: 55676
* respect inline=never and inline=always notes.Devang Patel2008-09-021-1/+8
| | | | llvm-svn: 55673
* Use empty() instead of begin() == end().Dan Gohman2008-08-141-1/+1
| | | | llvm-svn: 54780
OpenPOWER on IntegriCloud