Changes

Summary

  1. Fix expression evaluation result expansion in lldb-vscode (details)
  2. [SimplifyCFG] Enable switch to lookup table for more types. (details)
  3. [NFC][Codegen][SystemZ] Autogenerate checklines in int-cmp-47.ll (details)
  4. [NFC][Codegen][X86] Add test for parity-of-vector-of-bools (PR51312) (details)
  5. [mlir][sparse] fixed doc formatting (details)
  6. [clang/OpenMP][docs] Update OpenMP support list for unroll. (details)
  7. [GlobalOpt] Fix the load types when OptimizeGlobalAddressOfMalloc (details)
Commit b9139acb85a4e5203364838e47b2e1ee90055ad3 by jeffreytan
Fix expression evaluation result expansion in lldb-vscode

VScode now sends a "scopes" DAP request immediately after any expression evaluation.
This scopes request would clear and invalidate any non-scoped expandable variables in g_vsc.variables, causing later "variables" request to return empty result.
The symptom is that any expandable variables in VScode watch window/debug console UI to return empty content.

This diff fixes this issue by only clearing the expandable variables at process continue time. To achieve this, we have to repopulate all scoped variables
during context switch for each "scopes" request without clearing global expandable variables.
So the PR puts the scoped variables into its own locals/globals/registers; and all expandable variables into separate "expandableVariables" list.
Also, instead of using the variable index for "variableReference", it generates a new variableReference id each time as the key of "expandableVariables".

As a further new feature, this PR adds a new "expandablePermanentVariables" which has the lifetime of debug session. Any expandable variables from debug console
are added into this list. This enables users to snapshot expanable old variable in debug console and compare with new variables if desire.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D105166
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp
The file was modifiedlldb/tools/lldb-vscode/VSCode.h
The file was modifiedlldb/tools/lldb-vscode/VSCode.cpp
The file was modifiedlldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py
Commit b818da27ab6d7b1f02cbfc402fa1cae2c5677788 by craig.topper
[SimplifyCFG] Enable switch to lookup table for more types.

This transform has been restricted to legal types since
https://reviews.llvm.org/rG65df808f6254617b9eee931d00e95d900610b660
in 2012.

This is particularly restrictive on RISCV64 which only has i64
as a legal integer type. i32 is a very common type in code
generated from C, but we won't form a lookup table with it.
This also effects other common types like i8/i16 types on ARM,
AArch64, RISCV, etc.

This patch proposes to allow power of 2 types larger than 8 bit, if
they will fit in the largest legal integer type in DataLayout.
These types are common in C code so generally well handled in
the backends.

We could probably do this for other types like i24 and rely on
alignment and padding to allow the backend to use a single wider
load. This isn't my main concern right now and it will need more
tests.

We could also allow larger types up to some limit and let the
backend split into multiple loads, but we need to define that
limit. It's also not my main concern right now.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D107233
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/rangereduce.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/RISCV/switch_to_lookup_table-rv32.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/RISCV/switch_to_lookup_table-rv64.ll
Commit 0b094c06f41c212ca3c8a1444be1eee3db1d405f by lebedev.ri
[NFC][Codegen][SystemZ] Autogenerate checklines in int-cmp-47.ll
The file was modifiedllvm/test/CodeGen/SystemZ/int-cmp-47.ll
Commit cb2a2ba8d64da5be3fac0ea90e406270e8a615bd by lebedev.ri
[NFC][Codegen][X86] Add test for parity-of-vector-of-bools (PR51312)
The file was addedllvm/test/CodeGen/X86/parity-vec.ll
Commit 75baf6285e17aacc4239f343f2653e0e3d52a4f8 by ajcbik
[mlir][sparse] fixed doc formatting

Indentation seems to have an impact on website layout.

Reviewed By: grosul1

Differential Revision: https://reviews.llvm.org/D107403
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
Commit ba2be8deba79f1aa64a86019e78bcd2536b14eb5 by llvm-project
[clang/OpenMP][docs] Update OpenMP support list for unroll.
The file was modifiedclang/docs/OpenMPSupport.rst
Commit 2d9759c7902c5cbc9a7e3ab623321d5578d51687 by scui
[GlobalOpt] Fix the load types when OptimizeGlobalAddressOfMalloc

Currently, in OptimizeGlobalAddressOfMalloc, the transformation for global loads assumes that they have the same Type. With the support of ConstantExpr (https://reviews.llvm.org/D106589), this may not be true any more (as seen in the test case), and we miss the code to handle this, This is to fix that.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D107397
The file was addedllvm/test/Transforms/GlobalOpt/2021-08-03-StoreOnceLoadMultiCasts.ll
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp