[llvm-commits] [llvm] r89297 - in /llvm/trunk: include/llvm/Transforms/Utils/Local.h lib/Transforms/Utils/SimplifyCFG.cpp

Jim Grosbach grosbach at apple.com
Wed Dec 2 09:07:53 PST 2009


On Dec 1, 2009, at 11:31 PM, Chris Lattner wrote:

>
> On Nov 18, 2009, at 6:02 PM, Jim Grosbach wrote:
>
>> Author: grosbach
>> Date: Wed Nov 18 20:02:10 2009
>> New Revision: 89297
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=89297&view=rev
>> Log:
>> Make EliminateDuplicatePHINodes() available as a utility function
>
> Hi Jim,
>
> Please move this function out to 'lib/Transforms/Utils/Local.cpp'.   
> SimplifyCFG.cpp should just have the simplifycfg entrypoint.

OK. Done in r90324.

> -Chris
>
>>
>> Modified:
>>   llvm/trunk/include/llvm/Transforms/Utils/Local.h
>>   llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
>>
>> Modified: llvm/trunk/include/llvm/Transforms/Utils/Local.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/Local.h?rev=89297&r1=89296&r2=89297&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm/trunk/include/llvm/Transforms/Utils/Local.h (original)
>> +++ llvm/trunk/include/llvm/Transforms/Utils/Local.h Wed Nov 18  
>> 20:02:10 2009
>> @@ -107,7 +107,14 @@
>> /// rewriting all the predecessors to branch to the successor block  
>> and return
>> /// true.  If we can't transform, return false.
>> bool TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB);
>> -
>> +
>> +/// EliminateDuplicatePHINodes - Check for and eliminate duplicate  
>> PHI
>> +/// nodes in this block. This doesn't try to be clever about PHI  
>> nodes
>> +/// which differ only in the order of the incoming values, but  
>> instcombine
>> +/// orders them so it usually won't matter.
>> +///
>> +bool EliminateDuplicatePHINodes(BasicBlock *BB);
>> +
>> /// SimplifyCFG - This function is used to do simplification of a  
>> CFG.  For
>> /// example, it adjusts branches to branches to eliminate the extra  
>> hop, it
>> /// eliminates unreachable basic blocks, and does other "peephole"  
>> optimization
>>
>> Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=89297&r1=89296&r2=89297&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
>> +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed Nov 18  
>> 20:02:10 2009
>> @@ -1594,7 +1594,7 @@
>> /// which differ only in the order of the incoming values, but  
>> instcombine
>> /// orders them so it usually won't matter.
>> ///
>> -static bool EliminateDuplicatePHINodes(BasicBlock *BB) {
>> +bool llvm::EliminateDuplicatePHINodes(BasicBlock *BB) {
>>  bool Changed = false;
>>
>>  // This implementation doesn't currently consider undef operands
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list