mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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
This commit is contained in:
@@ -1970,7 +1970,7 @@ static void EmitBasicBlockLoopComments(const MachineBasicBlock &MBB,
|
||||
void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB) const {
|
||||
// Emit an alignment directive for this block, if needed.
|
||||
if (unsigned Align = MBB->getAlignment())
|
||||
EmitAlignment(Log2_32(Align));
|
||||
EmitAlignment(Align);
|
||||
|
||||
// If the block has its address taken, emit any labels that were used to
|
||||
// reference the block. It is possible that there is more than one label
|
||||
|
||||
Reference in New Issue
Block a user