Skip to content

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

@gottesmm

Description

@gottesmm
Previous ID SR-6154
Radar None
Original Reporter @gottesmm
Type Task
Additional Detail from JIRA
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions