diff options
author | Dmitry Mikulin <dmitry.mikulin@sony.com> | 2017-05-16 20:08:49 +0000 |
---|---|---|
committer | Dmitry Mikulin <dmitry.mikulin@sony.com> | 2017-05-16 20:08:49 +0000 |
commit | fce148c5686f4c3944bcecb141ebf5eb9102ea22 (patch) | |
tree | 8cccf2460580a708e767ce2df789da909025d9a8 /llvm/lib/Transforms | |
parent | 6c66e9a22ac28e286e92f175893f0b466c1ab0db (diff) | |
download | bcm5719-llvm-fce148c5686f4c3944bcecb141ebf5eb9102ea22.tar.gz bcm5719-llvm-fce148c5686f4c3944bcecb141ebf5eb9102ea22.zip |
In debug builds non-trivial amount of time is spent in InstCombine processing
@llvm.dbg.* calls in visitCallInst(). They can be safely ignored.
llvm-svn: 303202
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index 65b1148cb03..3dd3c29e4f9 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -3053,7 +3053,10 @@ static bool AddReachableCodeToWorklist(BasicBlock *BB, const DataLayout &DL, } } - InstrsForInstCombineWorklist.push_back(Inst); + // Skip processing debug intrinsics in InstCombine. Processing these call instructions + // consumes non-trivial amount of time and provides no value for the optimization. + if (!isa<DbgInfoIntrinsic>(Inst)) + InstrsForInstCombineWorklist.push_back(Inst); } // Recursively visit successors. If this is a branch or switch on a |