GVN: use a static array instead of regenerating it each time. NFC.
authorTim Northover <tnorthover@apple.com>
Tue, 14 Jul 2015 21:14:58 +0000 (21:14 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 14 Jul 2015 21:14:58 +0000 (21:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242202 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GVN.cpp

index b1a0db356a1e0a2ffb6807d946b7026f9eb952a8..d1eba6e70e5700885efc680ab0e31507bc00ad3e 100644 (file)
@@ -1795,7 +1795,7 @@ static void patchReplacementInstruction(Instruction *I, Value *Repl) {
     // 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,