mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Remove the user-count threshold when analyzing read attributes
Summary: This threshold limited FunctionAttrs ability to prove arguments to be read-only. In NVPTX, a specialized instruction ld.global.nc can be used to load memory with non-coherent texture cache. We notice that in SHOC [1] benchmark, some function arguments are not marked with readonly because FunctionAttrs reaches a hardcoded threshold when analysis uses. Removing this threshold won't cause significant regression in compilation time, because the worst-case time complexity of the algorithm is still O(# of instructions) for each parameter. Patched by Xuetian Weng. [1] https://github.com/vetter/shoc Reviewers: nlewycky, jingyue, nicholas Subscribers: nicholas, test, llvm-commits Differential Revision: http://reviews.llvm.org/D11311 llvm-svn: 243141
This commit is contained in:
parent
48be953065
commit
344082ead8
@ -425,9 +425,6 @@ determinePointerReadAttrs(Argument *A,
|
||||
// We don't need to track IsWritten. If A is written to, return immediately.
|
||||
|
||||
for (Use &U : A->uses()) {
|
||||
if (Count++ >= 20)
|
||||
return Attribute::None;
|
||||
|
||||
Visited.insert(&U);
|
||||
Worklist.push_back(&U);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user