Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Sep 5, 2025

Link: llvm/llvm-project#143208
Requested by: @artagnon

@github-actions github-actions bot mentioned this pull request Sep 5, 2025
@zyw-bot
Copy link
Collaborator Author

zyw-bot commented Sep 5, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@ff9b296
patch: llvm/llvm-project#143208
sha256: 080046eedc50b44dd5ba98a3ad330e2a1f52586d2e708e2ee36573df7d1e549b
commit: 0170bb4

8 files changed, 2639 insertions(+), 2932 deletions(-)

Improvements:
  indvars.NumElimIdentity 1854 -> 1858 +0.22%
  indvars.NumFoldedUser 2154 -> 2156 +0.09%
  constmerge.NumIdenticalMerged 15577 -> 15585 +0.05%
  loop-idiom.NumMemCpy 8990 -> 8993 +0.03%
  loop-delete.NumBackedgesBroken 45365 -> 45380 +0.03%
  indvars.NumElimCmp 57274 -> 57288 +0.02%
  gvn.NumGVNBlocks 197634 -> 197667 +0.02%
  globalsmodref-aa.NumNonAddrTakenGlobalVars 421826 -> 421841 +0.00%
  loop-delete.NumDeleted 115606 -> 115609 +0.00%
  instcombine.NumGlobalCopies 191345 -> 191347 +0.00%
Regressions:
  aggressive-instcombine.NumExprsReduced 20573 -> 20572 -0.00%
  aggressive-instcombine.NumInstrsReduced 68523 -> 68521 -0.00%
  memcpyopt.NumStackMove 87793 -> 87791 -0.00%
  indvars.NumLFTR 327633 -> 327628 -0.00%
  instsimplify.NumSimplified 2547879 -> 2547859 -0.00%
  lcssa.NumLCSSA 15676986 -> 15676866 -0.00%
  scalar-evolution.NumExitCountsComputed 4185871 -> 4185844 -0.00%
  gvn.NumGVNSimpl 4582296 -> 4582270 -0.00%
  loop-vectorize.LoopsAnalyzed 2009798 -> 2009794 -0.00%
  sccp.NumDeadBlocks 706772 -> 706771 -0.00%

34 56 bench/clamav/optimized/crc.ll
78 140 bench/coreutils-rs/optimized/4o7j3eorsq1l9mcp.ll
21 32 bench/hdf5/optimized/H5checksum.ll
381 465 bench/linux/optimized/i2c-core-smbus.ll
46 106 bench/openmpi/optimized/crc.ll
47 71 bench/wireshark/optimized/packet-mstp.ll

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2025

The provided diff introduces several optimizations and changes related to CRC (Cyclic Redundancy Check) table usage across multiple benchmarks. Here are the major changes:

  1. Introduction of Precomputed CRC Tables: A new private constant @.crctable of type [256 x i32] (or [256 x i16] in one case) is added in multiple files (crc.ll, H5checksum.ll, i2c-core-smbus.ll, etc.). This table contains precomputed CRC values, replacing runtime CRC table generation.

  2. Optimization of CRC Initialization: Functions that previously computed CRC tables at runtime (e.g., @prte_initialize_crc_table, @_GLOBAL__sub_I_crc.cpp, @H5__checksum_crc_make_table) are modified to use memcpy from the precomputed @.crctable instead of computing values in a loop, significantly reducing initialization overhead.

  3. Replacement of CRC Computation Loops: In multiple functions (e.g., @_Z9InitCRC32Pj, @H5_checksum_crc, @i2c_smbus_pec), loops that performed bit manipulation to compute CRC values are replaced with direct table lookups using @.crctable, improving performance.

  4. Refactoring of CRC Update Logic: Functions that update CRC values during data processing (e.g., @_Z5CRC32jPKvm, @dissect_mstp) are updated to use the precomputed table for CRC updates, replacing complex bit-shifting and XOR operations with simpler table-based lookups.

  5. Minor IR and Metadata Adjustments: Several updates to metadata (e.g., TBAA tags, loop metadata) and function attributes to reflect the changes in memory access patterns and optimization assumptions.

These changes collectively optimize CRC computation by replacing expensive runtime calculations with efficient table lookups, leveraging precomputed constants for improved performance.

model: qwen-plus-latest
CompletionUsage(completion_tokens=410, prompt_tokens=100744, total_tokens=101154, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Sep 7, 2025
@dtcxzyw dtcxzyw deleted the test-run17490153120 branch September 9, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants