[llvm] [llvm][CodeGen] Resolve issues when updating live intervals in window scheduler (PR #101945)
Hua Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 01:02:49 PDT 2024
=?utf-8?b?4oCcYWtpcmF0aWFu4oCd?= <akiratian at tencent.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/101945 at github.com>
huaatian wrote:
> This bug was reported in #99454.
>
> The root cause of the issue is that the live interval information are corrupted when constructing TripleMBB. During the analysis of some virtual registers, references are made to an MBB that has already been processed by the machine pipeliner. Since the machine pipeliner does not preserve live interval and slot index information, the following error occurs:
>
> ![image](https://private-user-images.githubusercontent.com/142874007/355051011-5f240511-235d-44c3-8989-d21de25a9051.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2MjI4MjEsIm5iZiI6MTcyMzYyMjUyMSwicGF0aCI6Ii8xNDI4NzQwMDcvMzU1MDUxMDExLTVmMjQwNTExLTIzNWQtNDRjMy04OTg5LWQyMWRlMjVhOTA1MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNFQwODAyMDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05NDFkZWIwOWVmYTljMGRhMGM3MmE5NWM1MGI0YzExZTk2OWJmN2U4NTRjNWNjNDU4ZjdkZDVlMjgzY2M1YzIwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.5YRqF_cAUc01lPT5F2_phFYKkxoGRTaf8VKPrZIQsFA)
>
> The probability of this situation occurring is low. Typically, when updating the LiveIntervals in TripleMBB, scheduled MBBs are not referenced. Therefore, in such cases, we reanalyze the live intervals.
>
> PS :This error scenario is difficult to reproduce, so we can only try to simplify the reported scenario as much as possible.
We add the newly generated MBBs to the maps, and LIS will analyze live intervals of the virtual registers we are concerned with the repairIntervalsInRange() interface. The live interval information of these registers in the newly generated MBBs is not important here. However, if these MBBs are not added, the repairIntervalsInRange() interface will report the aforementioned error.
https://github.com/llvm/llvm-project/pull/101945
More information about the llvm-commits
mailing list