[PATCH] D46801: add getAA in ScheduleDAG for using in HazardRec
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 16 03:55:32 PDT 2018
hfinkel added a comment.
In https://reviews.llvm.org/D46801#1100340, @atrick wrote:
> @hfinkel This is part of an alternate solution for https://reviews.llvm.org/D46243.
>
> Atheel wants to use AliasAnalysis within the hazard recognizer. I think it's important to avoid adding more implementation classes to headers that will be included/subclassed by out-of-tree targets. But getting the AA pointer from the existing API seems reasonable.
Sure, makes sense to me.
> From that discussion:
>
>> I’m implementing an optimization pass analysis that will be used from the TargetHazardRecognizer, so I must pass its result in the constructor of the HazaradRecognizer.
>> I have encountered some open source classes that I need to expand (using inheritance) but couldn’t due to some reasons:
>>
>> Expanding “MachineSchedulerBase” from MachineScheduler.cpp: I want to inherit it and expand it (for changing the call of CreateTargetPostRAHazardRecognizer)but I can’t because its declared in cpp file not in header the same as above for PostRASchedule pass.
>>
>> to pass the BasicAAResults when creating the HazaradRecognizer:
>> llvm::createTargetHazardRecognizer(MachineFunction &MF) (I cant created it inside the HazaradRecognizer because its not a pass)
>> so I have changed it into:
>> llvm::createTargetHazardRecognizer(MachineFunction &MF, BasicAAResult *BCA)
>> and I need to change the functions declaration and implementation that calls it. (functions from (class MachineScheduler : public MachineSchedulerBase ) and more…
Repository:
rL LLVM
https://reviews.llvm.org/D46801
More information about the llvm-commits
mailing list