[llvm] r176136 - Have a way for a target to opt-out of target-independent fast isel

Michael Ilseman milseman at apple.com
Tue Feb 26 20:37:30 PST 2013


On Feb 26, 2013, at 3:30 PM, Eli Bendersky <eliben at google.com> wrote:

> Can you provide more background for this change? Is it being done for
> the sake of debugging? What are the intended use cases?
> 

Sure! Debugging can definitely be improved by this, but this also gives targets more flexibility. Targets can fast-isel better code with more coverage in some situations. For example, SelectOperator(), even when it returns false, has side-effects and can schedule IR instructions to be fast-iselled that otherwise never would. This becomes particularly unfortunate when such instructions trigger the DAG slow-path.

> On Tue, Feb 26, 2013 at 3:15 PM, Michael Ilseman <milseman at apple.com> wrote:
>> Author: milseman
>> Date: Tue Feb 26 17:15:23 2013
>> New Revision: 176136
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=176136&view=rev
>> Log:
>> Have a way for a target to opt-out of target-independent fast isel
>> 
>> Modified:
>>    llvm/trunk/include/llvm/CodeGen/FastISel.h
>>    llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
>> 
>> Modified: llvm/trunk/include/llvm/CodeGen/FastISel.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/FastISel.h?rev=176136&r1=176135&r2=176136&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/CodeGen/FastISel.h (original)
>> +++ llvm/trunk/include/llvm/CodeGen/FastISel.h Tue Feb 26 17:15:23 2013
>> @@ -372,6 +372,11 @@ protected:
>>     return 0;
>>   }
>> 
>> +  /// Whether we should skip target-independent fast-isel
>> +  virtual bool SkipTargetIndependentFastISel() {
>> +    return false;
>> +  }
>> +
>> private:
>>   bool SelectBinaryOp(const User *I, unsigned ISDOpcode);
>> 
>> 
>> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=176136&r1=176135&r2=176136&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Feb 26 17:15:23 2013
>> @@ -822,7 +822,7 @@ FastISel::SelectInstruction(const Instru
>>   }
>> 
>>   // First, try doing target-independent selection.
>> -  if (SelectOperator(I, I->getOpcode())) {
>> +  if (!SkipTargetIndependentFastISel() && SelectOperator(I, I->getOpcode())) {
>>     ++NumFastIselSuccessIndependent;
>>     DL = DebugLoc();
>>     return true;
>> 
>> 
>> _______________________________________________
>> 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