Remove debug info when hoisting instruction from then/else branch.
authorDehao Chen <dehao@google.com>
Thu, 8 Sep 2016 21:53:33 +0000 (21:53 +0000)
committerDehao Chen <dehao@google.com>
Thu, 8 Sep 2016 21:53:33 +0000 (21:53 +0000)
commit87823f8e4d861a03da136d8de02e9140c53bad25
tree2e2428b3a80fd43d2ebaa2779647bdf4b17f2f13
parentc442cff96ec579ef9bb5232f9d6dd9cb1c4f0bd4
Remove debug info when hoisting instruction from then/else branch.

Summary: The hoisted instruction is executed speculatively. It could affect the debugging experience as user would see gdb go into code that may not be expected to execute. It will also affect sample profile accuracy by assigning incorrect frequency to source within then/else branch.

Reviewers: davidxl, dblaikie, chandlerc, kcc, echristo

Subscribers: mehdi_amini, probinson, eric_niebler, andreadb, llvm-commits

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

llvm-svn: 280995
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/remove-debug.ll [new file with mode: 0644]