{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,15]],"date-time":"2026-04-15T07:46:54Z","timestamp":1776239214681,"version":"3.50.1"},"reference-count":32,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2025,10,9]]},"abstract":"<jats:p>Just-in-time (JIT) compilers typically sacrifice the precision of program analysis for efficiency, but are capable of performing sophisticated speculative optimizations based on run-time profiles to generate code that is specialized to a given execution. On the contrary, ahead-of-time static compilers can often afford precise flow-sensitive interprocedural analysis, but produce conservative results in scenarios where higher precision could be derived from run-time specialization. In this paper, we propose the first-of-its-kind approach to enrich static analysis with the possibility of speculative optimization during JIT compilation, as well as its usage to perform aggressive stack allocation on a production Java Virtual Machine.<\/jats:p>\n          <jats:p>Our approach of combining static analysis with JIT speculation -- named CoSSJIT -- involves three key contributions. First, we identify the scenarios where a static analysis would make conservative assumptions but a JIT could deliver precision based on run-time speculation. Second, we present the notion of \"speculative conditions\" and plug them into a static interprocedural dataflow analyzer (whose aim is to identify heap objects that can be allocated on stack), to generate partial results that can be specialized at run-time. Finally, we extend a production JIT compiler to read and enrich static-analysis results with the resolved values of speculative conditions, leading to a practical approach that efficiently combines the best of both worlds. Cherries on the cake: Using CoSSJIT, we obtain 5.7x improvement in stack allocation (translating to performance), while building on a system that ensures functional correctness during JIT compilation.<\/jats:p>","DOI":"10.1145\/3763149","type":"journal-article","created":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T08:51:31Z","timestamp":1759999891000},"page":"2759-2785","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":3,"title":["CoSSJIT: Combining Static Analysis and Speculation in JIT Compilers"],"prefix":"10.1145","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-3752-3908","authenticated-orcid":false,"given":"Aditya","family":"Anand","sequence":"first","affiliation":[{"name":"Indian Institute of Technology Bombay, Mumbai, India"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-9342-4356","authenticated-orcid":false,"given":"Vijay","family":"Sundaresan","sequence":"additional","affiliation":[{"name":"IBM Canada Lab, Markham, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-8467-3270","authenticated-orcid":false,"given":"Daryl","family":"Maier","sequence":"additional","affiliation":[{"name":"IBM Canada Lab, Markham, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-0740-9701","authenticated-orcid":false,"given":"Manas","family":"Thakur","sequence":"additional","affiliation":[{"name":"Indian Institute of Technology Bombay, Mumbai, India"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2025,10,9]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/3656389"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","unstructured":"Aditya Anand Vijay Sundaresan Daryl Maier and Manas Thakur. 2025. Artifact of CoSSJIT: Combining Static Analysis and Speculation in JIT Compilers. https:\/\/doi.org\/10.5281\/zenodo.15762175 10.5281\/zenodo.15762175","DOI":"10.5281\/zenodo.15762175"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3763149"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","unstructured":"Aditya Anand and Manas Thakur. 2022. Principles of\u00a0Staged Static+Dynamic Partial Analysis. In Static Analysis Gagandeep Singh and Caterina Urban (Eds.). Springer Nature Switzerland Cham. 44\u201373. isbn:978-3-031-22308-2 https:\/\/doi.org\/10.1007\/978-3-031-22308-2_4 10.1007\/978-3-031-22308-2_4","DOI":"10.1007\/978-3-031-22308-2_4"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2019.11"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/3669940.3707217"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/1167473.1167488"},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/945885.945886"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/1985793.1985827"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3453483.3454034"},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/320384.320386"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/1449955.1449790"},{"key":"e_1_2_2_13_1","unstructured":"Gilles Duboscq. 2016. Combining Speculative Optimizations with Flexible Scheduling of Side-effects. Ph. D. Dissertation. Linz Austria. https:\/\/ssw.jku.at\/Teaching\/PhDTheses\/Duboscq\/index.html"},{"key":"e_1_2_2_14_1","unstructured":"Eclipse Foundation. 2023. Eclipse OpenJ9. https:\/\/www.eclipse.org\/openj9\/"},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3656394"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/3689803"},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/143095.143114"},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.1109\/CGO.2007.34"},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/2644805"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/3622839"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.5555\/3507788.3507812"},{"key":"e_1_2_2_22_1","unstructured":"OpenJDK Graal. 2023. GraalVM. https:\/\/www.graalvm.org"},{"key":"e_1_2_2_23_1","volume-title":"Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium -","volume":"1","author":"Paleczny Michael","year":"2001","unstructured":"Michael Paleczny, Christopher Vick, and Cliff Click. 2001. The Java HotspotTM Server Compiler. In Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium - Volume 1 (JVM\u201901). USENIX Association, USA. 1. https:\/\/www.usenix.org\/legacy\/events\/jvm01\/full_papers\/paleczny\/paleczny.pdf"},{"key":"e_1_2_2_24_1","unstructured":"SPEC. 2008. SPECjvm 2008. https:\/\/www.spec.org\/jvm2008\/"},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/2581122.2544157"},{"key":"e_1_2_2_26_1","unstructured":"Nikhil T R Dheeraj Yadav Aditya Anand and Manas Thakur. 2025. Stava. https:\/\/github.com\/CompL-Research\/Stava-Speculative"},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/3337794"},{"key":"e_1_2_2_28_1","doi-asserted-by":"publisher","DOI":"10.5555\/781995.782008"},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/378795.378804"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/320385.320400"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3486606.3488075"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/3360610"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3763149","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T17:42:20Z","timestamp":1760031740000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3763149"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,10,9]]},"references-count":32,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2025,10,9]]}},"alternative-id":["10.1145\/3763149"],"URL":"https:\/\/doi.org\/10.1145\/3763149","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,10,9]]},"assertion":[{"value":"2025-03-26","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-08-12","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-10-09","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}