AliasAnalysis.h revision 6c25c920e66aa2d8f6b48454bc9770087ff7939a
14a10645c70199c8d8567fbc46312158c419720abChris Lattner//===- llvm/Analysis/AliasAnalysis.h - Alias Analysis Interface -*- C++ -*-===// 23da94aec4d429b2ba0f65fa040c33650cade196bMisha Brukman// 37c0e022c5c4be4b11e199a53f73bbdd84e34aa80John Criswell// The LLVM Compiler Infrastructure 47c0e022c5c4be4b11e199a53f73bbdd84e34aa80John Criswell// 521c62da287237d39d0d95004881ea4baae3be6daChris Lattner// This file is distributed under the University of Illinois Open Source 621c62da287237d39d0d95004881ea4baae3be6daChris Lattner// License. See LICENSE.TXT for details. 73da94aec4d429b2ba0f65fa040c33650cade196bMisha Brukman// 87c0e022c5c4be4b11e199a53f73bbdd84e34aa80John Criswell//===----------------------------------------------------------------------===// 94a10645c70199c8d8567fbc46312158c419720abChris Lattner// 104a10645c70199c8d8567fbc46312158c419720abChris Lattner// This file defines the generic AliasAnalysis interface, which is used as the 118ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif// common interface used by all clients of alias analysis information, and 124a10645c70199c8d8567fbc46312158c419720abChris Lattner// implemented by all alias analysis implementations. Mod/Ref information is 134a10645c70199c8d8567fbc46312158c419720abChris Lattner// also captured by this interface. 144a10645c70199c8d8567fbc46312158c419720abChris Lattner// 154a10645c70199c8d8567fbc46312158c419720abChris Lattner// Implementations of this interface must implement the various virtual methods, 16f1b20d8620b05abaa52f40ac6d21f839b265fb00Chris Lattner// which automatically provides functionality for the entire suite of client 17551ccae044b0ff658fe629dd67edd5ffe75d10e8Reid Spencer// APIs. 18551ccae044b0ff658fe629dd67edd5ffe75d10e8Reid Spencer// 19551ccae044b0ff658fe629dd67edd5ffe75d10e8Reid Spencer// This API represents memory as a (Pointer, Size) pair. The Pointer component 20551ccae044b0ff658fe629dd67edd5ffe75d10e8Reid Spencer// specifies the base memory address of the region, the Size specifies how large 2174382b7c699120fbec5cb5603c9cf4212eb37f06Chris Lattner// of an area is being queried, or UnknownSize if the size is not known. 224a10645c70199c8d8567fbc46312158c419720abChris Lattner// Pointers that point to two completely different objects in memory never 2351ab5c8862466bbddcd5c4369779c472978ed309Reid Spencer// alias, regardless of the value of the Size component. 24d0fde30ce850b78371fd1386338350591f9ff494Brian Gaeke// 25d0fde30ce850b78371fd1386338350591f9ff494Brian Gaeke//===----------------------------------------------------------------------===// 264a10645c70199c8d8567fbc46312158c419720abChris Lattner 274a10645c70199c8d8567fbc46312158c419720abChris Lattner#ifndef LLVM_ANALYSIS_ALIAS_ANALYSIS_H 284a10645c70199c8d8567fbc46312158c419720abChris Lattner#define LLVM_ANALYSIS_ALIAS_ANALYSIS_H 294a10645c70199c8d8567fbc46312158c419720abChris Lattner 304a10645c70199c8d8567fbc46312158c419720abChris Lattner#include "llvm/Support/CallSite.h" 3150010429a7c3285dab15ede68acae7231fade367Chris Lattner#include <vector> 324a10645c70199c8d8567fbc46312158c419720abChris Lattner 334148556a9c767fdf3047ae8e004a759356b893ddMisha Brukmannamespace llvm { 34a328c51bb99666ee0c045a57ea6d6ce2b0198f9bChris Lattner 35a328c51bb99666ee0c045a57ea6d6ce2b0198f9bChris Lattnerclass LoadInst; 36a328c51bb99666ee0c045a57ea6d6ce2b0198f9bChris Lattnerclass StoreInst; 37a328c51bb99666ee0c045a57ea6d6ce2b0198f9bChris Lattnerclass VAArgInst; 38a328c51bb99666ee0c045a57ea6d6ce2b0198f9bChris Lattnerclass TargetData; 39a328c51bb99666ee0c045a57ea6d6ce2b0198f9bChris Lattnerclass Pass; 40a328c51bb99666ee0c045a57ea6d6ce2b0198f9bChris Lattnerclass AnalysisUsage; 414a10645c70199c8d8567fbc46312158c419720abChris Lattner 4270ef449741da8b1ef035e04a55958652a0200ba1Dan Gohmanclass AliasAnalysis { 43b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaekeprotected: 44b687d82b029ba448b978e2c9ed424ee5d1f9f093Misha Brukman const TargetData *TD; 45b687d82b029ba448b978e2c9ed424ee5d1f9f093Misha Brukman 465073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukmanprivate: 475073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman AliasAnalysis *AA; // Previous Alias Analysis to chain to. 4850010429a7c3285dab15ede68acae7231fade367Chris Lattner 4950010429a7c3285dab15ede68acae7231fade367Chris Lattnerprotected: 505073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman /// InitializeAliasAnalysis - Subclasses must call this method to initialize 51c600f3c337f18c62116ac58b701e4f7ae6d2fb1aChris Lattner /// the AliasAnalysis interface before any other methods are called. This is 52cd6f46e2ac4c1d64067237c0b28eccfae22bd9f4Chris Lattner /// typically called by the run* methods of these subclasses. This may be 539ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov /// called multiple times. 549ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov /// 559ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov void InitializeAliasAnalysis(Pass *P); 564d143ee01988e1b52e106ffccbb313937ca5e886Chris Lattner 57b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke /// getAnalysisUsage - All alias analysis implementations should invoke this 583c053a0a98e19f5ac8905011ad4c8238b08d6aeaChris Lattner /// directly (using AliasAnalysis::getAnalysisUsage(AU)). 5970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman virtual void getAnalysisUsage(AnalysisUsage &AU) const; 6070ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 6149419e28fe400509363cecf63a3a824002c1d9e0Evan Chengpublic: 6249419e28fe400509363cecf63a3a824002c1d9e0Evan Cheng static char ID; // Class identification, replacement for typeinfo 6349419e28fe400509363cecf63a3a824002c1d9e0Evan Cheng AliasAnalysis() : TD(0), AA(0) {} 6449419e28fe400509363cecf63a3a824002c1d9e0Evan Cheng virtual ~AliasAnalysis(); // We want to be subclassed 6549419e28fe400509363cecf63a3a824002c1d9e0Evan Cheng 6649419e28fe400509363cecf63a3a824002c1d9e0Evan Cheng /// UnknownSize - This is a special value which can be used with the 6749419e28fe400509363cecf63a3a824002c1d9e0Evan Cheng /// size arguments in alias queries to indicate that the caller does not 6870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// know the sizes of the potential memory references. 6970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman static uint64_t const UnknownSize = ~UINT64_C(0); 7070ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 7170ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// getTargetData - Return a pointer to the current TargetData object, or 7249419e28fe400509363cecf63a3a824002c1d9e0Evan Cheng /// null if no TargetData object is available. 7349419e28fe400509363cecf63a3a824002c1d9e0Evan Cheng /// 7470ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman const TargetData *getTargetData() const { return TD; } 75c5cad211d6ec50fe90a0a716dee701c6c4721385Brian Gaeke 765e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer /// getTypeStoreSize - Return the TargetData store size for the given type, 775e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer /// if known, or a conservative value otherwise. 785e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer /// 795e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer uint64_t getTypeStoreSize(const Type *Ty); 803c053a0a98e19f5ac8905011ad4c8238b08d6aeaChris Lattner 813c053a0a98e19f5ac8905011ad4c8238b08d6aeaChris Lattner //===--------------------------------------------------------------------===// 823c053a0a98e19f5ac8905011ad4c8238b08d6aeaChris Lattner /// Alias Queries... 837dac658792425c10274594782d6fcf10208a16f0Chris Lattner /// 847dac658792425c10274594782d6fcf10208a16f0Chris Lattner 857dac658792425c10274594782d6fcf10208a16f0Chris Lattner /// Location - A description of a memory location. 867dac658792425c10274594782d6fcf10208a16f0Chris Lattner struct Location { 877dac658792425c10274594782d6fcf10208a16f0Chris Lattner /// Ptr - The address of the start of the location. 887d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner const Value *Ptr; 8951ab5c8862466bbddcd5c4369779c472978ed309Reid Spencer /// Size - The maximum size of the location, or UnknownSize if the size is 909ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov /// not known. Note that an unknown size does not mean the pointer aliases 9151ab5c8862466bbddcd5c4369779c472978ed309Reid Spencer /// the entire virtual address space, because there are restrictions on 929ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov /// stepping out of one object and into another. 939ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov /// See http://llvm.org/docs/LangRef.html#pointeraliasing 949ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov uint64_t Size; 959ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov /// TBAATag - The metadata node which describes the TBAA type of 969ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov /// the location, or null if there is no known unique tag. 974a10645c70199c8d8567fbc46312158c419720abChris Lattner const MDNode *TBAATag; 984a10645c70199c8d8567fbc46312158c419720abChris Lattner 99d0fde30ce850b78371fd1386338350591f9ff494Brian Gaeke explicit Location(const Value *P = 0, 100fa76183e8e28985dfd17b1d6291c939dab4cbe1dChris Lattner uint64_t S = UnknownSize, 101fa76183e8e28985dfd17b1d6291c939dab4cbe1dChris Lattner const MDNode *N = 0) 102fa76183e8e28985dfd17b1d6291c939dab4cbe1dChris Lattner : Ptr(P), Size(S), TBAATag(N) {} 103fa76183e8e28985dfd17b1d6291c939dab4cbe1dChris Lattner 10460083e2fc0f1165b7511757449f1ee3852b7229cChris Lattner Location getWithNewPtr(const Value *NewPtr) const { 10568ccdaa84909108c42417a8091c771598e26456eDaniel Dunbar Location Copy(*this); 10668ccdaa84909108c42417a8091c771598e26456eDaniel Dunbar Copy.Ptr = NewPtr; 10768ccdaa84909108c42417a8091c771598e26456eDaniel Dunbar return Copy; 10868ccdaa84909108c42417a8091c771598e26456eDaniel Dunbar } 10970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 110636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke Location getWithoutTBAATag() const { 11170ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman Location Copy(*this); 112636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke Copy.TBAATag = 0; 113636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke return Copy; 11460083e2fc0f1165b7511757449f1ee3852b7229cChris Lattner } 11570ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman }; 11670ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 11770ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// Alias analysis result - Either we know for sure that it does not alias, we 11870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// know for sure it must alias, or we don't know anything: The two pointers 11970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// _might_ alias. This enum is designed so you can do things like: 12038efa38c864f6d29892d92102c0232b234b526edBill Wendling /// if (AA.alias(P1, P2)) { ... } 121faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila /// to check to see if two pointers might alias. 122faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila /// 123faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila /// See docs/AliasAnalysis.html for more information on the specific meanings 124faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila /// of these values. 12538efa38c864f6d29892d92102c0232b234b526edBill Wendling /// 12638efa38c864f6d29892d92102c0232b234b526edBill Wendling enum AliasResult { NoAlias = 0, MayAlias = 1, MustAlias = 2 }; 12738efa38c864f6d29892d92102c0232b234b526edBill Wendling 12838efa38c864f6d29892d92102c0232b234b526edBill Wendling /// alias - The main low level interface to the alias analysis implementation. 129fa76183e8e28985dfd17b1d6291c939dab4cbe1dChris Lattner /// Returns an AliasResult indicating whether the two pointers are aliased to 1309d679cbc6cb5c7dc8cca87a1e1548c480fb056b8Misha Brukman /// each other. This is the interface that must be implemented by specific 1314a10645c70199c8d8567fbc46312158c419720abChris Lattner /// alias analysis implementations. 1324a10645c70199c8d8567fbc46312158c419720abChris Lattner virtual AliasResult alias(const Location &LocA, const Location &LocB); 1334a10645c70199c8d8567fbc46312158c419720abChris Lattner 1344a10645c70199c8d8567fbc46312158c419720abChris Lattner /// alias - A convenience wrapper. 1354a10645c70199c8d8567fbc46312158c419720abChris Lattner AliasResult alias(const Value *V1, uint64_t V1Size, 1364a10645c70199c8d8567fbc46312158c419720abChris Lattner const Value *V2, uint64_t V2Size) { 1374a10645c70199c8d8567fbc46312158c419720abChris Lattner return alias(Location(V1, V1Size), Location(V2, V2Size)); 1384a10645c70199c8d8567fbc46312158c419720abChris Lattner } 139ac95cc79ac0b899d566cc29c0f646f39c2fa35c0Dan Gohman 1404a10645c70199c8d8567fbc46312158c419720abChris Lattner /// alias - A convenience wrapper. 1414148556a9c767fdf3047ae8e004a759356b893ddMisha Brukman AliasResult alias(const Value *V1, const Value *V2) { 1424148556a9c767fdf3047ae8e004a759356b893ddMisha Brukman return alias(V1, UnknownSize, V2, UnknownSize); 14370ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman } 1444a10645c70199c8d8567fbc46312158c419720abChris Lattner 145636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke /// isNoAlias - A trivial helper function to check to see if the specified 146cc876a7421f6dbcca98446058d5f0637092c6e1aChris Lattner /// pointers are no-alias. 147b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke bool isNoAlias(const Location &LocA, const Location &LocB) { 148b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke return alias(LocA, LocB) == NoAlias; 14970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman } 150faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila 151faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila /// isNoAlias - A convenience wrapper. 152b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke bool isNoAlias(const Value *V1, uint64_t V1Size, 153b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke const Value *V2, uint64_t V2Size) { 154636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke return isNoAlias(Location(V1, V1Size), Location(V2, V2Size)); 155636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke } 156b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke 157b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke /// pointsToConstantMemory - If the specified memory location is known to be 158b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke /// constant, return true. This allows disambiguation of store 159636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke /// instructions from constant pointers. 160faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila /// 161faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila virtual bool pointsToConstantMemory(const Location &Loc); 162b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke 163b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke /// pointsToConstantMemory - A convenient wrapper. 164b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke bool pointsToConstantMemory(const Value *P) { 165636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke return pointsToConstantMemory(Location(P)); 166636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke } 167b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke 168b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke //===--------------------------------------------------------------------===// 169b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke /// Simple mod/ref information... 170b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke /// 171b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke 172b5ee509be2ce78badc11fd649dda90ec78394d1aBrian Gaeke /// ModRefResult - Represent the result of a mod/ref query. Mod and Ref are 173769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner /// bits which may be or'd together. 174636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke /// 175636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke enum ModRefResult { NoModRef = 0, Ref = 1, Mod = 2, ModRef = 3 }; 176769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner 177769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner 17850010429a7c3285dab15ede68acae7231fade367Chris Lattner /// ModRefBehavior - Summary of how a function affects memory in the program. 17970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// Loads from constant globals are not considered memory accesses for this 180636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke /// interface. Also, functions may freely modify stack space local to their 181faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila /// invocation without having to report it through these interfaces. 182faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila enum ModRefBehavior { 18350010429a7c3285dab15ede68acae7231fade367Chris Lattner // DoesNotAccessMemory - This function does not perform any non-local loads 184769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner // or stores to memory. 185769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner // 186636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke // This property corresponds to the GCC 'const' attribute. 187636df3d7ec51a8c6fd759a98853ff709ae54d64eBrian Gaeke DoesNotAccessMemory, 188769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner 189769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner // AccessesArguments - This function accesses function arguments in well 190c600f3c337f18c62116ac58b701e4f7ae6d2fb1aChris Lattner // known (possibly volatile) ways, but does not access any other memory. 191c600f3c337f18c62116ac58b701e4f7ae6d2fb1aChris Lattner AccessesArguments, 192faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila 193faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila // AccessesArgumentsAndGlobals - This function has accesses function 194769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner // arguments and global variables well known (possibly volatile) ways, but 1959ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov // does not access any other memory. 196197f728d49fa0cc0baa5aadb2b905fbd8c22a81eDan Gohman AccessesArgumentsAndGlobals, 1979ef7425a4d44ff129495da2357c98c67162fbeffAnton Korobeynikov 198cc876a7421f6dbcca98446058d5f0637092c6e1aChris Lattner // OnlyReadsMemory - This function does not perform any non-local stores or 1994148556a9c767fdf3047ae8e004a759356b893ddMisha Brukman // volatile loads, but may read from any memory location. 200cc876a7421f6dbcca98446058d5f0637092c6e1aChris Lattner // 2014a10645c70199c8d8567fbc46312158c419720abChris Lattner // This property corresponds to the GCC 'pure' attribute. 202ad6996d74f60340d6139af8f345d93735661fbbaMatthijs Kooijman OnlyReadsMemory, 20365f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman 204ad6996d74f60340d6139af8f345d93735661fbbaMatthijs Kooijman // UnknownModRefBehavior - This indicates that the function could not be 205ac95cc79ac0b899d566cc29c0f646f39c2fa35c0Dan Gohman // classified into one of the behaviors above. 2064a10645c70199c8d8567fbc46312158c419720abChris Lattner UnknownModRefBehavior 20770ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman }; 20870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 20970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// getModRefBehavior - Return the behavior when calling the given call site. 21070ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS); 21170ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 21270ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// getModRefBehavior - Return the behavior when calling the given function. 21370ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// For use when the call site is not known. 21470ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman virtual ModRefBehavior getModRefBehavior(const Function *F); 21570ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 21670ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// getIntrinsicModRefBehavior - Return the modref behavior of the intrinsic 21770ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// with the given id. Most clients won't need this, because the regular 218197f728d49fa0cc0baa5aadb2b905fbd8c22a81eDan Gohman /// getModRefBehavior incorporates this information. 219faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila static ModRefBehavior getIntrinsicModRefBehavior(unsigned iid); 22038efa38c864f6d29892d92102c0232b234b526edBill Wendling 22138efa38c864f6d29892d92102c0232b234b526edBill Wendling /// doesNotAccessMemory - If the specified call is known to never read or 22270ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// write memory, return true. If the call only reads from known-constant 22370ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// memory, it is also legal to return true. Calls that unwind the stack 22470ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// are legal for this predicate. 22570ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// 22670ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// Many optimizations (such as CSE and LICM) can be performed on such calls 22770ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// without worrying about aliasing properties, and many calls have this 22870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// property (e.g. calls to 'sin' and 'cos'). 229197f728d49fa0cc0baa5aadb2b905fbd8c22a81eDan Gohman /// 230faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila /// This property corresponds to the GCC 'const' attribute. 23138efa38c864f6d29892d92102c0232b234b526edBill Wendling /// 23238efa38c864f6d29892d92102c0232b234b526edBill Wendling bool doesNotAccessMemory(ImmutableCallSite CS) { 23370ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman return getModRefBehavior(CS) == DoesNotAccessMemory; 23470ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman } 23570ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 23670ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// doesNotAccessMemory - If the specified function is known to never read or 23770ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// write memory, return true. For use when the call site is not known. 23870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// 23970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman bool doesNotAccessMemory(const Function *F) { 24070ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman return getModRefBehavior(F) == DoesNotAccessMemory; 241197f728d49fa0cc0baa5aadb2b905fbd8c22a81eDan Gohman } 242faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila 24338efa38c864f6d29892d92102c0232b234b526edBill Wendling /// onlyReadsMemory - If the specified call is known to only read from 24438efa38c864f6d29892d92102c0232b234b526edBill Wendling /// non-volatile memory (or not access memory at all), return true. Calls 24570ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// that unwind the stack are legal for this predicate. 24670ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// 24770ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// This property allows many common optimizations to be performed in the 24870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// absence of interfering store instructions, such as CSE of strlen calls. 24970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// 25070ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// This property corresponds to the GCC 'pure' attribute. 251197f728d49fa0cc0baa5aadb2b905fbd8c22a81eDan Gohman /// 252faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila bool onlyReadsMemory(ImmutableCallSite CS) { 25338efa38c864f6d29892d92102c0232b234b526edBill Wendling ModRefBehavior MRB = getModRefBehavior(CS); 25438efa38c864f6d29892d92102c0232b234b526edBill Wendling return MRB == DoesNotAccessMemory || MRB == OnlyReadsMemory; 25570ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman } 25670ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 25770ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// onlyReadsMemory - If the specified function is known to only read from 25870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// non-volatile memory (or not access memory at all), return true. For use 25970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// when the call site is not known. 26070ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// 26170ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman bool onlyReadsMemory(const Function *F) { 26250010429a7c3285dab15ede68acae7231fade367Chris Lattner ModRefBehavior MRB = getModRefBehavior(F); 26370ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman return MRB == DoesNotAccessMemory || MRB == OnlyReadsMemory; 264197f728d49fa0cc0baa5aadb2b905fbd8c22a81eDan Gohman } 265faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila 26650010429a7c3285dab15ede68acae7231fade367Chris Lattner 26750010429a7c3285dab15ede68acae7231fade367Chris Lattner /// getModRefInfo - Return information about whether or not an instruction may 26870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// read or write the specified memory location. An instruction 26970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// that doesn't read or write memory may be trivially LICM'd for example. 270197f728d49fa0cc0baa5aadb2b905fbd8c22a81eDan Gohman ModRefResult getModRefInfo(const Instruction *I, 271faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila const Location &Loc) { 27238efa38c864f6d29892d92102c0232b234b526edBill Wendling switch (I->getOpcode()) { 27370ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman case Instruction::VAArg: return getModRefInfo((const VAArgInst*)I, Loc); 27470ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman case Instruction::Load: return getModRefInfo((const LoadInst*)I, Loc); 275197f728d49fa0cc0baa5aadb2b905fbd8c22a81eDan Gohman case Instruction::Store: return getModRefInfo((const StoreInst*)I, Loc); 27670ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman case Instruction::Call: return getModRefInfo((const CallInst*)I, Loc); 27770ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman case Instruction::Invoke: return getModRefInfo((const InvokeInst*)I,Loc); 27870ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman default: return NoModRef; 27970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman } 28070ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman } 28170ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 2827bb11547e497d7b8fc87f61c1089eee808e3a1eeChris Lattner /// getModRefInfo - A convenience wrapper. 283ac95cc79ac0b899d566cc29c0f646f39c2fa35c0Dan Gohman ModRefResult getModRefInfo(const Instruction *I, 284c600f3c337f18c62116ac58b701e4f7ae6d2fb1aChris Lattner const Value *P, uint64_t Size) { 285faa95763ebb081769bf6ac35e170394c9d477813Kalle Raiskila return getModRefInfo(I, Location(P, Size)); 286ac95cc79ac0b899d566cc29c0f646f39c2fa35c0Dan Gohman } 287a259c9be2acc9528ec7feb3cfd51dcde36d87bb3Misha Brukman 2884a10645c70199c8d8567fbc46312158c419720abChris Lattner /// getModRefInfo (for call sites) - Return whether information about whether 2894a10645c70199c8d8567fbc46312158c419720abChris Lattner /// a particular call site modifies or reads the specified memory location. 2904a10645c70199c8d8567fbc46312158c419720abChris Lattner virtual ModRefResult getModRefInfo(ImmutableCallSite CS, 2914a10645c70199c8d8567fbc46312158c419720abChris Lattner const Location &Loc); 29222ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky 29322ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky /// getModRefInfo (for call sites) - A convenience wrapper. 29422ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky ModRefResult getModRefInfo(ImmutableCallSite CS, 295ea9212ca964ff6587227016f86a44160e586a4c8Chris Lattner const Value *P, uint64_t Size) { 29622ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky return getModRefInfo(CS, Location(P, Size)); 2978ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif } 29868ccdaa84909108c42417a8091c771598e26456eDaniel Dunbar 29951c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer /// getModRefInfo (for calls) - Return whether information about whether 30022ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky /// a particular call modifies or reads the specified memory location. 30165f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman ModRefResult getModRefInfo(const CallInst *C, const Location &Loc) { 30265f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman return getModRefInfo(ImmutableCallSite(C), Loc); 30351c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer } 30451c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer 30574382b7c699120fbec5cb5603c9cf4212eb37f06Chris Lattner /// getModRefInfo (for calls) - A convenience wrapper. 30665f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman ModRefResult getModRefInfo(const CallInst *C, const Value *P, uint64_t Size) { 30774382b7c699120fbec5cb5603c9cf4212eb37f06Chris Lattner return getModRefInfo(C, Location(P, Size)); 308ea9212ca964ff6587227016f86a44160e586a4c8Chris Lattner } 309ea9212ca964ff6587227016f86a44160e586a4c8Chris Lattner 310ea9212ca964ff6587227016f86a44160e586a4c8Chris Lattner /// getModRefInfo (for invokes) - Return whether information about whether 31122ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky /// a particular invoke modifies or reads the specified memory location. 31286c006a971eb6fab6bd4923ff7ec1c0bc9c28f74Anton Korobeynikov ModRefResult getModRefInfo(const InvokeInst *I, 313ea9212ca964ff6587227016f86a44160e586a4c8Chris Lattner const Location &Loc) { 314ea9212ca964ff6587227016f86a44160e586a4c8Chris Lattner return getModRefInfo(ImmutableCallSite(I), Loc); 31541396302126c24f1d5231e191852ebf2ff37fe23Duncan Sands } 316ea9212ca964ff6587227016f86a44160e586a4c8Chris Lattner 317ea9212ca964ff6587227016f86a44160e586a4c8Chris Lattner /// getModRefInfo (for invokes) - A convenience wrapper. 3184a10645c70199c8d8567fbc46312158c419720abChris Lattner ModRefResult getModRefInfo(const InvokeInst *I, 3194a10645c70199c8d8567fbc46312158c419720abChris Lattner const Value *P, uint64_t Size) { 3204a10645c70199c8d8567fbc46312158c419720abChris Lattner return getModRefInfo(I, Location(P, Size)); 3214a10645c70199c8d8567fbc46312158c419720abChris Lattner } 3224a10645c70199c8d8567fbc46312158c419720abChris Lattner 3234a10645c70199c8d8567fbc46312158c419720abChris Lattner /// getModRefInfo (for loads) - Return whether information about whether 3248ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif /// a particular load modifies or reads the specified memory location. 325769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner ModRefResult getModRefInfo(const LoadInst *L, const Location &Loc); 32622ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky 32722ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky /// getModRefInfo (for loads) - A convenience wrapper. 328769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner ModRefResult getModRefInfo(const LoadInst *L, const Value *P, uint64_t Size) { 329769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner return getModRefInfo(L, Location(P, Size)); 3308ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif } 33151c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer 3328ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif /// getModRefInfo (for stores) - Return whether information about whether 3338ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif /// a particular store modifies or reads the specified memory location. 33468ccdaa84909108c42417a8091c771598e26456eDaniel Dunbar ModRefResult getModRefInfo(const StoreInst *S, const Location &Loc); 33551c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer 33665f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman /// getModRefInfo (for stores) - A convenience wrapper. 33765f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman ModRefResult getModRefInfo(const StoreInst *S, const Value *P, uint64_t Size) { 33851c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer return getModRefInfo(S, Location(P, Size)); 33951c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer } 34074382b7c699120fbec5cb5603c9cf4212eb37f06Chris Lattner 3414a10645c70199c8d8567fbc46312158c419720abChris Lattner /// getModRefInfo (for va_args) - Return whether information about whether 3428ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif /// a particular va_arg modifies or reads the specified memory location. 34365f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman ModRefResult getModRefInfo(const VAArgInst* I, const Location &Loc); 34465f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman 3454a10645c70199c8d8567fbc46312158c419720abChris Lattner /// getModRefInfo (for va_args) - A convenience wrapper. 3464a10645c70199c8d8567fbc46312158c419720abChris Lattner ModRefResult getModRefInfo(const VAArgInst* I, const Value* P, uint64_t Size) { 3478ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif return getModRefInfo(I, Location(P, Size)); 3484a10645c70199c8d8567fbc46312158c419720abChris Lattner } 3494a10645c70199c8d8567fbc46312158c419720abChris Lattner 3508ff70c2635bfd4e02c0140a5dc9ca909fffba35aGabor Greif /// getModRefInfo - Return information about whether two call sites may refer 35116350f8d00fc3a4a8d2da8a746a29979505af9a8Nick Lewycky /// to the same set of memory locations. See 35286c006a971eb6fab6bd4923ff7ec1c0bc9c28f74Anton Korobeynikov /// http://llvm.org/docs/AliasAnalysis.html#ModRefInfo 3539709272675feaca030cce14d0f5eb7f342b3fc1dChris Lattner /// for details. 35468ccdaa84909108c42417a8091c771598e26456eDaniel Dunbar virtual ModRefResult getModRefInfo(ImmutableCallSite CS1, 3555073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman ImmutableCallSite CS2); 3564a10645c70199c8d8567fbc46312158c419720abChris Lattner 35797182985d530dbef488696c95a39c14fe56c995bReid Spencer //===--------------------------------------------------------------------===// 35851c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer /// Higher level methods for querying mod/ref information. 35965f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman /// 36065f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman 36151c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer /// canBasicBlockModify - Return true if it is possible for execution of the 36251c5a286bae5ad27ddc49602f44b7ea7253a4cc9Reid Spencer /// specified basic block to modify the value pointed to by Ptr. 36374382b7c699120fbec5cb5603c9cf4212eb37f06Chris Lattner bool canBasicBlockModify(const BasicBlock &BB, const Location &Loc); 3644a10645c70199c8d8567fbc46312158c419720abChris Lattner 365769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner /// canBasicBlockModify - A convenience wrapper. 3667dac658792425c10274594782d6fcf10208a16f0Chris Lattner bool canBasicBlockModify(const BasicBlock &BB, const Value *P, uint64_t Size){ 367769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner return canBasicBlockModify(BB, Location(P, Size)); 368769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner } 369769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner 37022ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky /// canInstructionRangeModify - Return true if it is possible for the 37122ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky /// execution of the specified instructions to modify the value pointed to by 37270ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// Ptr. The instructions to consider are all of the instructions in the 37322ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky /// range of [I1,I2] INCLUSIVE. I1 and I2 must be in the same basic block. 37422ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2, 3757d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner const Location &Loc); 3767d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner 37765f57c233cd4499e2e8b52a503201e64edfd6a9eDan Gohman /// canInstructionRangeModify - A convenience wrapper. 3787d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2, 3797d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner const Value *Ptr, uint64_t Size) { 380ac95cc79ac0b899d566cc29c0f646f39c2fa35c0Dan Gohman return canInstructionRangeModify(I1, I2, Location(Ptr, Size)); 3817d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner } 3827d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner 3837d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner //===--------------------------------------------------------------------===// 3847d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner /// Methods that clients should call when they transform the program to allow 3857d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner /// alias analyses to update their internal data structures. Note that these 3867d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner /// methods may be called on any instruction, regardless of whether or not 3877d91e49ff7bcc0fd10a54d45a6185bb05adf3d20Chris Lattner /// they have pointer-analysis implications. 388769f1fe6728ffb5627ae0cedc392576d6e701a5aChris Lattner /// 3895e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer 3905e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer /// deleteValue - This method should be called whenever an LLVM Value is 3915e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer /// deleted from the program, for example when an instruction is found to be 3925e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer /// redundant and is eliminated. 3935e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer /// 3945e1452c856a8bcf39ab7a67a5af946c8162f942dReid Spencer virtual void deleteValue(Value *V); 3954a10645c70199c8d8567fbc46312158c419720abChris Lattner 3964a10645c70199c8d8567fbc46312158c419720abChris Lattner /// copyValue - This method should be used whenever a preexisting value in the 3974a10645c70199c8d8567fbc46312158c419720abChris Lattner /// program is copied or cloned, introducing a new value. Note that analysis 3984a10645c70199c8d8567fbc46312158c419720abChris Lattner /// implementations should tolerate clients that use this method to introduce 39970ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman /// the same value multiple times: if the analysis already knows about a 400c5cad211d6ec50fe90a0a716dee701c6c4721385Brian Gaeke /// value, it should ignore the request. 401c5cad211d6ec50fe90a0a716dee701c6c4721385Brian Gaeke /// 40222ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky virtual void copyValue(Value *From, Value *To); 40322ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky 40422ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky /// replaceWithNewValue - This method is the obvious combination of the two 405c5cad211d6ec50fe90a0a716dee701c6c4721385Brian Gaeke /// above, and it provided as a helper to simplify client code. 4065073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman /// 40722ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky void replaceWithNewValue(Value *Old, Value *New) { 40822ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky copyValue(Old, New); 4095073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman deleteValue(Old); 410c600f3c337f18c62116ac58b701e4f7ae6d2fb1aChris Lattner } 4115073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman}; 41270ef449741da8b1ef035e04a55958652a0200ba1Dan Gohman 41322ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky/// isNoAliasCall - Return true if this pointer is returned by a noalias 41422ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky/// function. 41522ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewyckybool isNoAliasCall(const Value *V); 41622ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky 4175073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman/// isIdentifiedObject - Return true if this pointer refers to a distinct and 418a0f5b15e1eb8642d92b3141a6b88a5729ea979dcChris Lattner/// identifiable object. This returns true for: 41922ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky/// Global Variables and Functions (but not Global Aliases) 42022ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky/// Allocas and Mallocs 42122ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky/// ByVal and NoAlias Arguments 42222ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky/// NoAlias returns 42322ff748712b348300e51248339b6e8cf9b59e2c6Nick Lewycky/// 424a0f5b15e1eb8642d92b3141a6b88a5729ea979dcChris Lattnerbool isIdentifiedObject(const Value *V); 4255073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman 4265073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman} // End llvm namespace 427c600f3c337f18c62116ac58b701e4f7ae6d2fb1aChris Lattner 4285073336cd4da5df4ae13a167582d1dc90f32e4e0Misha Brukman#endif 4296ebe44d22f6dd1ab9f7aa1f3cfd02be52145d535Chris Lattner