7 Commits

Author SHA1 Message Date
Chandler Carruth
f0297ae552
Switch the intrinsic names to a string table (#118929)
This avoids the need to dynamically relocate each pointer in the table.

To make this work, this PR also moves the binary search of intrinsic
names to an internal function with an adjusted signature, and switches
the unittesting to test against actual intrinsics.
2024-12-07 17:53:59 -08:00
Adrian Kuegel
3c3f19ca5e Revert "[NFC][LLVM] Use namespace Intrinsic in Intrinsics.cpp (#114822)"
This reverts commit c2b61fcb3cd4ffa286b24437b7b6d66f0dee6c25.

Intrinsic namespace contains memcpy which is a naming conflict with
memcpy from string.h header.
2024-11-08 14:32:31 +00:00
Rahul Joshi
c2b61fcb3c
[NFC][LLVM] Use namespace Intrinsic in Intrinsics.cpp (#114822)
Add `using namespace Intrinsic` to Intrinsics.cpp file.
2024-11-05 07:27:51 -08:00
Kazu Hirata
6f10b65297
[IR] Remove unused includes (NFC) (#114679)
Identified with misc-include-cleaner.
2024-11-02 16:54:06 -07:00
Rahul Joshi
6924fc0326
[LLVM] Add Intrinsic::getDeclarationIfExists (#112428)
Add `Intrinsic::getDeclarationIfExists` to lookup an existing
declaration of an intrinsic in a `Module`.
2024-10-16 07:21:10 -07:00
Rahul Joshi
fa789dffb1
[NFC] Rename Intrinsic::getDeclaration to getOrInsertDeclaration (#111752)
Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is also in preparation of
adding a new `Intrinsic::getDeclaration` that will have behavior similar
to `Module::getFunction` (i.e, just lookup, no creation).
2024-10-11 05:26:03 -07:00
Rahul Joshi
2469d7e361
[NFC] Add a new Intrinsics.cpp file for intrinsic code (#110078)
Add new file Intrinsics.cpp and move all functions in the `Intrinsic`
namespace to it.
2024-10-01 06:55:35 -07:00