[llvm] r242202 - GVN: use a static array instead of regenerating it each time. NFC.

Tim Northover tnorthover at apple.com
Tue Jul 14 14:14:59 PDT 2015


Author: tnorthover
Date: Tue Jul 14 16:14:58 2015
New Revision: 242202

URL: http://llvm.org/viewvc/llvm-project?rev=242202&view=rev
Log:
GVN: use a static array instead of regenerating it each time. NFC.

Modified:
    llvm/trunk/lib/Transforms/Scalar/GVN.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=242202&r1=242201&r2=242202&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Jul 14 16:14:58 2015
@@ -1795,7 +1795,7 @@ static void patchReplacementInstruction(
     // In general, GVN unifies expressions over different control-flow
     // regions, and so we need a conservative combination of the noalias
     // scopes.
-    unsigned KnownIDs[] = {
+    static const unsigned KnownIDs[] = {
       LLVMContext::MD_tbaa,
       LLVMContext::MD_alias_scope,
       LLVMContext::MD_noalias,





More information about the llvm-commits mailing list