[PATCH] D50780: Check that the key is in the LEAs map before accessing

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 19 10:06:19 PDT 2018


craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86OptimizeLEAs.cpp:519
+
+    if (!LEAs.count(key))
+      continue;
----------------
Can we use LEAs.find so we can use one map search for the existence check and getting the SmallVectorImpl for chooseBestLEA?


Repository:
  rL LLVM

https://reviews.llvm.org/D50780





More information about the llvm-commits mailing list