[PATCH] D98884: [IR] Ignore bitcasts of function pointers which are only used as callees in callbase instruction

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 08:53:10 PDT 2021


jdoerfert added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:2149
+      continue;
+    }
     cast<CallBase>(U)->setCallingConv(CallingConv::Fast);
----------------
Now we could even have a helper of some sort. Unsure what design is best.


================
Comment at: llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll:5
+; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM1,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,AA_IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
----------------
Hm, if you just run the update script the tests should be properly updated, did you do that?


================
Comment at: llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll:5
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,AA_IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
----------------
Same as above but I do not understand why this change would cause us to loose the function attributes if no AA is provided. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98884/new/

https://reviews.llvm.org/D98884



More information about the llvm-commits mailing list