[PATCH] D46801: add getAA in ScheduleDAG for using in HazardRec
Andrew Trick via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 15 16:09:47 PDT 2018
atrick added a comment.
@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.
>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