Method for optimizing creation and destruction of objects in computer programs
    21.
    发明授权
    Method for optimizing creation and destruction of objects in computer programs 失效
    优化计算机程序中对象的创建和破坏的方法

    公开(公告)号:US06381738B1

    公开(公告)日:2002-04-30

    申请号:US09354140

    申请日:1999-07-16

    IPC分类号: G06F945

    摘要: Information is computed about the reachability relationships among objects and pointers to enable transformation of a computer program for optimizing the creation and destruction of objects, while strictly performing the semantics of the original program. An interprocedural analysis is used to determine whether an object that is allocated on the heap during the execution of a procedure is not reachable from any global variable, parameter, or the return value of the procedure after it returns. If so, that object can be allocated on the stack frame of the procedure in which it is otherwise heap-allocated. This simplifies the memory allocation and deallocation operations, as allocation on the stack can be done more efficiently than allocation on the heap, and objects allocated on the stack frame of a procedure are automatically deallocated when the procedure returns, without incurring the overhead of garbage collection. This, in turn, leads to faster programs which use fewer computer processor resources to execute. The interprocedural analysis of the program summarizes the effect of a procedure call succinctly for different calling contexts of the procedure using a single summary representation. The method handles exceptions in the programming language, while taking advantage of the information about the visibility of variables in the exception handler. Variants of the method show how one or several of the features of the method may be performed.

    摘要翻译: 计算关于对象和指针之间的可达性关系的信息,以便在严格执行原始程序的语义的同时,实现用于优化对象的创建和销毁的计算机程序的转换。 过程间分析用于确定在执行过程期间在堆上分配的对象是否从任何全局变量,参数或过程返回后的返回值无法访问。 如果是这样,那么该对象可以分配给过程的堆栈帧,否则它将以堆分配。 这简化了内存分配和释放操作,因为堆栈上的分配可以比堆上的分配更有效地完成,并且当过程返回时,分配给过程的堆栈帧的对象将自动释放,而不会产生垃圾回收的开销 。 这反过来导致更快的程序,使用较少的计算机处理器资源来执行。 程序的程序间分析使用单个摘要表示简要地描述了对程序的不同调用上下文的简单过程调用的影响。 该方法处理编程语言中的异常,同时利用有关异常处理程序中变量可见性的信息。 该方法的变体显示了如何执行该方法的一个或多个特征。

    Method and system for eliminating phi instruction resource interferences and redundant copy instructions from static-single-assignment-form computer code
    22.
    发明授权
    Method and system for eliminating phi instruction resource interferences and redundant copy instructions from static-single-assignment-form computer code 有权
    用于从静态单指派形式的计算机代码中消除phi指令资源干扰和冗余复制指令的方法和系统

    公开(公告)号:US06182284B2

    公开(公告)日:2001-01-30

    申请号:US09163677

    申请日:1998-09-30

    IPC分类号: G06F945

    CPC分类号: G06F8/433 G06F8/443

    摘要: A method and system for detecting and eliminating interferences between resources in SSA-form &phgr;-instructions so that an optimizing compiler can translate optimized SSA-form code back to non-SSA-form code. The method traverses the control flow graph associated with an SSA-form program or routine in order to analyze each &phgr;-instruction within the SSA-form program or routine. All possible pairs of resources associated with each &phgr;-instruction are analyzed for interference. Once all interferences have been detected, the method inserts copy instructions into the SSA-form intermediate-level code program or routine in order to eliminate the interferences.

    摘要翻译: 一种用于检测和消除SSA形式phi指令中的资源之间的干扰的方法和系统,使得优化编译器可以将优化的SSA形式代码转换回非SSA形式代码。 该方法遍历与SSA形式程序或程序相关联的控制流程图,以便分析SSA形式程序或程序中的每个phi指令。 分析与每个phi指令相关联的所有可能的资源对以进行干扰。 一旦检测到所有干扰,该方法将复制指令插入到SSA形式的中间级代码程序或例程中,以消除干扰。