{"id":7084,"date":"2012-01-31T23:00:47","date_gmt":"2012-01-31T21:00:47","guid":{"rendered":"http:\/\/hgpu.org\/?p=7084"},"modified":"2012-01-31T23:00:47","modified_gmt":"2012-01-31T21:00:47","slug":"decompilation-of-llvm-ir","status":"publish","type":"post","link":"https:\/\/hgpu.org\/?p=7084","title":{"rendered":"Decompilation of LLVM IR"},"content":{"rendered":"<p>Recently, in many important domains, high-level languages have become the code representations with widest platform support surpassing any low-level language in their area with respect to completeness and importance as exchange format (e.g. OpenCL for data-parallel computing, GLSL\/HLSL for shader programs, JavaScript for the web). The code representations of many actively-developed compiler frameworks [JVM,LLVM,FIRM] are designed for generating low-level machine code. They do, however, offer a broad range of language front-ends and program optimizations. In the scope of this thesis, we implemented a backend that decompiles the intermediate representation (IR) of the Low-Level Virtual Machine (LLVM) framework into a high-level code representation. The approach taken preserves functional program semantics and uses program transformations such as Controlled Node Splitting to restructure arbitrary Control-Flow Graphs. We implemented backends for both OpenCL and GLSL programs, that can decompile LLVM-Bitcode with some constraints (mostly due to unsupported data-types). The final evaluation shows that the performance of decompiled OpenCL matches that of reference OpenCL programs in most cases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, in many important domains, high-level languages have become the code representations with widest platform support surpassing any low-level language in their area with respect to completeness and importance as exchange format (e.g. OpenCL for data-parallel computing, GLSL\/HLSL for shader programs, JavaScript for the web). The code representations of many actively-developed compiler frameworks [JVM,LLVM,FIRM] are [&hellip;]<\/p>\n","protected":false},"author":351,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[11,90,3],"tags":[215,955,1782,187,114,946,20,466,1793,298,390],"class_list":["post-7084","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-opencl","category-paper","tag-code-generation","tag-compilers","tag-computer-science","tag-glsl","tag-hlsl","tag-java","tag-nvidia","tag-nvidia-geforce-9600-gt","tag-opencl","tag-optimization","tag-thesis"],"views":3442,"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts\/7084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/users\/351"}],"replies":[{"embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7084"}],"version-history":[{"count":0,"href":"https:\/\/hgpu.org\/index.php?rest_route=\/wp\/v2\/posts\/7084\/revisions"}],"wp:attachment":[{"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hgpu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}