[llvm] [NFC] Add a new Intrinsics.cpp file for intrinsic code (PR #110078)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 06:20:10 PDT 2024
nikic 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 `Intrinsic` 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.
Can you please also move the functions from Function.cpp over in this PR? It's a bit hard to judge the scope otherwise.
https://github.com/llvm/llvm-project/pull/110078
More information about the llvm-commits
mailing list