Lib call selection

Hi!

I’m trying to migrate my llvm version to clang21.

seems like there was a change that replaced the old setLibcallName() called in selection with a td file that supposed to generate same logic.

the issue is that some of our libs depends if we have specific hw features. that data relays under the subtarget object.

is there a way to somehow get the subtarget object in runtimelibcall ? like MF.getSubtarget();?

@arsenm

Not yet. For now if your libcall selection depends on a subtarget feature, you still need to manually configure it (by the enum value) in the TargetLowering constructor. The target’s SystemRuntimeLibrary should include the superset of calls that any subtarget could use.

I’m working on moving the codegen component into tablegen. In the future there should be a separate LibcallLoweringInfo corresponding to the current TargetLowering table, separate from the triple’s list of libcalls