[llvm] [APInt] remove getClearedMemory and improve slow initialization (PR #106945)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 00:56:56 PDT 2024
================
@@ -93,7 +88,7 @@ void APInt::initFromArray(ArrayRef<uint64_t> bigVal) {
U.VAL = bigVal[0];
else {
// Get memory, cleared to 0
- U.pVal = getClearedMemory(getNumWords());
+ U.pVal = new WordType[getNumWords()]();
----------------
nikic wrote:
Similar here. If bigVal.size() is smaller than getNumWords() you will not initialize some words.
https://github.com/llvm/llvm-project/pull/106945
More information about the llvm-commits
mailing list