On Wed, Jul 15, 2020 at 10:07 AM Shuai Wang via Gcc <gcc@gcc.gnu.org> wrote: > > Hello! > > Thank you very much. I use the following statement to check and I confirm > that it's not SSA_NAME: > > if (TREE_CODE(operand) != SSA_NAME) return; > > But considering the following code snippet: > > _313 = _312 + 2147450880; > _314 = (signed char *) _313; > _315 = **_314*; // _314 is NOT a SSA_NAME > > I was using the SSA_NAME_DEF_STMT here and there but right now since it > does not work, how can I backwardly track the dependency of the above code > snippet? Basically given _314, I would like to backwardly collect _313, > _312, ..., until constructing the entire data dependency of _314...? Thanks > a lot!
GCC has a powerful data dependency infrastructure. Why are you trying to duplicate that / recreate that yourself? If you want to learn how to inquire about the data dependency for the statement, please ask that explicitly. I think that maybe your real question is being lost because you are asking details about the symptoms of the crash instead of asking how to use the GCC internal APIs to obtain the real information that you want. If you want to know how to obtain the data dependency for a statement, please ask that, not "why is this crashing". Thanks David