Use logarithmic units for basic block alignment.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 6 Dec 2011 01:26:19 +0000 (01:26 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 6 Dec 2011 01:26:19 +0000 (01:26 +0000)
commit8c741b8064f1116d8d8dc435b60b75abdf5c4d57
tree4ad27eb1d95c62f9033aade860c43aa272681b49
parent79df986c60094e9ea29f081295aea08b1680a999
Use logarithmic units for basic block alignment.

This was actually a bit of a mess. TLI.setPrefLoopAlignment was clearly
documented as taking log2(bytes) units, but the x86 target would still
set a preferred loop alignment of '16'.

CodePlacementOpt passed this number on to the basic block, and
AsmPrinter interpreted it as bytes.

Now both MachineFunction and MachineBasicBlock use logarithmic
alignments.

Obviously, MachineConstantPool still measures alignments in bytes, so we
can emulate the thrill of using as.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145889 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineBasicBlock.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/X86/X86ISelLowering.cpp