================
@@ -410,6 +366,21 @@ bool Vocabulary::invalidate(Module &M, const 
PreservedAnalyses &PA,
   return !(PAC.preservedWhenStateless());
 }
 
+Vocabulary::VocabVector Vocabulary::createDummyVocabForTest(unsigned Dim) {
+  VocabVector DummyVocab;
+  DummyVocab.reserve(NumCanonicalEntries);
+  float DummyVal = 0.1f;
+  // Create a dummy vocabulary with entries for all opcodes, types, and
+  // operands
+  for ([[maybe_unused]] unsigned _ :
----------------
svkeerthy wrote:

(This loop/method is not new. Got moved around in the file.) Both ways would 
have the same effect, if I am not wrong. And, we have used such for loops 
throughout this code. I'd prefer to keep it this way unless required.

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

Reply via email to