[all-commits] [llvm/llvm-project] 2502dc: [InstCombine] Use CaptureTracking in foldAllocaCmp()

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Feb 20 07:39:51 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2502dc8a286a0759f94af8fddfdeb75c118a5358
      https://github.com/llvm/llvm-project/commit/2502dc8a286a0759f94af8fddfdeb75c118a5358
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/compare-alloca.ll

  Log Message:
  -----------
  [InstCombine] Use CaptureTracking in foldAllocaCmp()

foldAllocaCmp() checks whether the alloca is not captured (ignoring
the icmp). Replace the manual implementation of escape analysis
with CaptureTracking.

The primary practical difference is that CaptureTracking handles
nocapture arguments, while foldAllocaCmp() was using a hardcoded
list.

This is basically just the CaptureTracking refactoring from D120371
without the other changes.




More information about the All-commits mailing list