Optimal Shuffle Code with Permutation Instructions

نویسندگان

  • Sebastian Buchwald
  • Manuel Mohr
  • Ignaz Rutter
چکیده

During compilation of a program, register allocation is the task of mapping program variables to machine registers. During register allocation, the compiler may introduce shuffle code, consisting of copy and swap operations, that transfers data between the registers. Three common sources of shuffle code are conflicting register mappings at joins in the control flow of the program, e.g, due to if-statements or loops; the calling convention for procedures, which often dictates that input arguments or results must be placed in certain registers; and machine instructions that only allow a subset of registers to occur as operands. Recently, Mohr et al. [8] proposed to speed up shuffle code with special hardware instructions that arbitrarily permute the contents of up to five registers and gave a heuristic for computing such shuffle codes. In this paper, we give an efficient algorithm for generating optimal shuffle code in the setting of Mohr et al. An interesting special case occurs when no register has to be transferred to more than one destination, i.e., it suffices to permute the contents of the registers. This case is equivalent to factoring a permutation into a minimal product of permutations, each of which permutes up to five elements.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Interleaver Designwith Tensor Product and Perfect Shuffling for Sdr

Efficient implementation of bit-level matrix transpose operations using a new family of perfect shuffle instructions in a word-based micro-processor architecture is investigated. Using a tensor representation of the perfect shuffle index mapping, we show how bit matrix of arbitrary size may be transposed using a minimal sequence of shuffle and pack instructions, and prove the correctness of the...

متن کامل

Randomized Stopping Times and Provably Secure Pseudorandom Permutation Generators

Conventionally, key-scheduling algorithm (KSA) of a cryptographic scheme runs for predefined number of steps. We suggest a different approach by utilization of randomized stopping rules to generate permutations which are indistinguishable from uniform ones. We explain that if the stopping time of such a shuffle is a Strong Stationary Time and bits of the secret key are not reused then these alg...

متن کامل

A Public Shuffle without Private Permutations

In TCC 2007, Adida and Wikström proposed a novel approach to shuffle, called a public shuffle, in which a shuffler can perform shuffle publicly without needing information kept secret. Their scheme uses an encrypted permutation matrix to shuffle ciphertexts publicly. This approach significantly reduces the cost of constructing a mix-net to verifiable joint decryption. Though their method is suc...

متن کامل

The remoteness of the permutation code of the group $U_{6n}$

Recently, a new parameter of a code, referred to as the remoteness, has been introduced.This parameter can be viewed as a dual to the covering radius. It is exactly determined for the cyclic and dihedral groups. In this paper, we consider the group $U_{6n}$ as a subgroup of $S_{2n+3}$ and obtain its remoteness.  We show that the remoteness of the permutation code $U_{6n}$ is $2n+2$.  Moreover, ...

متن کامل

Generating SIMD Vectorized Permutations

This paper introduces a method to generate efficient vectorized implementations of small stride permutations using only vector load and vector shuffle instructions. These permutations are crucial for highperformance numerical kernels including the fast Fourier transform. Our generator takes as input only the specification of the target platform’s SIMD vector ISA and the desired permutation. The...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015