[llvm] [NFC] Add a new Intrinsics.cpp file for intrinsic code (PR #110078)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 06:14:13 PDT 2024


jurahul wrote:

> What's the motivation for splitting this into a separate file? Is this just so the name matches the name of the header?

The motivation for moving `lookupLLVMIntrinsicByName` out of IntrinsicInst.cpp was that the function does not have anything to do with `IntinsicInst` or its subclasses and is mainly used from Function.cpp. I could have just moved it to Function.cpp. But Function.cpp also has a bunch of functions in the `Intrinsics` namespace and they seem enough of them to make a separate cpp file for them. This PR is just seeding the file. Once it goes in, I can move some others to that file as well (mostly all the ones in the `Intrinsic` namespace.

https://github.com/llvm/llvm-project/pull/110078


More information about the llvm-commits mailing list