[llvm][TableGen] Resolve intra-record field references to `?`
An inconsistency existed in TableGen prior to this PR:
* Referencing a template argument whose value was `?` resolved to and propagated `?`
* Referencing a record whose field is `?` resolved and propagated `?`
However, referencing a field of the record being built remained unresolved, even in the final resolution pass.
This meant that code like:
```tablegen
class Self {
string str = ?;
assert !if(!initialized(str), !ne(str, ""), 1), "str must not be empty";
}
def : Self;
```
would fail to compile as `!initialized(str)` was left unfolded, and `!if` never received a bit value: https://godbolt.org/z/oGh1PzP88
Similar issues arose with other code such as with `!dump` etc.
This PR fixes that issue by resolving a record field to `?` if the record is complete and this is the final resolve pass. As a follow-on effect, some places that previously relied on being kept unresolved now resolve to `?` which required implementing semantics for `?.field` accesses (instead of the current crash using `llvm_unreachable`). This PR therefore also defines `?.field` as resolving to `?`, similar to `?{0}` or `!cast`.
[lldb][test] Fix flaky missing-oso.cpp that mixed stderr and stdout (#238110)
`missing-oso.cpp` expects `error:` line is before
`(lldb) image dump separate-debug-info --errors-only`, but the error
message is
from the event handler thread. The main thread does not wait for that
event and runs the next `-o` command, so the `error:` line can land
before, between or after the `image dump` echo and output. `2>&1` joins
both writers in one pipe and nothing orders them.
The fix does:
- drop `2>&1` from the `%t.two` run and send stderr to `%t.two.err`,
use two `FileCheck` to check each,
- `--implicit-check-not=error:` on the stderr check replaces both
`TWO-NOT: error:` lines, so the error must still appear exactly once,
- `-l 28` is now `-l 30`, the new line of `main`
[mlir][OpenMP] Add memory effects of omp.single (#237929)
Added a new attribute for the copyprivate clause
`copyprivate_assume_bounded_recipe_effects`. Applied when the
copyprivate variables satisfy certain constraints.
Updated helper functions for applying bounded recipe attributes.
Add direct memory effect tests, CSE & canonicalisation tests.
Add tests for correct application of the
`copyprivate_assume_bounded_recipe_effects` attribute.
AI-Assisted-by: Codex (OpenAI)