summaryrefslogtreecommitdiffstats
path: root/openmp/tools/archer/tests/task/task-barrier.c
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2019-11-22 00:20:10 -0800
committerYonghong Song <yhs@fb.com>2019-11-22 08:05:43 -0800
commit9e6aa81588505461e06c807c567b073224f1e817 (patch)
tree79f163325131a733fd7749bfb06069f15babcbd9 /openmp/tools/archer/tests/task/task-barrier.c
parentaf8576ff9d5a66d30ce27176aff808b688c3ec85 (diff)
downloadbcm5719-llvm-9e6aa81588505461e06c807c567b073224f1e817.tar.gz
bcm5719-llvm-9e6aa81588505461e06c807c567b073224f1e817.zip
[BPF] Fix a recursion bug in BPF Peephole ZEXT optimization
Commit a0841dfe8594 ("[BPF] Fix a bug in peephole optimization") fixed a bug in peephole optimization. Recursion is introduced to handle COPY and PHI instructions. Unfortunately, multiple PHI instructions may form a cycle and this will cause infinite recursion, eventual segfault. For Commit a0841dfe8594, I indeed tried a few loops to ensure that I won't see the recursion, but I did not try with complex control flows, which, as demonstrated with the test case in this patch, may introduce PHI cycles. This patch fixed the issue by introducing a set to remember visited PHI instructions. This way, cycles can be properly detected and handled. Differential Revision: https://reviews.llvm.org/D70586
Diffstat (limited to 'openmp/tools/archer/tests/task/task-barrier.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud