[PATCH] D31085: [InlineCost] Increase the cost of Switch
    Hans Wennborg via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Apr 17 16:13:14 PDT 2017
    
    
  
hans added a comment.
In https://reviews.llvm.org/D31085#728192, @junbuml wrote:
> > I was hoping we wouldn't need the refactoring to SwitchCaseCluster.cpp, and that InlineCost.cpp could just work with TLI to check whether jump tables are allowed, density requirements etc.
>
> Sure, I can make InlineCost work with just TLI, but I don't want to duplicate the same code for InlineCost from lowering.  So I will refactor just a little bit on SelectionDAGBuilder to expose some util functions.
That sounds good to me.
> 
> 
>> My concern is that separating the case cluster code from SelectionDAGBuilder might be more trouble than it's worth.
> 
> Can you give me little bit more details about your concern  ?
The concern is just that the switch lowering code is fairly tightly integrated with SelectionDAGBuilder, and pulling it out isn't worth the effort if all we need from TLI is some basic info, like if the whole switch is dense enough for a lookup table.
https://reviews.llvm.org/D31085
    
    
More information about the llvm-commits
mailing list