]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
rose: always push CHECK_BOUNDS onto end of program
authorJustin Viiret <justin.viiret@intel.com>
Fri, 27 May 2016 01:11:04 +0000 (11:11 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 1 Jun 2016 00:56:57 +0000 (10:56 +1000)
src/rose/rose_build_bytecode.cpp

index 1b00b4b5a1d4c8483905f36c13ac5b699c47a74c..758dd442afeb3e923c7e74c28bbfeb6de2d67a54 100644 (file)
@@ -3010,13 +3010,7 @@ void makeRoleCheckBounds(const RoseBuildImpl &build, RoseVertex v,
     ri.u.checkBounds.min_bound = min_bound;
     ri.u.checkBounds.max_bound = max_bound;
 
-    // This precondition instruction should go near the start of
-    // the program, after the ONLY_EOD check if it's present.
-    auto it =
-        find_if(begin(program), end(program), [](const RoseInstruction &ri) {
-            return ri.code() > ROSE_INSTR_CHECK_ONLY_EOD;
-        });
-    program.insert(it, ri);
+    program.push_back(move(ri));
 }
 
 static