ChuanqiXu9 wrote:

> I think if a variable is GVA_AvailableExternally, and we can't emit a 
> constant, we should just completely skip emitting the definition: there isn't 
> any point to emitting an available_externally definition that doesn't 
> actually contain any information the optimizer can use.
> 
> Not sure off the top of my head where that check belongs; might be okay to 
> just stick it into EmitGlobalVarDefinition itself.

Neat suggestion! I've applied it and the generated code looks better.

https://github.com/llvm/llvm-project/pull/93530
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to