FDR: front end loop improvement

This commit is contained in:
Wang, Xiang W
2017-01-23 17:15:40 -05:00
committed by Matthew Barr
parent 7b5c4c85cc
commit 90216921b0
4 changed files with 169 additions and 141 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Intel Corporation
* Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -100,7 +100,7 @@ const u8 * floodDetect(const struct FDR * fdr,
// tryFloodDetect is never put in places where unconditional
// reads a short distance forward or backward here
// TODO: rationale for this line needs to be rediscovered!!
size_t mainLoopLen = len > iterBytes ? len - iterBytes : 0;
size_t mainLoopLen = len > 2 * iterBytes ? len - 2 * iterBytes : 0;
const u32 i = ptr - buf;
u32 j = i;