[all-commits] [llvm/llvm-project] 6f5d91: OpaquePtr: Don't check pointee type for byval/prea...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Jul 9 06:38:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f5d9136b27eefc981333d8c23ea9c0a38033d7b
      https://github.com/llvm/llvm-project/commit/6f5d9136b27eefc981333d8c23ea9c0a38033d7b
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M llvm/include/llvm/IR/Argument.h
    M llvm/lib/IR/Function.cpp
    M llvm/lib/IR/Mangler.cpp

  Log Message:
  -----------
  OpaquePtr: Don't check pointee type for byval/preallocated

Since none of these users really care about the actual type, hide the
type under a new size-getting attribute to go along with
hasPassPointeeByValueAttr. This will work better for the future byref
attribute, which may end up only tracking the byte size and not the IR
type.

We currently have 3 parameter attributes that should carry the type
(technically inalloca does not yet). The APIs are somewhat awkward
since preallocated/inalloca piggyback on byval in some places, but in
others are treated as distinct attributes. Since these are all
mutually exclusive, we should probably just merge all the attribute
infrastructure treating these as totally distinct attributes.




More information about the All-commits mailing list