[llvm] [llvm][ARM]Add widen global arrays pass (PR #107120)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 02:05:48 PDT 2024


https://github.com/davemgreen commented:

> I've added an IR test that shows this. I believe the global variable only gets padded once while every destination array gets padded if using the variable

It looks like multiple globals get created. Can we prevent that from happening?

Can we replace all the uses of the old global with the new one, to make sure we don't end up with many repeated globals? i.e use the first n bytes of the now wider global in the "other" uses, and hopefully re-use the already widened global in other allocas that are also widened. (Or widen all uses at once, or maybe just limit it to a single use if it isn't very useful).

https://github.com/llvm/llvm-project/pull/107120


More information about the llvm-commits mailing list