[SeparateConstOffsetFromGEP] skip optnone functions
authorJingyue Wu <jingyue@google.com>
Sun, 1 Feb 2015 02:34:41 +0000 (02:34 +0000)
committerJingyue Wu <jingyue@google.com>
Sun, 1 Feb 2015 02:34:41 +0000 (02:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227705 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp

index 47ffd23fa430c1d3e645b556ae1f07d6366ddac0..caace80a2d6eb211e79017a1de3f25ed36e299c1 100644 (file)
@@ -998,6 +998,9 @@ bool SeparateConstOffsetFromGEP::splitGEP(GetElementPtrInst *GEP) {
 }
 
 bool SeparateConstOffsetFromGEP::runOnFunction(Function &F) {
 }
 
 bool SeparateConstOffsetFromGEP::runOnFunction(Function &F) {
+  if (skipOptnoneFunction(F))
+    return false;
+
   if (DisableSeparateConstOffsetFromGEP)
     return false;
 
   if (DisableSeparateConstOffsetFromGEP)
     return false;