Simulation-based code duplication

    公开(公告)号:US10338903B2

    公开(公告)日:2019-07-02

    申请号:US15927852

    申请日:2018-03-21

    Abstract: A method for analyzing a program may include generating an initial control flow graph (CFG) for the program, identifying merge blocks of the initial CFG, identifying predecessor-merge pairs based on identifying predecessor blocks for each merge block, simulating a duplication of each predecessor-merge pair, determining whether the duplication satisfies a precondition of each of a collection of optimizations, applying, in response to satisfying the precondition, the optimization to the duplication, and generating a simulation result for the predecessor-merge pair corresponding to the duplication. The simulation result may include the optimization and a benefit of applying the optimization to the duplication. The method may further include duplicating, in the initial CFG, a predecessor-merge pair based on the simulation result corresponding to the predecessor-merge pair.

    Speculative object shapes
    2.
    发明授权
    Speculative object shapes 有权
    投机对象形状

    公开(公告)号:US09229697B2

    公开(公告)日:2016-01-05

    申请号:US13931475

    申请日:2013-06-28

    CPC classification number: G06F9/45508 G06F8/41 G06F8/433 G06F8/443 G06F9/4552

    Abstract: A method for speculative object shapes comprises obtaining values for objects of a first and second shape, determining, by a processor and during runtime, a first speculative type for the first value and a second speculative type for the second value, generating, based on the first speculative type and the second speculative type, a shape tree comprising a first subtree for the first shape and a second subtree for the second shape, marking, by the processor, the first subtree as obsolete based on a determination that the first speculative type is incorrect and that the second shape is a super shape of the first shape, and transforming, in response to marking, the first object from the first shape to the second shape by: merging the first subtree into the second subtree.

    Abstract translation: 用于推测对象形状的方法包括获得第一和第二形状的对象的值,由处理器和运行时期期间确定第一值的第一推测类型和第二值的第二推测类型,基于 第一投机类型和第二投机类型,包括用于第一形状的第一子树和第二形状的第二子树的形状树,由处理器基于第一推测类型为 并且第二形状是第一形状的超形状,并且通过以下方式将第一对象从第一形状转换成第二形状:将第一对象合并到第二子树中。

    Self-optimizing interpreter and snapshot compilation
    3.
    发明授权
    Self-optimizing interpreter and snapshot compilation 有权
    自我优化解释器和快照编译

    公开(公告)号:US08930920B2

    公开(公告)日:2015-01-06

    申请号:US13731698

    申请日:2012-12-31

    CPC classification number: G06F9/45508 G06F8/41 G06F8/433 G06F8/443 G06F9/4552

    Abstract: A method for a compiler includes receiving, by the compiler and from an interpreter, a representation of a code section having a control path that changes the representation. The representation has profiling data, and the profiling data has a threshold. The method further includes performing, by the compiler and based on the threshold, a partial evaluation of the interpreter executing the representation, compiling, by the compiler, a machine code of the representation, with the control path replaced by a deoptimization point during the compilation of the machine code, triggering the deoptimization point during execution of the machine code, and returning execution to the interpreter based on the triggering.

    Abstract translation: 一种用于编译器的方法包括由编译器和解释器接收具有改变表示的控制路径的代码段的表示。 该表示具有分析数据,并且分析数据具有​​阈值。 该方法进一步包括由编译器和基于阈值执行执行该表示的解释器的部分评估,由编译器编译表示的机器代码,在编译期间将控制路径替换为去优化点 的机器代码,在执行机器代码期间触发去优化点,并且基于触发将执行返回到解释器。

    Optimized recompilation using hardware tracing

    公开(公告)号:US11347617B2

    公开(公告)日:2022-05-31

    申请号:US16672319

    申请日:2019-11-01

    Abstract: A tracing controller may utilize a binary execution trace mechanism to trace execution of compiled application machine code. The tracing controller may initiate hardware tracing to gather control-flow hardware traces of a method executing on a processor configured to generate hardware tracing information. The controller may generate a profile based on the hardware tracing information and initiate re-compiling or re-optimizing of the method in response to determining that the new profile differs from the previous profile. The controller may repeatedly profile and re-optimize a method until profiles for the method stabilize. Profiling and hardware tracing of an application may be selectively enabled or disabled allowing the controller to respond to later phase changes in application execution by re-optimizing, thereby potentially improving overall application performance.

    SIMULATION-BASED CODE DUPLICATION
    5.
    发明申请

    公开(公告)号:US20190272160A1

    公开(公告)日:2019-09-05

    申请号:US16413807

    申请日:2019-05-16

    Abstract: A method for analyzing a program may include generating an initial control flow graph (CFG) for the program, identifying merge blocks of the initial CFG, identifying predecessor-merge pairs based on identifying predecessor blocks for each merge block, simulating a duplication of each predecessor-merge pair, determining whether the duplication satisfies a precondition of each of a collection of optimizations, applying, in response to satisfying the precondition, the optimization to the duplication, and generating a simulation result for the predecessor-merge pair corresponding to the duplication. The simulation result may include the optimization and a benefit of applying the optimization to the duplication. The method may further include duplicating, in the initial CFG, a predecessor-merge pair based on the simulation result corresponding to the predecessor-merge pair.

    EAGER AND OPTIMISTIC EVALUATION OF PROMISES
    6.
    发明申请
    EAGER AND OPTIMISTIC EVALUATION OF PROMISES 有权
    EAGER和优惠评估

    公开(公告)号:US20160117157A1

    公开(公告)日:2016-04-28

    申请号:US14690592

    申请日:2015-04-20

    CPC classification number: G06F8/443 G06F8/41 G06F8/4441 G06F8/53

    Abstract: The invention relates to a method for generating executable code from application source code. The method steps include determining a programmatic expression using the application source code and determining a first value for the programmatic expression. The method steps further include compiling the programmatic expression into a first optimized code portion using the first value, an assumption, and an expression scope. The method steps further include executing the application source code. The method steps further include determining that the programmatic expression is modified outside of the expression scope, invalidating the assumption, and de-optimizing the first optimized code portion.

    Abstract translation: 本发明涉及从应用源代码生成可执行代码的方法。 所述方法步骤包括使用所述应用源代码来确定编程表达式并且确定所述编程表达式的第一值。 方法步骤还包括使用第一值,假设和表达范围将编程表达式编译成第一优化代码部分。 方法步骤还包括执行应用源代码。 所述方法步骤还包括确定所述编程表达式在所述表达范围之外被修改,使所述假设无效,以及对所述第一优化代码部分进行去优化。

    Speculative object representation
    7.
    发明授权
    Speculative object representation 有权
    投机对象表示

    公开(公告)号:US09235433B2

    公开(公告)日:2016-01-12

    申请号:US14061677

    申请日:2013-10-23

    CPC classification number: G06F9/45508 G06F8/41 G06F8/433 G06F8/443 G06F9/4552

    Abstract: A method for optimizing code includes receiving, by a compiler and from an interpreter, a code section representation including an object allocation, compiling, by the compiler, the code section representation into machine code with a compact allocated object of the object allocation, and triggering a deoptimization returning execution to the interpreter in response to an attempted access of the compact allocated object. The method further includes setting, by the interpreter and within the code section representation, a flag indicating that a new compact allocated object is required at a location of the attempted access, receiving, by the compiler, the code section representation including the flag, compiling, by the compiler and according to the flag, the code section representation into new machine code including the new compact allocated object, and executing the new machine code with the new compact allocated object.

    Abstract translation: 一种用于优化代码的方法包括由编译器和解释器接收包括对象分配的代码段表示,由编译器将代码段表示编译成具有对象分配的紧凑分配对象的机器代码,以及触发 响应于对紧凑分配对象的尝试访问而将执行返回到解释器的去优化。 该方法还包括由解释器在代码段表示内设置指示在尝试访问的位置需要新的紧凑分配对象的标志,由编译器接收包括标志的代码段表示,编译 ,由编译器根据标志,将代码段表示成包括新的紧凑分配对象的新机器代码,并用新的紧凑分配对象执行新的机器代码。

    CHANGING DE-OPTIMIZATION GUARD REPRESENTATION DURING THE COMPILATION PROCESS
    8.
    发明申请
    CHANGING DE-OPTIMIZATION GUARD REPRESENTATION DURING THE COMPILATION PROCESS 有权
    在编译过程中更改优化保护代表

    公开(公告)号:US20150227351A1

    公开(公告)日:2015-08-13

    申请号:US14175776

    申请日:2014-02-07

    CPC classification number: G06F8/443 G06F8/54

    Abstract: A method for compiling code includes receiving a code section representation including a guard at a location, placing, at the guard, a triggering condition, and relocating the guard from the location to a second location in the code section representation. The method also includes transforming the guard into a control-split instruction. The control-split instruction includes a deoptimization branch and a continue execution branch. The method further includes placing, at the guard, a deoptimization instruction, and selecting a symbolic frame state linked to a side-effecting instruction. The side-effecting instruction is the last side-effecting instruction before the control-split instruction. The method also includes linking the deoptimization instruction with the symbolic frame state based on the symbolic frame state being linked to the side-effecting instruction, unlinking the symbolic frame state from the side-effecting instruction, and storing the code section representation.

    Abstract translation: 一种用于编译代码的方法包括:在代码段表示中接收包括在位置处的保护的代码段表示,在所述保护处放置触发条件,以及将所述保护从所述位置重新定位到第二位置。 该方法还包括将防卫变换为控制分离指令。 控制分离指令包括去优化分支和继续执行分支。 所述方法还包括在所述保护装置处放置去优化指令,以及选择链接到副作用指令的符号帧状态。 副作用指令是控制分离指令之前的最后一个副作用指令。 该方法还包括:基于与副作用指令链接的符号帧状态,将去最优化指令与符号帧状态相链接,解除与副作用指令的符号帧状态的关联,以及存储代码段表示。

    OPTIMIZED RECOMPILATION USING HARDWARE TRACING

    公开(公告)号:US20220283925A1

    公开(公告)日:2022-09-08

    申请号:US17804288

    申请日:2022-05-26

    Abstract: A tracing controller may utilize a binary execution trace mechanism to trace execution of compiled application machine code. The tracing controller may initiate hardware tracing to gather control-flow hardware traces of a method executing on a processor configured to generate hardware tracing information. The controller may generate a profile based on the hardware tracing information and initiate re-compiling or re-optimizing of the method in response to determining that the new profile differs from the previous profile. The controller may repeatedly profile and re-optimize a method until profiles for the method stabilize. Profiling and hardware tracing of an application may be selectively enabled or disabled allowing the controller to respond to later phase changes in application execution by re-optimizing, thereby potentially improving overall application performance.

    Optimized recompilation using hardware tracing

    公开(公告)号:US10466986B2

    公开(公告)日:2019-11-05

    申请号:US15994967

    申请日:2018-05-31

    Abstract: A tracing controller may utilize a binary execution trace mechanism to trace execution of compiled application machine code. The tracing controller may initiate hardware tracing to gather control-flow hardware traces of a method executing on a processor configured to generate hardware tracing information. The controller may generate a profile based on the hardware tracing information and initiate re-compiling or re-optimizing of the method in response to determining that the new profile differs from the previous profile. The controller may repeatedly profile and re-optimize a method until profiles for the method stabilize. Profiling and hardware tracing of an application may be selectively enabled or disabled allowing the controller to respond to later phase changes in application execution by re-optimizing, thereby potentially improving overall application performance.

Patent Agency Ranking