[PATCH] D122194: [SelectionDAG] Store LeadingZero count in LiveOutInfo instead of KnownBits.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 17:22:50 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, efriedma, arsenm.
Herald added subscribers: foad, StephenFan, ecnelises, kerbowa, hiraditya, nhaehnle, jvesely.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Previously we stored two APInts for KnownBits. This information is
only ever used to create AssertZExts using the number of known
leading zeros. It's inefficient to store this information in APInt
form.

This patch switches the storage to store the number of leading zeros.

I've also removed the IsValid flag and now rely on default constructing
with the safest values and reseting to the safe values when we need
to invalidate. The IsValid flag was inconsistently used before.
We could default construct entries in LiveRegOut with IsValid=true and
BitWidth=1 instead of default constructing as IsValid=false.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122194

Files:
  llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
  llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122194.417139.patch
Type: text/x-patch
Size: 8112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220322/13724ad3/attachment.bin>


More information about the llvm-commits mailing list