[all-commits] [llvm/llvm-project] 224fd6: [NFC][CaptureTracking] Move static function isNonE...

Anh Tuyen Tran via All-commits all-commits at lists.llvm.org
Thu Oct 15 11:37:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 224fd6ff48e26840f11f870faf2bde124dc2d261
      https://github.com/llvm/llvm-project/commit/224fd6ff48e26840f11f870faf2bde124dc2d261
  Author: Anh Tuyen Tran <anhtuyen at ca.ibm.com>
  Date:   2020-10-15 (Thu, 15 Oct 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/CaptureTracking.h
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/lib/Analysis/CaptureTracking.cpp

  Log Message:
  -----------
  [NFC][CaptureTracking] Move static function isNonEscapingLocalObject to llvm namespace

Function isNonEscapingLocalObject is a static one within BasicAliasAnalysis.cpp.
It wraps around PointerMayBeCaptured of CaptureTracking, checking whether a pointer
is to a function-local object, which never escapes from the function.

Although at the moment, isNonEscapingLocalObject is used only by BasicAliasAnalysis,
its functionality can be used by other pass(es), one of which I will put up for review
very soon. Instead of copying the contents of this static function, I move it to llvm
scope, and place it amongst other functions with similar functionality in CaptureTracking.

The rationale for the location are:
- Pointer escape and pointer being captured are actually two sides of the same coin
- isNonEscapingLocalObject is wrapping around another function in CaptureTracking

Reviewed By: jdoerfert (Johannes Doerfert)

Differential Revision: https://reviews.llvm.org/D89465




More information about the All-commits mailing list