Problems about insert a call in MIR Lower Phase
When I try to insert a call in MIR Lower phase, the compile process failed.
The message is follows:
Phoenix Assertion Failure: d:\phoenixrdkmarch2007\src\phx\ir\ir-safety.cpp, Line
2183
(this->Opcode->Exceptions == Safety::Exceptions::None) || this->IsSafetyOptimi
zed : Safety info missing on instruction
CALL __imp__testcall,&?p@@3HA, 4, 761(0x000002f9) #23
and sometimes, here's another associated assertion like follows:
Phoenix Assertion Failure:
d:\phoenixrdkmarch2007\src\phx\eh\eh.cpp, Line 259
isChanged == false : Instruction didn't have a handler label
CALL __imp__testcall, tv423-, 8, 705(0x000002c1), $L5(EH)
Noted these problems seems only occured when there are exception handling in the source code(such as try...catch...), I think it may be something wrong with the SafeTag and the ExceptionHandler.
My code is like this:
//Is it right to set safetyTag like this?
Phx.Safety.Tag safetyTag = funcUnit.SafetyInfo.SafeTag;
Phx.IR.MemoryOperand opndCallTgt = Phx.IR.MemoryOperand.New
(funcUnit,funcSym.Type,funcSym, null,0,align, funcUnit.AliasInfo.NotAliasedMemoryTag, safetyTag);
Phx.IR.CallInstruction callInstr = Phx.IR.CallInstruction.New(funcUnit, Phx.Common.Opcode.Call, opndCallTgt);
//Should I set the EHHandler? And which value I should set?
Thanks very much.

