Hi
I am trying to build a custom pass but i am facing a discrepancy in the
GimplePass and IpaPass,
My code in both cases is:
if isinstance(stmt, gcc.GimpleAssign):
if isinstance(stmt.lhs,gcc.VarDecl):
kill1.update([str(stmt.lhs)])
if isinstance(stmt.rhs[0],gcc.VarDecl):
gen1.update([str(stmt.rhs[0])])
if len(stmt.rhs) != 1 :
if isinstance(stmt.rhs[1],gcc.VarDecl):
gen1.update([str(stmt.rhs[1])])
This works fine in case of intraprocedural pass, but in case of
interprocedural pass the len(stmt.rhs) throws errors like,
if len(stmt.rhs) != 1 :
AttributeError: 'gcc.GimpleReturn' object has no attribute 'rhs'
or
if len(stmt.rhs) != 1 :
TypeError: object of type 'gcc.SsaName' has no len()
Please help me out. I can share the full code too if required.
Thanks