[llvm-dev] RFC: Exposing TargetTransformInfo factories from TargetMachine

Hal Finkel via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 15 11:02:56 PST 2017


On 12/15/2017 12:12 PM, Sanjoy Das wrote:
> On Fri, Dec 15, 2017 at 5:30 AM, Hal Finkel <hfinkel at anl.gov> wrote:
>> Are there reasons why we might not want to do this? Other options we should
>> consider?
> It does make the TargetMachine -> TargetIRAnalysis path less abstract,
> but given that all targets have the same pattern of instantiating a
> TargetIRAnalysis with a Function->TargetTransformInfo hook, the
> abstraction does not seem particularly useful.

I agree.

>
> I might do even a simpler form of the patch though -- instead of
> returning a function pointer from TargetMachine, just add a virtual
> function to TargetMachine that creates the TargetTransformInfo
> directly from a Function.

Okay.

  -Hal

>
> -- Sanjoy
>
>>   -Hal
>>
>>> [0]:  XLA is a machine learning focussed linear algebra compiler
>>> https://www.tensorflow.org/performance/xla/ that uses LLVM for its CPU
>>> and GPU backends.
>>>
>>> -- Sanjoy
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>> --
>> Hal Finkel
>> Lead, Compiler Technology and Programming Languages
>> Leadership Computing Facility
>> Argonne National Laboratory
>>

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list