Page MenuHomePhabricator

[CallGraphUpdater][Attributor][FIX] Allow standalone function replacement
Needs ReviewPublic

Authored by jdoerfert on Oct 27 2020, 10:30 PM.

Details

Summary
NOTE: This is not a working patch. We need to revisit the ways we update the new PM callgraph, potentially the things we want to do are just not possible.

We did mix replacing a function and deleting the old one but that should
be two different operations so we can reuse them individually.

This is supposed to fix the creation of deep-wrappers which currently
delete the original function but it actually will cause a crash in the
way we update the new PM call graph.

Mail discussion: http://lists.llvm.org/pipermail/llvm-dev/2020-October/146117.html

Diff Detail

Unit TestsFailed

TimeTest
380 mslinux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp
Script: -- : 'RUN: at line 3'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang --driver-mode=g++ -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mcmodel=large -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /mnt/disks/ssd0/agent/llvm-project/compiler-rt/test/hwasan/TestCases/sizes.cpp -nostdlib++ -lstdc++ -o /mnt/disks/ssd0/agent/llvm-project/build/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/sizes.cpp.tmp
20 mslinux > LLVM-Unit.IR/_/IRTests::PassManager.CallGraphUpdater0
Note: Google Test filter = PassManager.CallGraphUpdater0 [==========] Running 1 test from 1 test case. [----------] Global test environment set-up.
920 mslinux > LLVM.Transforms/Attributor::internalize.ll
Script: -- : 'RUN: at line 4'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/Attributor/internalize.ll | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/Attributor/internalize.ll --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM,CHECK_DISABLED,NOT_CGSCC_NPM_DISABLED,NOT_CGSCC_OPM_DISABLED,NOT_TUNIT_NPM_DISABLED,IS__TUNIT_____DISABLED,IS________OPM_DISABLED,IS__TUNIT_OPM_DISABLED
20 mswindows > LLVM-Unit.IR/_/IRTests_exe::PassManager.CallGraphUpdater0
Note: Google Test filter = PassManager.CallGraphUpdater0 [==========] Running 1 test from 1 test case.
560 mswindows > LLVM.Transforms/Attributor::internalize.ll
Script: -- : 'RUN: at line 4'; c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\opt.exe -attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\Transforms\Attributor\internalize.ll | c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\Transforms\Attributor\internalize.ll --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM,CHECK_DISABLED,NOT_CGSCC_NPM_DISABLED,NOT_CGSCC_OPM_DISABLED,NOT_TUNIT_NPM_DISABLED,IS__TUNIT_____DISABLED,IS________OPM_DISABLED,IS__TUNIT_OPM_DISABLED

Event Timeline

jdoerfert created this revision.Oct 27 2020, 10:30 PM
Herald added a reviewer: homerdin. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
jdoerfert requested review of this revision.Oct 27 2020, 10:30 PM
jdoerfert retitled this revision from [CallGraphUpdater][Attributor][FIX] Allow standalone function replacement NOTE: This is not a working patch. We need to revisit the ways we update the new PM callgraph, potentially the things we want to do are just not possible. to [CallGraphUpdater][Attributor][FIX] Allow standalone function replacement.Oct 27 2020, 10:50 PM
jdoerfert edited the summary of this revision. (Show Details)