|
I have a function which sets up a stack frame for an This turns into reasonable LLIL/MLIL: However, the HLIL is not quite as useful: This is potentially a dupe/related to #1728. I think I understand why this happens: the stores aren't used in the function, so they are removed via dead store removal. My generic assumption around HLIL is that it should contain all info that is relevant to understanding what a program is doing -- in this specific case for example the fact that the structure lives on the stack is not relevant to HLIL, but a structure being populated is. I'm unsure what, if anything, should change about this and I can think of a few options that might help solve this problem:
|
Replies: 3 comments
|
That function doesn't tear down a stack frame. I don't think those stores should be marked as dead. |
|
My preferred option would be if we were to somehow detect conditions where HLIL isn't going to make much sense (e.g. things that are hand rolled assembly) and show a lower level of IL. As of right now we don't have a good idea on what that kind of detection would look like. Unfortunately I don't think we'll have a great solution here for some time yet. There are some things that we could do to help with errant elimination of dead stack stores. |
|
Dead store elimination visualization fixes this! Thanks all. |
Dead store elimination visualization fixes this! Thanks all.