Yeah, most of the 3E precedents I can think of offhand are size category based. Making it mass based would be fiddly.
So maybe +1 HD for a Small creature, +2 HD for Medium, +4 HD for Large and so on?
Which'd mean a Colossal creature is +32 HD and results in one Ihagnim becoming five Ihagnim…
Maybe have it go exponential at some stage? So a Huge meal just splits one Ihagnim into two, a Gargantuan meal splits it twice into four 8 HD Ihagnim and a Colossal one results in eight of them.
Alternatively we could introduce a random element so eating size X adds Yd# HD and if that exceeds 16HD you just take away 1 HD and divide the result by 8 to determine how many Ihagnim result?
Actually, I like that idea. After all, if a 15 HD Ihagnim gets a meal worth 7 HD that's two Ihagnim with 5 or 6 HD worth of meat left over, which ought to go somewhere.
How about +1 HD for Small, +2 HD for Medium, +2d4 HD for Large (average +5), +2d6+6 HD for Huge (+13 => average 2.5 ihagnim)[2-3], +2d12+20 HD for Gargantuan (+33 => average 5 ihagnim)[3-6] and +2d20+50 for Colossal (+71 => average 9.75 ihagnim)[7-12]?
Come to think of it, the Ihagnim can only Devour creatures up to Large size, since anything Huge or bigger won't fit inside their annihilating stomach.
So we either don't need to worry about the bigger sizes or give the Ihagnim some way to slowly nibble away meals too big to swallow. Maybe they can evert their stomach like a starfish and do low low amount of typeless damage per round of digestion?
Also, rereading the original monster it needed to consume 800 pounds of "living material" to gain a Hit Dice, suggesting our version would need to devour multiple Medium creatures per HD as a Medium sized being is usually in the 60-500 pound range, or maybe around 175 lb on average?
Better give this a bit more thought.