vex: r3314 - in /branches/VEX_JIT_HACKS: priv/ir_defs.c pub/libvex_ir.h

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

vex: r3314 - in /branches/VEX_JIT_HACKS: priv/ir_defs.c pub/libvex_ir.h

svn-2
Author: iraisr
Date: Mon Mar 13 10:30:32 2017
New Revision: 3314

Log:
Small refinement in VEX IR interface

Modified:
    branches/VEX_JIT_HACKS/priv/ir_defs.c
    branches/VEX_JIT_HACKS/pub/libvex_ir.h

Modified: branches/VEX_JIT_HACKS/priv/ir_defs.c
==============================================================================
--- branches/VEX_JIT_HACKS/priv/ir_defs.c (original)
+++ branches/VEX_JIT_HACKS/priv/ir_defs.c Mon Mar 13 10:30:32 2017
@@ -3675,16 +3675,8 @@
 /*--- Helper functions for the IR -- IR Phi Nodes             ---*/
 /*---------------------------------------------------------------*/
 
-void addIRPhi(IRStmt* st, IRPhi* phi)
+void addIRPhiToIRPhiVec(IRPhiVec* phi_nodes, IRPhi* phi)
 {
-   vassert(st->tag == Ist_IfThenElse);
-
-   IRPhiVec* phi_nodes = st->Ist.IfThenElse.phi_nodes;
-   if (phi_nodes == NULL) {
-      phi_nodes = emptyIRPhiVec();
-      st->Ist.IfThenElse.phi_nodes = phi_nodes;
-   }
-
    if (phi_nodes->phis_used == phi_nodes->phis_size) {
       IRPhi** phis2 = LibVEX_Alloc_inline(2 * phi_nodes->phis_size * sizeof(IRPhi*));
       for (UInt i = 0; i < phi_nodes->phis_size; i++)

Modified: branches/VEX_JIT_HACKS/pub/libvex_ir.h
==============================================================================
--- branches/VEX_JIT_HACKS/pub/libvex_ir.h (original)
+++ branches/VEX_JIT_HACKS/pub/libvex_ir.h Mon Mar 13 10:30:32 2017
@@ -2760,12 +2760,14 @@
    IRPhiVec;
 
 extern void ppIRPhi(const IRPhi*);
-extern IRPhi* mkIRPhi(IRTemp, IRTemp, IRTemp);
+extern IRPhi* mkIRPhi(IRTemp dst, IRTemp srcThen, IRTemp srcElse);
 extern IRPhi* deepCopyIRPhi(const IRPhi*);
 extern void ppIRPhiVec(const IRPhiVec*);
 extern IRPhiVec* emptyIRPhiVec(void);
 extern IRPhiVec* deepCopyIRPhiVec(const IRPhiVec*);
 
+extern void addIRPhiToIRPhiVec(IRPhiVec* , IRPhi*);
+
 
 /* ------------------ Type Environments ------------------ */
 
@@ -3151,9 +3153,6 @@
 /* Pretty-print an IRStmt. */
 extern void ppIRStmt ( const IRStmt* );
 
-/* Adds a phi node to IfThenElse statement. */
-extern void addIRPhi(IRStmt* , IRPhi*);
-
 /* ------------------ Basic Blocks ------------------ */
 
 /* Code blocks, which in proper compiler terminology are superblocks


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Loading...