[PATCH] D118659: [mlgo][regalloc] Factor live interval feature calculation

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 14:48:12 PST 2022


mtrofin created this revision.
mtrofin added a reviewer: yundiqian.
Herald added subscribers: hiraditya, qcolombet, MatzeB.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Factoring it out so we can subsequently cache it. This should be a NFC,
however, for the float quantities, we see small errors in the least
significant digits. This is because, before, we were summing up one by
one. Now, we sum up results of sums.

This shouldn't matter for ML, and will require rework when we do
quantization (avoiding floats altogether), but meanwhile, it did require
an update to the reference file used for testing.

The patch also bumps the precision of the variables involved in this, to
reduce the error (note they are casted back to float at the end by the
SET macro, since we only work with float and not double in TF)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118659

Files:
  llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp
  llvm/test/CodeGen/MLRegalloc/Inputs/reference-log-noml.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118659.404741.patch
Type: text/x-patch
Size: 46582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220131/f2759b28/attachment-0001.bin>


More information about the llvm-commits mailing list