[PATCH] D21736: [InstrProfiling] Mark __llvm_profile_instrument_target last parameter as i32 zeroext if appropriate.

Marcin Koƛcielnicki via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 26 14:10:08 PDT 2016


koriakin created this revision.
koriakin added a reviewer: bogner.
koriakin added a subscriber: llvm-commits.
koriakin set the repository for this revision to rL LLVM.
Herald added a subscriber: jyknight.

On some architectures (s390x, ppc64, sparc64), C-level int is passed
as i32 signext instead of plain i32 (and unsigned likewise as i32 zeroext).
Add this information to TargetLibraryInfo and use it in InstrProfiling
for __llvm_profile_instrument_target (whose last parameter is unsigned int).
This (together with the clang change) makes compiler-rt profile testsuite pass
on s390x.

There are lots of other places in LLVM that create function calls with int
parameters and/or returns that will need a similiar treatment.  If the
approach taken here is accepted, I'll fix the remaining functions.

Repository:
  rL LLVM

http://reviews.llvm.org/D21736

Files:
  include/llvm/Analysis/TargetLibraryInfo.h
  include/llvm/Transforms/InstrProfiling.h
  lib/Analysis/TargetLibraryInfo.cpp
  lib/Transforms/Instrumentation/InstrProfiling.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21736.61913.patch
Type: text/x-patch
Size: 9796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160626/cafa52ec/attachment.bin>


More information about the llvm-commits mailing list