Recent update: 2008-3-21
Hi, I was trying to run ProcTrace from the phoenix documentation with a sample managed C++ console application: Code Snippet //test.cpp #using <mscorlib.dll> #using <System.dll> using namespace System; int main(void) { Console::WriteLine("Hello"); return 0; } I ...
Hi...I need to instrument my code with a compiler instrinsic . I noticed that this instrinsic is replaced (inlined) with a set of instructions . One of these instructions has an Opcode which I couldn't find in the IR instruction opcode list. So,1. If I have to instrument the code with a ...
Hi, I am trying to instrument code into a managed C++ application. To start out, I tried to use the MTrace application which is part of the Phoenix package. My managed C++ application goes: Code Snippet // test.cpp #using <mscorlib.dll> #using <System.dll> using namespace ...
I am currently working on a fairly large and performance critical C# application. The main issue we face is that the current CLR JIT compiler does not do any significant inlining, especially when working with structs (Value Types) which are otherwise very helpful from a performance point of ...
I need to build a compiler that generate MSIL code. Can anyone help me? Is there a sample? Thanks a lot!!!
Hi, I am trying to inject code into a binary. The code to be injected passes a string from the binary to a function. This function contains the code that needs to be inserted after a particular point in the binary. I am trying to find instrumentation examples that show how this is done. The ...
Is there a documented approach to extracting the module information for an imported symbol when analyzing native IR? In particular, is there a way to retrieve this information from a specific CallInstruction (such as through the instruction's first source memory operand)? For example, a call ...
Apologies in advance if these issues have been discussed before. I did a brief search but wasn't able to come up with anything obvious on the forum or in the documentation. The issue I'm having centers around trying to construct SSA information against native functions. I have a feeling these ...
Hi,I want to create a class (Msil code) using Phoenix. For this, I used MsilTypeSymbol and AggregateType to represent the class type. And added fields and methods by using addField and addMethod. However, the code don′t work and the message below is shown: Code Snippet Phoenix Assertion ...
Hi, I am trying to read an instruction in a phase built on the MIR output. However this instruction is getting resized and only a part of it is being given to me when I do a writeline on the Instruction. Is there any way to maintain the true size and contents of my instruction. Thanks, Arjun ...
I do a lot of programming involving almost real-time signal processing on Windows. And it involves a lot of 64-bit integer values for different purposes ranging from bit fields and values that exceed the 32-bit integers range. Most of the of the problems when using 64-bit integers are related ...
<span>When I tried to run cl.exe from the command line, the error message I get is "Application unable to start, mspdb80.dll was not found".</span> <font face=Arial size=2>Can somebody help me with this problem? </font>
I need to build a compiler that generate MSIL code. Can anyone help me? Is there a sample? Thanks a lot!!!
Hi, I'm getting an assertion failure that I can't seem to track down. I wondered if you might be able to help me. I've enabled break on assertions, and it's breaking somewhere in PhaseList.DoPhaseList that I'm running over a ModuleUnit. This is the message: Phoenix Assertion Failure: ...
Hello! I am trying to get a list of arguments to the current function unit, as well as their types if possible. I thought I had figured out the rigtht way to do it, but it doesn't seem to be working. I created a new project in C# which is a phase right after typechecking. In the ...
I can′t download the new Phoenix SDK (July, 2007) . What is happening? thanks.
Hi, I am trying to read an instruction in a phase built on the MIR output. However this instruction is getting resized and only a part of it is being given to me when I do a writeline on the Instruction. Is there any way to maintain the true size and contents of my instruction. Thanks, Arjun ...
I do a lot of programming involving almost real-time signal processing on Windows. And it involves a lot of 64-bit integer values for different purposes ranging from bit fields and values that exceed the 32-bit integers range. Most of the of the problems when using 64-bit integers are related ...
Hello! I am trying to get a list of arguments to the current function unit, as well as their types if possible. I thought I had figured out the rigtht way to do it, but it doesn't seem to be working. I created a new project in C# which is a phase right after typechecking. In the ...
Hello. I was attempting to recreate the No op instrumentation tutorial with a instrumentation project of my own. However, every time I run the command-line program, I get the following exception: Phx.FatalError was unhandled When I use the debugger, it appears that the exception is coming ...
I am currently working on a fairly large and performance critical C# application. The main issue we face is that the current CLR JIT compiler does not do any significant inlining, especially when working with structs (Value Types) which are otherwise very helpful from a performance point of ...
I am curious to know the kind of optimizations that Phoenix performs. I do not see a phase which does this, nor a flag on the compiler to enable them.
Hi...I am relatively new to Phoenix. Can someone please clarify this :Here's what I am trying to do :I have a loop which has been identified after building the flow graph (as given in one of the tutorials). So I have the set of basic blocks which form a part of the loop. Now I need to add an ...
Hi, When a ldarg opcode is used to copy the value of a parameter onto the stack, I was expecting that the destination operand of this operation would be an alias of the parameter. So in the example code below, I was expecting tv270 to be an alias of stringVariable*, but it isn't. Code ...
hi i am using visual studio 2003. i have a problem while running the application. before compilation of my program the visual studio gui automatically closes. i have this problem for past 2 months. any body help me to solve this problem
hi, I wish to create a CFG in which each node consists of a a block of sequential statements [as opposed to the one node per statement that Phoenix builds on its own]. Is it better to create it from scratch ?, or manipulate the CFG built by Phoenix by merging nodes etc. For e.g, a program ...
Is it possible one program have multiple phases lists? Better, is it possible one program have multiple phaseconfigurations? Thanks!!!
Hi, I would like to run.. cl -c <filename.cpp> -d2plugin:c:\path on a C# project file. Eg: csc <filename.cs> -d2plugin:c:\path with the same effect. Is this possible? Thanks in Advance
Apologies in advance if these issues have been discussed before. I did a brief search but wasn't able to come up with anything obvious on the forum or in the documentation. The issue I'm having centers around trying to construct SSA information against native functions. I have a feeling these ...
I need to build a compiler that generate MSIL code. Can anyone help me? Is there a sample? Thanks a lot!!!
Hi, I was getting the exception: FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E) I was looking in all the wrong places to solve this, and as it turns out all you need to do is run visual studio using one of the "IDE for testing C2 ...
Hi,I was getting the exception:FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)I was looking in all the wrong places to solve this, and as it turns out all you need to do is run visual studio using one of the "IDE for testing C2 ...
I am curious to know the kind of optimizations that Phoenix performs. I do not see a phase which does this, nor a flag on the compiler to enable them.
Hi,I see there are some examples of dynamic slicing in Phoenix. Has any work been done on static slicing? I'm specifically looking for something similar to the paper "An improved slicer for Java" by Hammer et. al. I'm planning to try and implement a bare bones version of this ...
I want to know whether a operand is the destinationOperand of a NewCompareTemporary instruction or a NewBinaryExpression instruction . I tried to compare the operand′s type, but the result type, in both cases, is Int32. Is there another way? Code SnippetPhx.IR.Instruction instr = ...
I need to build a compiler that generate MSIL code. Can anyone help me? Is there a sample? Thanks a lot!!!
I've constructed a simple standalone Phoenix tool that "touches" a managed assembly. Essentially, it reads the PE module, raises the functions to LIR, encodes the LIR, and writes the PE module -- to my knowledge, I'm not changing anything in the IR or relevant tables.I've been ...
Is it possible to have a graph initialised within Execute() in a Phoenix plugin to persist even after the processing of the function unit in which it was initialized? I was trying something like Phx::Graphs::Graph^ dependency_graph = Phx::Graphs::Graph::New(functionUnit->ParentUnit);but it ...
I was trying to compile a particular C file with cl.exe without using any Phoenix plugin but I ran into Phoenix assertion failures like: Phoenix Assertion Failure: d:\phoenixrdkmarch2007\src\phx\ssa\ssa-check.cpp, Line 171useOperand->IsAssigned || ssaInfo->MustRenameLifetimes || ...
Is it possible to find out if a memory operand is associated with a struct and if it is then is it possible to find out the type of that struct? For example if we have the following code:typedef struct { int a; int b;} foo;void main(){ foo c; c.b = 5; }then in Phoenix HIR, it will look ...
How can I build a constant boolean? I tried to use ImmediateOperand to represent a constant boolean, but the method New don′t accept boolean parameter.
Thanks.
Is there a way to extract field information (such as enclosing type and field symbol) for a class field (static field) that is used as an operand to a value instruction? Extracting this information for instance fields is trivial (op.Field.EnclosingType and op.Field.FieldSymbol, respectively). ...
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->IsSafetyOptimized : Safety info ...
I try Control Flow Graph Add-in which I impor from src/samples/ControlFlowGraph-add-in directory into MSVS 2005. After build solution, how I can run the project? How can I see a CFG for a method shown in Figure 1 in the Walkthrough: VS Add-in - Control Flow Graph document? Thanks. ...
Hi Everyone,I have been trying to build a SSA graph for a functionUnit using functionUnit->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. ...
Hi,Here is a small problem I have been facing:I want to know the number of function units present in the parent module unit of the present function unit. So, when I do functionUnit->ParentModuleUnit->ChildUnits, I get the number of child units as zero. I will be really glad if someone ...
I try Control Flow Graph Add-in which I impor from src/samples/ControlFlowGraph-add-in directory into MSVS 2005. After build solution, how I can run the project? How can I see a CFG for a method shown in Figure 1 in the Walkthrough: VS Add-in - Control Flow Graph document? Thanks. ...
Hi Everyone, I have been trying to build a SSA graph for a functionUnit using functionUnit->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 ...
Why do I need to use the method NEW to create a new object on Phoenix instead for using the Class constructor? Thanks.