SSA graph construction

Hi Everyone,

I have been trying to build a SSA graph for a functionUnit usingfunctionUnit->SsaInfo->Build(); but I keep encountering

a Phoenix assertion failure. I want to build this graph so that I can access the definition instructions for the source operands for

certain instructions. Can someone please help me out with this?

Thanks a lot!

[445 byte] By [phoenix_newbie] at [2008-2-4]
# 1

The UninitializedLocal sample has an example of how to build SSA, but here's an overview in C++ syntax.

First, you need to make sure there is an SSA::Info object on the functionUnit. Usually there won't be one -- this is possibly the bug you are running into.

Code Snippet

if (!functionUnit->SsaInfo)

{

functionUnit->SsaInfo = Phx::SSA::Info::New(functionUnit->Lifetime, functionUnit,

Phx::SSA::Attribute::NotAliasedScalars);

}

Then, use the SSA::Info object to build SSA:

Code Snippet
functionUnit->SsaInfo->Build();

Then, use the SSA data for your analysis (details omitted for now -- we can revisit when you get SSA built for your function).

Finally, delete SSA and if your phase created the info object, delete it:

Code Snippet

functionUnit->SsaInfo->Delete();

functionUnit->SsaInfo = nullptr;

AndyAyers-MSFT at 2007-10-3 > top of Msdn Tech,Visual Studio,Phoenix...
# 2
Thanks! This helps.
phoenix_newbie at 2007-10-3 > top of Msdn Tech,Visual Studio,Phoenix...

Visual Studio

Site Classified