[MemoryBuiltins] Consistently infer and use MallocFamily
MallocFamily (the enum and StringRef) are used alongside AllocFnsTy.
The latter is picked up from the tables while the former is encoded in
the IR. While they should be merged at some point (see TODO), this
commit makes sure we consistently initialize the MallocFamily String and
pass it to users.
[Instrumentor] Add call instrumentation support
We can now instrument call instructions and extract information about
the arguments, (de)allocation, intrinsic kind, etc.
[DA] Delete early return in accumulateCoefficientsGCD (NFCI) (#197935)
This patch resolved one TODO comment in `accumulateCoefficientsGCD`
regarding an early return. I think this early return doesn't change the
final result because:
- The presence/absence of this early return can only affect whether
`CurLoopCoeff` is set.
- Regardless the value of `CurLoopCoeff`, if `RunningGCD` equals 1, the
result of caller side while loop doesn't change.
Deleting this early return is somewhat beneficial, because it allows us
to merge `analyzeCoefficientsForGCD` into this function.
iwlwifi: firmware: reduce script to extract fwget information
Due to driver changes it is no longer feasible to extract the full
PCI ID / firmware / card type information in one go as we used to
be able to.
We have already changed the way we extract firmware information for
ports and marked the iwlwififw.4 man page as obsolete.
Reduce the script to simply extarct the fwget(8) information and,
compared to the old times, sort each section so diffs will be easier
to see in the future. This was particular helpful this time to make
sure we do not lose entries with the change of technique.
We also keep the script in the best perl spirit to do the job but
not to win a price, especially given it seems we have to change
matters every (other) year.
Given we can no longer extract firmware information for the PCI IDs,
we need to "manually" check against the ports that names match.
[6 lines not shown]
fwget: update realtek and intel pci entries
For Realtek we only add new entries.
For Intel the old way of extracting IDs from the driver no longer
works. The new list is shortened as we drop more specific entries
which were already covered by wildcard entries. The new lists are
also sorted within the groups.
There are 4 entries the new driver no longer carries but are still
present in older versions, so we keep them manually.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
rtw89: firmware: extend script to extract fwget entries
The so far so consistent (file)names got an outlier so add the
one character longer pattern as well to catch that.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
[MemoryBuiltins][NFC] Allow users to retrieve detailed (de)allocation info
There are some helpers to inspect a value or call but not all
information about the (de)allocation are made available outside of
MemoryBuiltins.cpp. The two new functions allow users a more in-depth
view of (de)allocations through a single API. To help with this, we now
read the alloc_align attribute to provide better alignment information
to users. alloc-family is used as well. Two new helpers provide argument
numbers, rather than values.
[MemoryBuiltins] Consistently infer and use MallocFamily
MallocFamily (the enum and StringRef) are used alongside AllocFnsTy.
The latter is picked up from the tables while the former is encoded in
the IR. While they should be merged at some point (see TODO), this
commit makes sure we consistently initialize the MallocFamily String and
pass it to users.
[MemoryBuiltins][NFC] Allow users to retrieve detailed (de)allocation info
There are some helpers to inspect a value or call but not all
information about the (de)allocation are made available outside of
MemoryBuiltins.cpp. The two new functions allow users a more in-depth
view of (de)allocations through a single API. To help with this, we now
read the alloc_align attribute to provide better alignment information
to users. alloc-family is used as well. Two new helpers provide argument
numbers, rather than values.
[MemoryBuiltins] Consistently infer and use MallocFamily
MallocFamily (the enum and StringRef) are used alongside AllocFnsTy.
The latter is picked up from the tables while the former is encoded in
the IR. While they should be merged at some point (see TODO), this
commit makes sure we consistently initialize the MallocFamily String and
pass it to users.
[MemoryBuiltins][NFC] Allow users to retrieve detailed (de)allocation info
There are some helpers to inspect a value or call but not all
information about the (de)allocation are made available outside of
MemoryBuiltins.cpp. The two new functions allow users a more in-depth
view of (de)allocations through a single API. To help with this, we now
read the alloc_align attribute to provide better alignment information
to users. alloc-family is used as well. Two new helpers provide argument
numbers, rather than values.
[clang-tidy] Fix crash in misc-static-initialization-cycle (#198155)
This commit fixes `misc-static-initialization-cycle` crashing on `catch
(...)`.
Catch-all handlers have no exception declaration, so traversal of
`CXXCatchStmt` can call `TraverseDecl(nullptr)`. The check previously
passed that null pointer to `DeclContext::containsDecl`. This commit
fixes the problem by adding a null guard.
Closes #198150