swiftlang/swift

[SR-6154] Add support for LLVM_REVERSE_ITERATION and use it to uncover non-determinism

Open

#48,709 opened on 2017年10月15日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Swift (69,989 stars) (10,719 forks)batch import
compilergood first issue

説明

Previous ID SR-6154
Radar None
Original Reporter @gottesmm
Type Task
Votes 1
Component/s Compiler
Labels Task, StarterBug
Assignee None
Priority Medium

md5: c398112976749549e4be99b1549c89f1

Issue Description:

Upstream LLVM added an option called LLVM_REVERSE_ITERATION. This causes unordered collections to iterate in the reverse order. This can be used to uncover places in the compiler where we are using unordered collections in ways that can result in non-deterministic output.

The task is this:

1. Add build-script support and cmake support for LLVM_REVERSE_ITERATION.
2. Define a preset that does (for starters) a simple build with reverse iteration enabled. My suggestion: make sure that you specify a build directory with the name reverse iteration in it it will make binary diffing easier.
2. Add a script called ./utils/build-root-compare that performs the binary comparison given two build roots that supports an externally specified file containing an XFAIL list of binary paths.
3. Perform an initial binary comparisons in between an LLVM_REVERSE_ITERATION and a non-LLVM_REVERSE_ITERATION and XFAIL any differences.
4. At this point, we should have an iteration/reverse iteration build that can be put on a bot and maintain the current state.
5. Start going through the list of XFAILs investigating where these issues are coming from, with the bot keeping previous work from breaking.

コントリビューターガイド