[PATCH] Add useAA() to TargetSubtargetInfo

Andrew Trick atrick at apple.com
Wed Aug 28 15:25:12 PDT 2013


On Aug 28, 2013, at 2:42 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> Andy, et al.,
> 
> This patch adds a Boolean useAA() to TargetSubtargetInfo. There are several optional (off-by-default) features in CodeGen that can make
> use of alias analysis. These features are important for generating code for some kinds of cores (for example the (in-order) PPC A2 core). This adds a useAA() function to TargetSubtargetInfo to allow these features to be enabled by default on a per-subtarget basis.
> 
> The first patch adds TargetSubtargetInfo::useAA() and uses it to control the default of the -enable-aa-sched-mi feature.

I’m curious, do you prefer the Option.getNumOccurrences() idiom to boolOrDefault options?

> The second patch uses TargetSubtargetInfo::useAA() to control the defaults of the -combiner-alias-analysis and -combiner-global-alias-analysis options. Why use the same function to control both the scheduling and DAGCombine defaults? Because I'd like to control them both in the same way, and DAGCombine is eventually going to go away and be replaced with something MI-like.


I wouldn’t design anything yet around the expectation of DAGCombine going away. However, I don’t see a problem using the same hook for now until someone needs another hook.

The patch looks great to me. Thanks.

-Andy






More information about the llvm-commits mailing list