[PATCH] D81670: [TTI] Expose isNoopAddrSpaceCast from TLI.[SROA] Teach SROA to recognize no-op addrspacecast.

Michael Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 11 09:54:01 PDT 2020


hliao created this revision.
hliao added reviewers: arsenm, chandlerc.
Herald added subscribers: llvm-commits, cfe-commits, kerbowa, dexonsmith, steven_wu, hiraditya, nhaehnle, wdng, jvesely.
Herald added projects: clang, LLVM.

So far, SROA could only handle convertible pointer pairs if they are in the
same address space. Just like no-op cast, a no-op `addrspacecast` also changes
no bits, it could also be used to convert pointer pairs from different address
spaces. That benefits `infer-address-spaces` pass to propagate address spaces.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81670

Files:
  clang/test/CodeGen/thinlto-distributed-newpm.ll
  clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/CodeGen/BasicTTIImpl.h
  llvm/include/llvm/Transforms/Scalar/SROA.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/Transforms/Scalar/SROA.cpp
  llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
  llvm/test/Transforms/SROA/noop-addrspacecast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81670.270171.patch
Type: text/x-patch
Size: 31680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200611/f757f7e7/attachment-0001.bin>


More information about the cfe-commits mailing list