[llvm] r179353 - Add a flag to align all basic blocks in the function.

Chandler Carruth chandlerc at google.com
Thu Apr 11 18:04:25 PDT 2013


On Thu, Apr 11, 2013 at 5:58 PM, Nadav Rotem <nrotem at apple.com> wrote:

> It aligns all blocks to a specific alignment. Do you prefer a different
> name ?
>

No, I understand why it is adding alignment, I'm asking why it also returns
before actually doing any block layout... For example, this won't fix loop
layout or anything else. It will *only* change the alignment.

There is already a loop in the block layout code that does some alignment,
I would naively expected this flag to be implemented by changing that logic.


>
> On Apr 11, 2013, at 5:57 PM, Chandler Carruth <chandlerc at google.com>
> wrote:
>
>
> On Thu, Apr 11, 2013 at 5:48 PM, Nadav Rotem <nrotem at apple.com> wrote:
>
>> +  if (AlignAllBlock) {
>> +    // Align all of the blocks in the function to a specific alignment.
>> +    for (MachineFunction::iterator FI = F.begin(), FE = F.end();
>> +         FI != FE; ++FI)
>> +      FI->setAlignment(AlignAllBlock);
>> +    return true;
>> +  }
>> +
>>    buildCFGChains(F);
>>
>
>
> Huh? This turns of block layout altogether, which seems rather surprising
> for a flag called "align-all-blocks".
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130411/19070d43/attachment.html>


More information about the llvm-commits mailing list