[all-commits] [llvm/llvm-project] f95850: [SROA] Teach SROA to perform no-op pointer convers...

darkbuck via All-commits all-commits at lists.llvm.org
Mon Jun 22 22:49:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f95850ce9c7593d3d8d2f83c55197970f373b9ad
      https://github.com/llvm/llvm-project/commit/f95850ce9c7593d3d8d2f83c55197970f373b9ad
  Author: Michael Liao <michael.hliao at gmail.com>
  Date:   2020-06-23 (Tue, 23 Jun 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SROA.cpp
    M llvm/test/Transforms/SROA/address-spaces.ll
    M llvm/test/Transforms/SROA/alloca-address-space.ll
    M llvm/test/Transforms/SROA/non-integral-pointers.ll

  Log Message:
  -----------
  [SROA] Teach SROA to perform no-op pointer conversion.

Summary:
- When promoting a pointer from memory to register, SROA skips pointers
  from different address spaces. However, as `ptrtoint` and `inttoptr`
  are defined as no-op casts if that integer type has the same as the
  pointer value, generate the pair of `ptrtoint`/`inttoptr` (no-op cast)
  sequence to convert pointers from different address spaces if they
  have the same size.

Reviewers: arsenm, chandlerc, lebedev.ri

Subscribers:

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




More information about the All-commits mailing list