llvm-project/llvm/lib/Transforms
Ulrich Weigand f4ceef8d3f [Debug] Retain both copies of debug intrinsics in HoistThenElseCodeToIf
When hoisting common code from the "then" and "else" branches of a condition
to before the "if", the HoistThenElseCodeToIf routine will attempt to merge
the debug location associated with the two original copies of the hoisted
instruction.

This is a problem in the special case where the hoisted instruction is a
debug info intrinsic, since for those the debug location is considered
part of the intrinsic and attempting to modify it may resut in invalid
IR.  This is the underlying cause of PR36410.

This patch fixes the problem by handling debug info intrinsics specially:
instead of hoisting one copy and merging the two locations, the code now
simply hoists both copies, each with its original location intact.  Note
that this is still only done in the case where both original copies are
otherwise (i.e. apart from location metadata) identical.

Reviewed By: aprantl

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

llvm-svn: 327622
2018-03-15 12:28:48 +00:00
..
AggressiveInstCombine [AggressiveInstCombine] Use use_empty() instead of !getNumUses(), NFC 2018-03-02 23:22:49 +00:00
Coroutines Remove unused variable; NFC 2018-03-15 02:58:36 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
IPO Reland r327041: [ThinLTO] Keep available_externally symbols live 2018-03-13 05:08:48 +00:00
InstCombine Simplify more cases of logical ops of masked icmps. 2018-03-13 21:13:18 +00:00
Instrumentation [asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [llvm part, take 3] 2018-03-08 21:02:18 +00:00
ObjCARC ObjCARC: address review comments from majnemer 2018-03-12 23:48:20 +00:00
Scalar [New PM][IRCE] port of Inductive Range Check Elimination pass to the new pass manager 2018-03-15 11:01:19 +00:00
Utils [Debug] Retain both copies of debug intrinsics in HoistThenElseCodeToIf 2018-03-15 12:28:48 +00:00
Vectorize [CleanUp] Remove NumInstructions field from LoopVectorizer's RegisterUsage struct. 2018-03-14 23:30:31 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00