Eliminating maximum/minimum operations in loop bounds
Abstract
A technique is provided for eliminating maximum and minimum expressions within loop bounds are provided. A loop in a code is identified. The loop is determined to meet conditions, which require an upper loop bound and a lower loop bound to contain maximum and minimum expressions, loop-invariant operands, a predetermined size for a code size, and a total number of instructions to be greater than a predetermined constant. A profitability of loop versioning is determined based on a performance gain of a fast version of the loop, a probability of executing the fast version of the loop at runtime, and an overhead for performing loop versioning. A pair of lower loop bound and upper loop bound values resulting in a constant number is identified. A loop iteration value is checked to be a non-zero constant. Branches are identified, and loop versioning is performed to generate a versioned loop.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 21 · Forward citations: 3.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method for eliminating maximum and minimum expressions within loop bounds, the method comprising: identifying an unmodified loop in a code; determining whether the unmodified loop in the code meets conditions to be identified as a candidate for loop versioning, wherein meeting the conditions for the unmodified loop comprises: determining that an upper loop bound and a lower loop bound of the unmodified loop contain maximum and minimum expressions; determining that operands in the maximum and minimum expressions are loop-invariant in the unmodified loop, the operands being loop-invariant rela
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (3 of 3 total)
References Cited — Backward Prior Art (21)
Non-Patent Literature (5)
- "Array Bounds Check Elimination for the Java HotSpot(TM) Client Compiler", Thomas Würthinger,[online], 2007, pp. 125-133,[Retrieved from Internet on Jul. 22, 2011], .
- "Array Bounds Check Elimination for the Java HotSpot™ Client Compiler", Thomas Würthinger,[online], 2007, pp. 125-133,[Retrieved from Internet on Jul. 22, 2011], <URL: http://delivery.acm.org/10.1145/1300000/1294343/p125-wurthinger.pdf>.
- "Design and exploitation of a high-performance SIMD floating-point unit" , Catterfee S et al.[online], Mar. 2005,pp. 377-391, retrieved from Internet on Jul. 22, 2011 .
- "Design and exploitation of a high-performance SIMD floating-point unit" , Catterfee S et al.[online], Mar. 2005,pp. 377-391, retrieved from Internet on Jul. 22, 2011 <URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5388790>.
- "Efficient and Effective Array Bound Checking", Thi Viet Nganguyen et al., [online], 2005, pp. 527-570, Retrived from Internet on Jul. 22, 2011, .