Remove constants from constant manager in KillInst
Registering a constant in constant manager establishes a relation between instruction that defined it and constant object. On complex shaders this could result in the constant definition getting removed as part of one of the DCE pass, and a subsequent simplification pass trying to use the defining instruction for the constant. To fix this, we now remove associated constant entries from constant manager when killing constant instructions; the constant object is still registered and can be remapped to a new instruction later. GetDefiningInstruction shouldn't ever return nullptr after this change so add an assertion to check for that.
Loading
Please register or sign in to comment