[all-commits] [llvm/llvm-project] 7a136d: [clang-tidy] Added check to disable bugprone-infin...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Feb 12 05:08:41 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a136d2768e26b30273f208fb3d64eae531c8455
      https://github.com/llvm/llvm-project/commit/7a136d2768e26b30273f208fb3d64eae531c8455
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2020-02-12 (Wed, 12 Feb 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/bugprone-infinite-loop.cpp

  Log Message:
  -----------
  [clang-tidy] Added check to disable bugprone-infinite-loop on known false condition

Summary: Addresses [[ https://bugs.llvm.org/show_bug.cgi?id=44816 | bugprone-infinite-loop false positive with CATCH2 ]] by disabling the check on loops where the condition is known to always eval as false, in other words not a loop.

Reviewers: aaron.ballman, alexfh, hokein, gribozavr2, JonasToth

Reviewed By: gribozavr2

Subscribers: xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D74374

(cherry picked from commit c69ec6476806147e46bf09b693acb24177982dc2)


  Commit: c1701728b93b3aec39d3b93d0182648887edfdb1
      https://github.com/llvm/llvm-project/commit/c1701728b93b3aec39d3b93d0182648887edfdb1
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2020-02-12 (Wed, 12 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugVariables.cpp
    M llvm/test/DebugInfo/X86/dbg-addr-dse.ll
    M llvm/test/DebugInfo/X86/live-debug-variables.ll

  Log Message:
  -----------
  [DebugInfo] Re-instate LiveDebugVariables scope trimming

This patch reverts part of r362750 / D62650, which stopped
LiveDebugVariables from trimming leading variable location ranges down
to only covering those instructions that are in scope. I've observed some
circumstances where the number of DBG_VALUEs in a function can be
amplified in an un-necessary way, to cover more instructions that are
out of scope, leading to very slow compile times. Trimming the range
of instructions that the variables cover solves the slow compile times.

The specific problem that r362750 tries to fix is addressed by the
assignment to RStart that I've added. Any variable location that begins
at the first instruction of a block will now be considered to begin at the
start of the block. While these sound the same, the have different
SlotIndexes, and the register allocator may shoehorn additional
instructions in between the two. The test added in the past
(wrong_debug_loc_after_regalloc.ll) still works with this modification.

live-debug-variables.ll has a range trimmed to not cover the prologue of
the function, while dbg-addr-dse.ll has a DBG_VALUE sink past one
instruction with no DebugLoc, which is expected behaviour.

Differential Revision: https://reviews.llvm.org/D73691

(cherry picked from commit 41206b61e30c3d84188cb17b91c2c0c800982dd1)


  Commit: 04d7337d69fa38f00179811419207a9ef5eef83e
      https://github.com/llvm/llvm-project/commit/04d7337d69fa38f00179811419207a9ef5eef83e
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2020-02-12 (Wed, 12 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/test/CodeGen/X86/dbg-value-func-arg.ll
    R llvm/test/DebugInfo/X86/stack-arg-deref.ll

  Log Message:
  -----------
  Revert "[DebugInfo][DAG] Distinguish different kinds of location indirection"

This reverts commit 3137fe4d23eeb8df08c03e9111465325eeafe08e.

I'm backing out D68945, which this patch is a follow up for. It'll be
re-landed when D68945 is fixed.

The changes to dbg-value-func-arg.ll occur because our handling of certain
kinds of location now mixes up indirection that happens at different points
in a DIExpression. While this is a regression, it's a return to the prior
behaviour while a better patch is sought.

(cherry picked from commit ece761427f63de96ee52bbd6be1c61b07967a917)


  Commit: 4eb45a05a78f7c80bbec0453bc225deebec06209
      https://github.com/llvm/llvm-project/commit/4eb45a05a78f7c80bbec0453bc225deebec06209
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2020-02-12 (Wed, 12 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
    M llvm/lib/CodeGen/LiveDebugVariables.cpp
    M llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
    M llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/debug-cpp.ll
    M llvm/test/CodeGen/AArch64/GlobalISel/debug-insts.ll
    M llvm/test/CodeGen/ARM/debug-info-arg.ll
    M llvm/test/CodeGen/PowerPC/debuginfo-stackarg.ll
    M llvm/test/CodeGen/X86/dbg-value-func-arg.ll
    M llvm/test/DebugInfo/ARM/PR16736.ll
    M llvm/test/DebugInfo/ARM/float-stack-arg.ll
    M llvm/test/DebugInfo/COFF/pieces.ll
    M llvm/test/DebugInfo/X86/dbg-addr-dse.ll
    M llvm/test/DebugInfo/X86/dbg-addr.ll
    M llvm/test/DebugInfo/X86/live-debug-vars-dse.mir
    M llvm/test/DebugInfo/X86/op_deref.ll
    M llvm/test/DebugInfo/X86/parameters.ll
    M llvm/test/DebugInfo/X86/safestack-byval.ll
    M llvm/test/DebugInfo/X86/spill-indirect-nrvo.ll
    M llvm/test/DebugInfo/X86/spill-nontrivial-param.ll
    M llvm/test/DebugInfo/X86/vla.ll

  Log Message:
  -----------
  Revert "[DebugInfo] Remove some users of DBG_VALUEs IsIndirect field"

This reverts commit ed29dbaafa49bb8c9039a35f768244c394411fea.

I'm backing out D68945, which as the discussion for D73526 shows, doesn't
seem to handle the -O0 path through the codegen backend correctly. I'll
reland the patch when a fix is worked out, apologies for all the churn.
The two parent commits are part of this revert too.

Conflicts:
	llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
	llvm/test/DebugInfo/X86/dbg-addr-dse.ll

SelectionDAGBuilder conflict is due to a nearby change in e39e2b4a79c6
that's technically unrelated. dbg-addr-dse.ll conflicted because
41206b61e30c (legitimately) changes the order of two lines.

There are further modifications to dbg-value-func-arg.ll: it landed after
the patch being reverted, and I've converted indirection to be represented
by the isIndirect field rather than DW_OP_deref.

(cherry picked from commit 6531a78ac4b5b229bce272706593a0bc873877d7)


Compare: https://github.com/llvm/llvm-project/compare/b33830aea545...4eb45a05a78f


More information about the All-commits mailing list