[PATCH] D129352: [CodeGen] Limit building time for CodeGenPrepare

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 20:29:51 PDT 2022


craig.topper added a comment.

In D129352#3643924 <https://reviews.llvm.org/D129352#3643924>, @xiangzhangllvm wrote:

> In D129352#3642318 <https://reviews.llvm.org/D129352#3642318>, @yubing wrote:
>
>> if GEP and Gather/Scatter are not in the same bb, we don't do optimize GEP in the first round. When it is second round and GEP and Gather/Scatter are put in the same bb, your code will let the GEP's optimization not happen.
>>
>>   // If the GEP and the gather/scatter aren't in the same BB, don't optimize.
>>   // FIXME: We should support this by sinking the GEP.
>>   if (MemoryInst->getParent() != GEP->getParent())
>>     return false;
>
> Let me try to find a test case. (I default enable BuildTimeLimit in my local, didn't meet any compiling fail test case yet.)
> I think we should go further to find here " GEP's optimization is Mandatory" is make sense or not.

The GEP optimization isn't mandatory. It will only generate worse code. CodeGenPrepare doesn't run at -O0 so nothing in it can be mandatory.


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

https://reviews.llvm.org/D129352



More information about the llvm-commits mailing list