[llvm] [GlobalOpt] Add range metadata to loads from constant global variables (PR #127695)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 13:26:10 PST 2025
================
@@ -2498,6 +2499,102 @@ OptimizeGlobalAliases(Module &M,
return Changed;
}
+static bool AddRangeMetadata(Module &M) {
+ const DataLayout &DL = M.getDataLayout();
+ bool Changed = false;
+
+ for (GlobalValue &Global : M.global_values()) {
----------------
Ralender wrote:
I didn't try to find a place like that because all other transformation of GlobalOpt are iterated on until GlobalOpt can do no changes. and this process only needs to happen once.
https://github.com/llvm/llvm-project/pull/127695
More information about the llvm-commits
mailing list