[llvm-commits] [llvm] r108792 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp

Dale Johannesen dalej at apple.com
Tue Jul 20 11:04:44 PDT 2010


On Jul 19, 2010, at 7:01 PMPDT, Evan Cheng wrote:
>>
>>  const std::vector<MachineDomTreeNode*> &Children = N->getChildren();
>> -  for (unsigned I = 0, E = Children.size(); I != E; ++I)
>> -    HoistRegion(Children[I]);
>> +  // Don't hoist things out of a large switch statement.  This  
>> often causes
>> +  // code to be hoisted that wasn't going to be executed, and  
>> increases
>> +  // register pressure in a situation where it's likely to matter.
>> +  if (Children.size() < 10)
>
> How would this work? This doesn't seem like a good way to determine  
> if the loop body contains a switch statement.

You're right, I meant to count successors.  Fixing.




More information about the llvm-commits mailing list