summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA
Commit message (Collapse)AuthorAgeFilesLines
* switch over some other methods from indices to iteratorsGabor Greif2009-01-171-8/+8
| | | | llvm-svn: 62430
* speed up iterative loop by using iterators. changes direction, but ↵Gabor Greif2009-01-171-4/+4
| | | | | | | | functionally equivalent if this works out, I'll change the others next. llvm-svn: 62385
* Add the private linkage.Rafael Espindola2009-01-153-5/+5
| | | | llvm-svn: 62279
* minor simplificationGabor Greif2009-01-141-2/+2
| | | | llvm-svn: 62232
* Removed trailing whitespace from Makefiles.Misha Brukman2009-01-091-2/+2
| | | | llvm-svn: 61991
* Check that the function prototypes are correct before assuming that the Nick Lewycky2008-12-271-18/+28
| | | | | | parameters are pointers. llvm-svn: 61451
* reapply Sanjiv's patch to genericize memcpy/memset/memmove to take anChris Lattner2008-11-211-4/+3
| | | | | | arbitrary integer width for the count. llvm-svn: 59823
* Revert r59802. It was breaking the build of llvm-gcc:Bill Wendling2008-11-211-3/+4
| | | | | | | | | | | | | | | | | | | | | g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic' make[3]: *** [llvm-convert.o] Error 1 make[3]: *** Waiting for unfinished jobs.... rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod make[2]: *** [all-stage1-gcc] Error 2 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2 llvm-svn: 59809
* Make mem[cpy,move,set] intrinsics overloaded.Sanjiv Gupta2008-11-211-4/+3
| | | | llvm-svn: 59802
* Teach internalize to preserve the callgraph.Duncan Sands2008-10-031-0/+13
| | | | | | Why? Because it was there! llvm-svn: 56996
* Factorize code: remove variants of "strip offDuncan Sands2008-10-011-27/+4
| | | | | | | | | | | pointer bitcasts and GEP's", and centralize the logic in Value::getUnderlyingObject. The difference with stripPointerCasts is that stripPointerCasts only strips GEPs if all indices are zero, while getUnderlyingObject strips GEPs no matter what the indices are. llvm-svn: 56922
* Rationalize the names of passes that print information:Duncan Sands2008-09-231-1/+1
| | | | | | | | | | | | | | | | | -callgraph => print-callgraph -callscc => print-callgraph-sccs -cfgscc => print-cfg-sccs -externalfnconstants => print-externalfnconstants -print => print-function -print-alias-sets (no change) -print-callgraph => dot-callgraph -print-cfg => dot-cfg -print-cfg-only => dot-cfg-only -print-dom-info (no change) -printm => print-module -printusedtypes => print-used-types llvm-svn: 56487
* Initial support for the CMake build system.Oscar Fuentes2008-09-221-0/+7
| | | | llvm-svn: 56419
* Fix PR2792: treat volatile loads as writing memory somewhere.Duncan Sands2008-09-131-3/+11
| | | | | | Treat stores as reading memory, just to play safe. llvm-svn: 56188
* Rather than marking all internal globals "Ref"Duncan Sands2008-09-121-17/+11
| | | | | | | | | | | | | | | | when a readonly declaration is called, set a flag. This is faster and uses less memory. In theory it is less accurate, because before only those internal globals that were read by someone were being marked "Ref", but now all are. But in practice, thanks to other passes, all internal globals of the kind considered here will be both read and stored to: those only read will have been turned into constants, and those only stored to will have been deleted. llvm-svn: 56143
* Intrinsics don't touch internal global variablesDuncan Sands2008-09-111-2/+4
| | | | | | | (unless passed one via a parameter), even if they are IntrWriteMem. llvm-svn: 56115
* Intrinsics don't read these kinds of globalDuncan Sands2008-09-111-5/+7
| | | | | | variables. llvm-svn: 56105
* Simplify this some more. No functionality change.Duncan Sands2008-09-091-15/+8
| | | | llvm-svn: 56003
* Optimization suggested by Matthijs Kooijman.Duncan Sands2008-09-091-1/+2
| | | | llvm-svn: 55988
* Correct callgraph construction. It has two problems:Duncan Sands2008-09-091-34/+14
| | | | | | | | | | | | | | | | | | | (1) code left over from the days of ConstantPointerRef: if a use of a function is a GlobalValue then that is not considered a reason to add an edge from the external node, even though the use may be as an initializer for an externally visible global! There might be some point to this behaviour when the use is by an alias (though the code predated aliases by some centuries), but I think PR2782 is a better way of handling that. (2) If function F calls function G, and also G is a parameter to the call, then an F->G edge is not added to the callgraph. While this doesn't seem to matter much, adding such an edge makes the callgraph more regular. In addition, the new code should be faster as well as simpler. llvm-svn: 55987
* Didn't mean to commit this change to how theDuncan Sands2008-09-081-8/+4
| | | | | | callgraph is printed. llvm-svn: 55912
* Reapply 55859. This doesn't change anything asDuncan Sands2008-09-081-14/+8
| | | | | | | long as the callgraph is correct. It checks for wrong callgraphs more strictly. llvm-svn: 55894
* When PruneEH turned an invoke into an ordinaryDuncan Sands2008-09-061-1/+14
| | | | | | | | | | | | 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-0/+10
| | | | | | commit. llvm-svn: 55865
* Delete the removeCallEdgeTo callgraph method,Duncan Sands2008-09-051-10/+0
| | | | | | | | | | | | | | | 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
* Neaten this up a bit. No functionality change.Duncan Sands2008-09-041-15/+14
| | | | llvm-svn: 55789
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-044-4/+4
| | | | llvm-svn: 55779
* If a SCC has a node without a function, then the SCCDuncan Sands2008-09-031-9/+14
| | | | | | | | | | analysis would bail out without removing function records for other members of the SCC (which may exist if those functions read or wrote global variables). Since these are initialized to "readnone", this resulted in incorrect alias analysis results. llvm-svn: 55714
* Fix maxo bado thinko.Duncan Sands2008-09-031-1/+1
| | | | llvm-svn: 55700
* Since onlyReadsMemory returns true if in factDuncan Sands2008-09-031-2/+4
| | | | | | | | doesNotAccessMemory, check doesNotAccessMemory first, since otherwise functions may be marked readonly rather than readnone. llvm-svn: 55697
* Cleanup GlobalsModRef a bit. When analysing theDuncan Sands2008-09-031-104/+108
| | | | | | | | | | | callgraph, when one member of a SCC calls another then the analysis would drop to mod-ref because there is (usually) no function info for the callee yet; fix this. Teach the analysis about function attributes, in particular the readonly attribute (which requires being careful about globals). llvm-svn: 55696
* Don't use the result of WriteAsOperand or WriteTypeSymbolic.Chris Lattner2008-08-191-3/+6
| | | | llvm-svn: 54977
* Don't call getAnalysisUsage unless -debug-pass is enabled. This speedsChris Lattner2008-08-081-4/+2
| | | | | | up the passmgr by avoiding useless work. llvm-svn: 54528
* Replace two manual loops with calls to CallSite::hasArguments (no functional ↵Matthijs Kooijman2008-06-041-3/+1
| | | | | | changes). llvm-svn: 51947
* Fix some constructs that gcc-4.4 warns about.Duncan Sands2008-05-271-1/+2
| | | | llvm-svn: 51591
* Use isSingleValueType instead of isFirstClassType toDan Gohman2008-05-221-1/+1
| | | | | | exclude struct and array types. llvm-svn: 51452
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-134-25/+28
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman2008-05-061-3/+0
| | | | llvm-svn: 50695
* Add assert.Devang Patel2008-05-021-0/+1
| | | | llvm-svn: 50596
* add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.Chris Lattner2008-04-131-0/+14
| | | | llvm-svn: 49617
* Fix PR 2169.Daniel Berlin2008-04-071-0/+3
| | | | llvm-svn: 49339
* Don't include <map> in Pass.h, which doesn't need it. This requiresDan Gohman2008-03-211-0/+1
| | | | | | adding <map> to many files that actually do need it. llvm-svn: 48667
* enable -analyze for andersensAndrew Lenharth2008-03-201-19/+39
| | | | llvm-svn: 48601
* Restore isCFGOnly property of various analysis passes.Devang Patel2008-03-203-3/+3
| | | | llvm-svn: 48579
* PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel2008-03-194-6/+8
| | | | llvm-svn: 48554
* Do not use virtual function to identify an analysis pass.Devang Patel2008-03-192-8/+2
| | | | llvm-svn: 48520
* Fix PR 2160 by making sure arguments to external functions get marked as ↵Daniel Berlin2008-03-181-18/+36
| | | | | | pointing to anything llvm-svn: 48509
* Dial down gcc's warnings: don't use 0UL when 0U suffices (and when theScott Michel2008-03-181-4/+4
| | | | | | variables and methods themselves only use unsigned.) llvm-svn: 48492
* Identify Analysis pass.Devang Patel2008-03-182-0/+6
| | | | | | | Do not run analysis pass again if analysis info is still available. This fixes PR1441. llvm-svn: 48476
* Add Hybrid Cycle Detection to Andersen's analysis.Daniel Berlin2008-03-051-32/+272
| | | | | | Patch by Curtis Dunham. llvm-svn: 47959
OpenPOWER on IntegriCloud