aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/Module.cpp
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2015-08-21 23:19:57 +0000
committerAdam Nemet <anemet@apple.com>2015-08-21 23:19:57 +0000
commit4e533ef7a95faca92757acccd6f92ffa97783b4b (patch)
treeda4f6cf91234c9e2bd2fc4258b37b08417b97b6c /clang/lib/Serialization/Module.cpp
parent552a62fabc00e80a2ba5825910f6b0efc7037a2e (diff)
downloadllvm-4e533ef7a95faca92757acccd6f92ffa97783b4b.zip
llvm-4e533ef7a95faca92757acccd6f92ffa97783b4b.tar.gz
llvm-4e533ef7a95faca92757acccd6f92ffa97783b4b.tar.bz2
[LAA] Hold bounds via ValueHandles during SCEV expansion
SCEV expansion can invalidate previously expanded values. For example in SCEVExpander::ReuseOrCreateCast, if we already have the requested cast value but it's not at the desired location, a new cast is inserted and the old cast will be invalidated. Therefore, when expanding the bounds for the pointers, a later entry can invalidate the IR value for an earlier one. The fix is to store a value handle rather than the value itself. The newly added test has a more detailed description of how the bug triggers. This bug can have a negative but potentially highly variable performance impact in Loop Distribution. Because one of the bound values was invalidated and is an undef expression now, InstCombine is free to transform the array overlap check: Start0 <= End1 && Start1 <= End0 into: Start0 <= End1 So depending on the runtime location of the arrays, we would detect a conflict and fall back on the original loop of the versioned loop. Also tested compile time with SPEC2006 LTO bc files. llvm-svn: 245760
Diffstat (limited to 'clang/lib/Serialization/Module.cpp')
0 files changed, 0 insertions, 0 deletions