发明名称 Methods to optimize a program loop via vector instructions using a shuffle table and a blend table
摘要 According to one embodiment, a code optimizer is configured to receive first code having a program loop implemented with scalar instructions to store values of a first array to a second array based on values of a third array and to generate second code representing the program loop using at least one vector instruction. The second code include a shuffle instruction to shuffle elements of the first array based on the third array using a shuffle table in a vector manner, a blend instruction to blend the shuffled elements of the first array using a blend table in a vector manner, and a store instruction to store the blended elements of the first array in the second array.
申请公布号 US8984499(B2) 申请公布日期 2015.03.17
申请号 US201113997855 申请日期 2011.12.15
申请人 Intel Corporation 发明人 Uliel Tal;Ould-Ahmedvall Elmoustapha;Toll Bret T.
分类号 G06F9/44;G06F9/45;G06F9/30 主分类号 G06F9/44
代理机构 Blakely, Sokoloff, Taylor & Zafman LLP 代理人 Blakely, Sokoloff, Taylor & Zafman LLP
主权项 1. A computer-implemented method, comprising: receiving first code having a program loop implemented with scalar instructions to store values of a first array to a second array based on corresponding values of a third array, an address of the third array to be received from a caller of the program loop; and generating second code representing the program loop using at least one vector instruction, the second code including a shuffle instruction to shuffle elements of the first array based on corresponding elements of the third array using a shuffle table in parallel, including comparing elements of the third array with a predetermined threshold, generating a comparison result, andgenerating a mask based on the comparison result, the elements of the first array to be shuffled based on the mask,a blend instruction to blend the shuffled elements of the first array using a blend table in parallel, anda store instruction to store the blended elements of the first array in the second array.
地址 Santa Clara CA US