Skip to content
Commit d2c1bf63 authored by Rui Ueyama's avatar Rui Ueyama
Browse files

Add a scaffolding to merge alignment representations.

We are using log2 values and values themselves to represent alignments.
For example, alignment 8 is sometimes represented as 3 (8 == 2^3).
We want to stop using log2 values.

Because both types are regular arithmetic types, we cannot get help from
a compiler to find places we mix two representations. That makes this
merging work surprisingly hard because if I make a mistake, I'll just get
wrong results at runtime (Yay types!). In this patch, I introduced
a class to represents power-of-two values, which is basically an alias
for an integer type.

Once the migration is done, the class will be removed.

llvm-svn: 233232
parent 1c140739
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment