[PATCH] D69660: [HardwareLoops] Optimisation remarks

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 3 19:33:02 PST 2019


shchenz added a comment.



In D69660#1730379 <https://reviews.llvm.org/D69660#1730379>, @SjoerdMeijer wrote:

> This is a pass manager's problem. By comparing the hardwareloop pass with other passes also using the optimisation remarks, I noticed a missing:
>
>   INITIALIZE_PASS_DEPENDENCY(OptimizationRemarkEmitterWrapperPass)
>   
>
> which I have now added. I am fairly confident that this will solve the problem, but as I haven't been able to reproduce locally, I am not entirely certain.
>  Could I ask for one more favour, would you be able to verify this? If this doesn't solve it, I need to see why I can't reproduce this, but that is a bit of bigger task which I'm obviously trying to avoid... :-/


I think the reason it crashs inside llc of PowerPC is `HardwareLoop Pass` becomes the first pass in PowerPC llc pipeline which uses analysis pass `OptimizationRemarkEmitterWrapperPass` after your change. But you don't register it by adding the dependancy marco.

I guess on ARM  `HardwareLoop Pass` is not the first pass in llc pipeline so `OptimizationRemarkEmitterWrapperPass` should be registered before. So it is ok on ARM.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69660/new/

https://reviews.llvm.org/D69660





More information about the llvm-commits mailing list