[all-commits] [llvm/llvm-project] 167ea6: [IR] Ignore bitcasts of function pointers which ar...

Madhur via All-commits all-commits at lists.llvm.org
Tue Apr 6 02:24:13 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 167ea67d76c297eb5dd3fa5f4ffc3c85e1842faa
      https://github.com/llvm/llvm-project/commit/167ea67d76c297eb5dd3fa5f4ffc3c85e1842faa
  Author: madhur13490 <Madhur.Amilkanthwar at amd.com>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M llvm/lib/IR/Function.cpp
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    A llvm/test/Analysis/CallGraph/ignore-bitcast-call-argument-callee.ll
    A llvm/test/Analysis/CallGraph/ignore-bitcast-call-argument.ll
    A llvm/test/Analysis/CallGraph/ignore-bitcast-callees.ll
    A llvm/test/Analysis/CallGraph/ignore-bitcast-callees2.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll
    A llvm/test/Transforms/GlobalOpt/assumelike-bitcast-fastcc.ll
    A llvm/test/Transforms/GlobalOpt/bitcast-call-argument-fastcc.ll
    A llvm/test/Transforms/GlobalOpt/bitcast-callees-fastcc.ll
    A llvm/test/Transforms/GlobalOpt/blockaddr-bitcast-fastcc.ll
    M llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll
    M llvm/test/Transforms/SCCP/arg-count-mismatch.ll
    M llvm/test/Transforms/SCCP/arg-type-mismatch.ll

  Log Message:
  -----------
  [IR] Ignore bitcasts of function pointers which are only used as callees in callbase instruction

This patch enhances hasAddressTaken() to ignore bitcasts as a
callee in callbase instruction. Such bitcast usage doesn't really take
the address in a useful meaningful way.

Reviewed By: rampitec

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




More information about the All-commits mailing list