mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
8556d2a7f1
doing very similar pointer capture analysis. Factor out the common logic. The new version is from FunctionAttrs since it does a better job than the version in BasicAliasAnalysis git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62461 91177308-0d34-0410-b5e6-96231b3b80d8
30 lines
1.1 KiB
C++
30 lines
1.1 KiB
C++
//===----- llvm/Analysis/CaptureTracking.h - Pointer capture ----*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains routines that help determine which pointers are captured.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_ANALYSIS_CAPTURETRACKING_H
|
|
#define LLVM_ANALYSIS_CAPTURETRACKING_H
|
|
|
|
namespace llvm {
|
|
class Value;
|
|
|
|
/// PointerMayBeCaptured - Return true if this pointer value may be captured
|
|
/// by the enclosing function (which is required to exist). This routine can
|
|
/// be expensive, so consider caching the results. The boolean ReturnCaptures
|
|
/// specifies whether returning the value (or part of it) from the function
|
|
/// counts as capturing it or not.
|
|
bool PointerMayBeCaptured(const Value *V, bool ReturnCaptures);
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif
|