[llvm] [CodeGen] Assert on invalid patchable-function-entry/prefix attributes (PR #194726)

JP Hafer via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 06:18:22 PDT 2026


jph-13 wrote:

> > > I think it is safe to use getFnAttributeAsParsedInteger here too. It is auto-detect for the base rather than 10. However, even if the string starts with say 0x, the string is a decimal number by the time it makes the backend. Or am I mistaken?
> > 
> > 
> > Yes, I think it's fine. Though we may want to check whether there is any code actually making use of the 0 base. If we can change this to 10 without breaking anything, that would be good.
> 
> InitialPSInputAddr uses hex and goes through the wrapper. That is all I found. Would it safe to update this to base 10 and do the update?

Answered my own question: 
Digging around, Mesa emits that attribute as hex via snprintf("0x%x", value) in ac_llvm_add_target_dep_function_attr.

I will leave this alone.

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


More information about the llvm-commits mailing list