[PATCH] D148536: [Assignment Tracking] Fix fragment error for some DSE-shortened stores

Haojian Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 07:02:47 PDT 2023


hokein added a comment.

I was trying to fix the bazel failure https://buildkite.com/llvm-project/upstream-bazel/builds/59967#01879985-8d44-4041-9cd0-a1e41371208e (by adding the `:Analysis` dep to `Core` target), and discovered that this patch introduces a cyclic dependency between `Core` and `Analysis`:

  $ bazel build --config=generic_clang @llvm-project//clang/unittests:ast_matchers_tests
  
  Starting local Bazel server and connecting to it...
  project//llvm:Analysis: cycle in dependency graph:
      @llvm-project//clang/unittests:ast_matchers_tests (940e5bfa4f289f5f81247f8a14276f4ff7b178b294d993a599b7dcdd4938fb45)
      @llvm-project//clang:ast (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
      @llvm-project//clang:basic (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
      @llvm-project//llvm:Instrumentation (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
      @llvm-project//llvm:TransformUtils (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
  .-> @llvm-project//llvm:Analysis (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
  |   @llvm-project//llvm:Object (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
  |   @llvm-project//llvm:IRReader (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
  |   @llvm-project//llvm:AsmParser (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
  |   @llvm-project//llvm:Core (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)
  `-- @llvm-project//llvm:Analysis (9e8b7842809f71769ff4024fa8ff44105697d8cd0cb0a5bcaa4aede8f4e50ff3)

The DebugInfo.cpp (in `Core` target) uses the functions from `llvm/Analysis/ValueTracking.h` (in `Analysis` target), thus `Core` target should depend on `Analysis` (we should probably add the `Analysis` dep to `LLVMCore` target in the cmake <https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/CMakeLists.txt#L79> as well), but `Analysis` already
depends on `Core`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148536/new/

https://reviews.llvm.org/D148536



More information about the llvm-commits mailing list