summaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA
Commit message (Collapse)AuthorAge
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146409 91177308-0d34-0410-b5e6-96231b3b80d8
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145420 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143634 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify; no intended functional change.Eli Friedman2011-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142567 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r138695. Fix PassManager stack depths.Andrew Trick2011-08-29
| | | | | | | Patch by Xiaoyi Guo! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138737 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting r138695 to see if it fixes clang self host.Andrew Trick2011-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138701 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PassManager stack depths.Andrew Trick2011-08-27
| | | | | | | Patch by Xiaoyi Guo! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138695 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a bunch (but not all) "variable written but not read" warningsDuncan Sands2011-08-12
| | | | | | | when building with assertions disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137460 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136433 91177308-0d34-0410-b5e6-96231b3b80d8
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* stop using WriteTypeSymbolic.Chris Lattner2011-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134833 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the CallGraph to ignore calls to intrinsics.John McCall2011-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132797 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a source of non determinism in FindUsedTypes, use a SetVector instead of aJulien Lerouge2011-05-13
| | | | | | | | | set. rdar://9423996 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131283 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-15
| | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new addEscapingValue callback to update GlobalsModRef when GVN adds ↵Owen Anderson2011-01-03
| | | | | | | | | PHIs of GEPs. For the moment, have GlobalsModRef handle this conservatively by simply removing the value from its maps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122787 91177308-0d34-0410-b5e6-96231b3b80d8
* Add spliceFunction to the CallGraph interface. This allows users to efficientlyNick Lewycky2011-01-03
| | | | | | | | | | | update a callGraph when performing the common operation of splicing the body to a new function and updating all callers (such as via RAUW). No users yet, though this is intended for DeadArgumentElimination as part of PR8887. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122728 91177308-0d34-0410-b5e6-96231b3b80d8
* Move Value::getUnderlyingObject to be a standaloneDan Gohman2010-12-15
| | | | | | | | function so that it can live in Analysis instead of VMCore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121885 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ModRefBehavior a lattice. Use this to clean up AliasAnalysisDan Gohman2010-11-10
| | | | | | | chaining and simplify FunctionAttrs' GetModRefBehavior logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118660 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-19
| | | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
* Analysis groups need to initialize their default implementations.Owen Anderson2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116441 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-12
| | | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116334 91177308-0d34-0410-b5e6-96231b3b80d8
* Now with fewer extraneous semicolons!Owen Anderson2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an implementation of the initialization routine for IPA.Owen Anderson2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115947 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initialization routines for Analysis and IPA.Owen Anderson2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115946 91177308-0d34-0410-b5e6-96231b3b80d8
* Hide analysis group registration behind a macro, just like pass registration.Owen Anderson2010-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115835 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the experimental AliasAnalysis::getDependency interface, whichDan Gohman2010-09-14
| | | | | | | | | | | | isn't a good level of abstraction for memdep. Instead, generalize AliasAnalysis::alias and related interfaces with a new Location class for describing a memory location. For now, this is the same Pointer and Size as before, plus an additional field for a TBAA tag. Also, introduce a fixed MD_tbaa metadata tag kind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113858 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-13
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
* dead method.Chris Lattner2010-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113077 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-23
| | | | | | passes over to the new registration API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111815 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111199; it breaks -debug-pass=Structure output.Dan Gohman2010-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111500 91177308-0d34-0410-b5e6-96231b3b80d8
* Make dumpPassStructure be a PMDataManager abstraction, rather thanDan Gohman2010-08-16
| | | | | | | | | | | a Pass abstraction, since that's the level it's actually used at. Rename Pass' dumpPassStructure to dumpPass. This eliminates an awkward use of getAsPass() to convert a PMDataManager* into a Pass* just to permit a dumpPassStructure call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111199 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove PointerAccessInfo, which nothing was using.Dan Gohman2010-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110167 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread const correctness through a bunch of AliasAnalysis interfaces andDan Gohman2010-08-03
| | | | | | | | | | | | | eliminate several const_casts. Make CallSite implicitly convertible to ImmutableCallSite. Rename the getModRefBehavior for intrinsic IDs to getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite, which happens to be implicitly convertible to bool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110155 91177308-0d34-0410-b5e6-96231b3b80d8
* use Value* constructor of CallSite to create potentially improper site, and ↵Gabor Greif2010-07-28
| | | | | | test that git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109580 91177308-0d34-0410-b5e6-96231b3b80d8
* use Value* constructor of CallSite to create potentially improper siteGabor Greif2010-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109579 91177308-0d34-0410-b5e6-96231b3b80d8
* Add INSTANTIATE_AG_PASS, which combines RegisterPass<> with ↵Owen Anderson2010-07-21
| | | | | | RegisterAnalysisGroup<> for pass registration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109058 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-20
| | | | | | | | | working again. I don't see why this patch would cause them to fail the way they are, but none of the other intervening patches seem likely either. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108818 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r108794, a fix for the failing test from last time.Owen Anderson2010-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108813 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-20
| | | | | | | superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate PassInfo into two classes: a constructor-free superclass ↵Owen Anderson2010-07-20
| | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8
* cache result of operator*Gabor Greif2010-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107982 91177308-0d34-0410-b5e6-96231b3b80d8
* cache result of operator*Gabor Greif2010-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107978 91177308-0d34-0410-b5e6-96231b3b80d8
* do not repeatedly dereference use_iteratorGabor Greif2010-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107963 91177308-0d34-0410-b5e6-96231b3b80d8
* Create new accessors to get arguments for call/invoke instructions. It breaksBill Wendling2010-06-07
| | | | | | | | | encapsulation to force the users of these classes to know about the internal data structure of the Operands structure. It also can lead to errors, like in the MSIL writer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105539 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR5009 by making CGSCCPM realize that a call was devirtualizedChris Lattner2010-05-01
| | | | | | | | if an indirect call site was removed and a direct one was added, not just if an indirect call site was modified to be direct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102830 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement rdar://6295824 and PR6724 with two tiny changesChris Lattner2010-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that can have a big effect :). The first is to enable the iterative SCC passmanager juice that kicks in when the scc passmgr detects that a function pass has devirtualized a call. In this case, it will rerun all the passes it manages on the SCC, up to the iteration count limit (4). This is useful because a function pass may devirualize a call, and we want the inliner to inline it, or pruneeh to infer stuff about it, etc. The second patch is to add *all* call sites to the DevirtualizedCalls list the inliner uses. This list is about to get renamed, but the jist of this is that the inliner now reconsiders *all* inlined call sites as candidates for further inlining. The intuition is this that in cases like this: f() { g(1); } g(int x) { h(x); } We analyze this bottom up, and may decide that it isn't profitable to inline H into G. Next step, we decide that it is profitable to inline G into F, and do so, which means that F now calls H. Even though the call from G -> H may not have been profitable to inline, the call from F -> H may be (in this case because a constant allows folding etc). In my spot checks, this doesn't have a big impact on code. For example, the LLC output for 252.eon grew from 0.02% (from 317252 to 317308) and 176.gcc actually shrunk by .3% (from 1525612 to 1520964 bytes). 252.eon never iterated in the SCC Passmgr, 176.gcc iterated at most 1 time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102823 91177308-0d34-0410-b5e6-96231b3b80d8