[llvm] r188881 - MC CFG: Split MCBasicBlocks to mirror atom splitting.

Ahmed Bougacha ahmed.bougacha at gmail.com
Wed Aug 21 02:41:49 PDT 2013


On Wed, Aug 21, 2013 at 2:39 AM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> 2013/8/21 Ahmed Bougacha <ahmed.bougacha at gmail.com>:
>> Author: ab
>> Date: Wed Aug 21 02:28:24 2013
>> New Revision: 188881
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=188881&view=rev
>> Log:
>> MC CFG: Split MCBasicBlocks to mirror atom splitting.
>>
>> When an MCTextAtom is split, all MCBasicBlocks backed by it are
>> automatically split, with a fallthrough between both blocks, and
>> the successors moved to the second block.
>>
>> Modified:
>>     llvm/trunk/include/llvm/MC/MCFunction.h
>>     llvm/trunk/include/llvm/MC/MCModule.h
>>     llvm/trunk/lib/MC/MCAtom.cpp
>>     llvm/trunk/lib/MC/MCFunction.cpp
>>     llvm/trunk/lib/MC/MCModule.cpp
>>
>> Modified: llvm/trunk/include/llvm/MC/MCFunction.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCFunction.h?rev=188881&r1=188880&r2=188881&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/MC/MCFunction.h (original)
>> +++ llvm/trunk/include/llvm/MC/MCFunction.h Wed Aug 21 02:28:24 2013
>> @@ -70,6 +70,14 @@ public:
>>
>>    void addPredecessor(const MCBasicBlock *MCBB);
>>    bool isPredecessor(const MCBasicBlock *MCBB) const;
>> +
>> +  /// \brief Split block, mirrorring NewAtom = Insts->split(..).
>> +  /// This moves all successors to \p SplitBB, and
>> +  /// adds a fallthrough to it.
>> +  /// \p SplitBB The result of splitting Insts, a basic block directly following
>> +  /// this basic block.
>> +  /// \returns A new basic block, backed by \p SplitBB.
>
> \returns should describe "return value of a function". Fixed in r188897.

Thanks for the fix!
-- Ahmed

> You may reproduce the warning with clang++ -Wdocumentation.
> Feel free to brush up descriptions.
>
>> +  void splitBasicBlock(MCBasicBlock *SplitBB);
>>    /// @}
>>  };



More information about the llvm-commits mailing list