Changes

Summary

  1. [MLIR][NFC] flat affine constraints - refactor to share, renames (details)
  2. [GlobalOpt] Treat null-check of loaded value as use of global (PR35760) (details)
  3. [Coroutines] Insert lifetime intrinsics even O0 is used (details)
  4. [Coroutines] Also check lifetime intrinsic for local variable when build (details)
  5. Fix another instance where a variable was renamed in the generated LLVM IR. [NFC] (details)
  6. [PowerPC] fix a typo in commit 3f85134d710c (details)
  7. [lldb-vscode] Add missing launchCommands entry in the package.json (details)
Commit bec785ab704b88ffec51eb54404daa5d4ebfc265 by uday
[MLIR][NFC] flat affine constraints - refactor to share, renames

- refactor to remove duplicate code
- some renaming / comment updates for readability

Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>

Differential Revision: https://reviews.llvm.org/D76667
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h
Commit b7cd291c1542aee12c9e9fde6c411314a163a8ea by Vedant Kumar
[GlobalOpt] Treat null-check of loaded value as use of global (PR35760)

PR35760 shows an example program which, when compiled with `clang -O0`
or gcc at any optimization level, prints '0'. However, llvm transforms
the program in a way that causes it to print '1'.

Fix the issue by having `AllUsesOfValueWillTrapIfNull` return false when
analyzing a load from a global which is used by an `icmp`. This special
case was untested [0] so this is just deleting dead code.

An alternative fix might be to change the GlobalStatus analysis for the
global to report "Stored" instead of "StoredOnce". However, "StoredOnce"
is appropriate when only one value other than the initializer is stored
to the global.

[0]
http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp.html#L662

Differential Revision: https://reviews.llvm.org/D76645
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp
The file was addedllvm/test/Transforms/GlobalOpt/null-check-is-use-pr35760.ll
Commit d0f4af8f3088f72df7fea9983127cbeeebbef6a1 by JunMa
[Coroutines] Insert lifetime intrinsics even O0 is used

Differential Revision: https://reviews.llvm.org/D76119
The file was addedclang/test/CodeGenCoroutines/coro-always-inline.cpp
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
Commit a44de12ab2193c14b6f0ff8cbea8f276cbf10159 by JunMa
[Coroutines] Also check lifetime intrinsic for local variable when build
coroutine frame

Currently we move all allocas into the frame when build coroutine frame in
CoroSplit pass. However, this can be relaxed.

Since CoroSplit pass run after Inline pass, we can use lifetime intrinsic to
do such analysis: If the scope of lifetime intrinsic is not across any suspend
point, rather than move the allocas to frame, we can just move them to entry bb
of corresponding function. This reduce the frame size.

More importantly, this also avoid data race in multithread environment.
Consider one inline function by coroutine: it starts a thread which access
local variables, while after inline the movement of allocs to frame also access
them. cause data race.

Differential Revision: https://reviews.llvm.org/D75664
The file was modifiedllvm/test/Transforms/Coroutines/coro-split-02.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
Commit 18e1a59eed5588f23126ac606ed98e1a38352579 by douglas.yung
Fix another instance where a variable was renamed in the generated LLVM IR. [NFC]
The file was modifiedllvm/test/Transforms/GVNSink/sink-common-code.ll
Commit 9d07d91fb6c8c3c79e6b0c4f6e92dd16a77ff7fb by czhengsz
[PowerPC] fix a typo in commit 3f85134d710c

Implement target hook isProfitableToHoist - typo fix.
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit e0279d720a6eebd8508d4f102c684aee9fe9d100 by waltermelon
[lldb-vscode] Add missing launchCommands entry in the package.json
The file was modifiedlldb/tools/lldb-vscode/package.json