[all-commits] [llvm/llvm-project] d4bfca: [clang][CodeGen] Keep processing the rest of AST a...

Wentao Zhang via All-commits all-commits at lists.llvm.org
Thu Feb 22 14:04:36 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4bfca3b2e673789f7c278d46a199ae8910ddd37
      https://github.com/llvm/llvm-project/commit/d4bfca3b2e673789f7c278d46a199ae8910ddd37
  Author: Wentao Zhang <35722712+whentojump at users.noreply.github.com>
  Date:   2024-02-22 (Thu, 22 Feb 2024)

  Changed paths:
    M clang/lib/CodeGen/CodeGenPGO.cpp

  Log Message:
  -----------
  [clang][CodeGen] Keep processing the rest of AST after encountering unsupported MC/DC expressions (#82464)

Currently, upon seeing unsupported decisions (more than 6 conditions, or
split nesting), the post-visitor hook dataTraverseStmtPost() returns a
false. As a result, in the rest of tree even supported decisions will
be skipped as well. Like in the below code:

{ // CompoundStmt
  a && b;           // 1: BinaryOperator (supported)
  a && foo(b && c); // 2: BinaryOperator (not yet supported due to split
                    //                    nesting)
  a && b;           // 3: BinaryOperator (supported)
}

Decision 3 will not be processed at all. And only one "Decision" region
will be emitted. Compiler explorer example:
https://godbolt.org/z/Px61sesoo

We hope to process such cases and emit two "Decision" regions (1 and 3)
in the above example.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list