Page MenuHomePhabricator

[NFCI]MemDepAnalysis] Introduce global limit on a number of instructions to be traversed during single query

Authored by lebedev.ri on Jul 28 2020, 3:37 AM.



As we have seen/established in D84108, the cut-off thresholds for Memory Dependence Analysis may need tuning.
In particular, currently they are:

  • scan up to 100 instructions per block. IMO this may be a bit low. (rL179713, changed from 500)
  • Scan up to 1000 (*sic*) blocks. That seems to be somewhat high.. (D16123)
  • There is no cumulative limit on scanned instructions, so one query can end up scanning up to 100 instructions/block * 1k blocks = 100k instructions. Just as @nikic noted in, that is indeed kinda just insane.

For now, this patch simply adds said cut-off option, but the limit is presently unset.
D84609 will be lowering the limits.

Diff Detail

Unit TestsFailed

30 mslinux > LLVM.Transforms/DeadStoreElimination::inst-limits.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt -S -dse < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/DeadStoreElimination/inst-limits.ll | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/DeadStoreElimination/inst-limits.ll
140 mslinux > Polly.ScopInfo::memcpy-raw-source.ll
Script: -- : 'RUN: at line 1'; opt -polly-process-unprofitable -polly-remarks-minimal -polly-use-llvm-names -polly-import-jscop-dir=/mnt/disks/ssd0/agent/llvm-project/polly/test/ScopInfo -polly-codegen-verify -basic-aa -scoped-noalias -tbaa -polly-scops -analyze < /mnt/disks/ssd0/agent/llvm-project/polly/test/ScopInfo/memcpy-raw-source.ll
80 mswindows > LLVM.Transforms/DeadStoreElimination::inst-limits.ll
Script: -- : 'RUN: at line 1'; c:\ws\w1\llvm-project\premerge-checks\build\bin\opt.exe -S -dse < C:\ws\w1\llvm-project\premerge-checks\llvm\test\Transforms\DeadStoreElimination\inst-limits.ll | c:\ws\w1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w1\llvm-project\premerge-checks\llvm\test\Transforms\DeadStoreElimination\inst-limits.ll

Event Timeline

lebedev.ri created this revision.Jul 28 2020, 3:37 AM
Harbormaster returned this revision to the author for changes because remote builds failed.Jul 28 2020, 4:50 AM
Harbormaster failed remote builds in B65988: Diff 281173!
lebedev.ri requested review of this revision.Jul 28 2020, 5:50 AM
bmahjour removed a subscriber: bmahjour.Jul 28 2020, 6:44 AM
lebedev.ri planned changes to this revision.Aug 12 2020, 2:23 PM

Not needed unless D84609 proceeds.

lebedev.ri abandoned this revision.Jan 17 2022, 2:36 PM