llvm-project/llvm/test/Transforms/JumpThreading
Kazu Hirata 1a58be2ac5 [JumpThreading] Use profile data even with the new pass manager
Summary:
Without this patch, the jump threading pass ignores profiling data
whenever we invoke the pass with the new pass manager.

Specifically, JumpThreadingPass::run calls runImpl with class variable
HasProfileData always set to false.  In turn, runImpl sets
HasProfileData to false again:

  HasProfileData = HasProfileData_;

In the end, we don't use profiling data at all with the new pass
manager.

This patch fixes the problem by passing F.hasProfileData() to runImpl.

The bug appears to have been introduced at:

  https://reviews.llvm.org/D41461

which removed local variable HasProfileData in JumpThreadingPass::run
even though there was one more use left in the same function.  As a
result, the remaining use ended referring to the class variable
instead.

Note that F.hasProfileData is an extremely lightweight function, so I
don't see the need to cache its result.  Once this patch is approved,
I'm planning to stop caching the result of F.hasProfileData in
runOnFunction.

Reviewers: wmi, eli.friedman

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70509
2019-11-22 08:21:48 -08:00
..
2008-11-27-EntryMunge.ll
2010-08-26-and.ll
2011-04-02-SimplifyDeadBlock.ll
2011-04-14-InfLoop.ll
2012-07-19-NoSuccessorIndirectBr.ll
PR33357-lvi-recursion.ll
PR37745.ll
and-and-cond.ll
and-cond.ll
assume-edge-dom.ll
assume.ll
basic.ll
bb-unreachable-from-entry.ll [JT][CVP] Regenerate test checks, again 2019-11-01 22:27:48 +01:00
branch-debug-info.ll
branch-no-const.ll
callbr-edge-split.ll
combine-metadata.ll Temporarily Revert "Reapply [LVI] Normalize pointer behavior" as it's broken python 3.6. 2019-11-12 15:51:51 -08:00
compare.ll
conservative-lvi.ll
crash.ll
ddt-crash.ll
ddt-crash2.ll
ddt-crash3.ll
ddt-crash4.ll
degenerate-phi.ll
fold-not-thread.ll
guards.ll
header-succ.ll [JT][CVP] Regenerate test checks, again 2019-11-01 22:27:48 +01:00
implied-cond.ll
indirectbr.ll
induction.ll [JT][CVP] Regenerate test checks, again 2019-11-01 22:27:48 +01:00
landing-pad.ll
loop-phi.ll
lvi-load.ll
lvi-tristate.ll
no-irreducible-loops.ll
or-undef.ll
phi-eq.ll
phi-known.ll
pr9331.ll
pr15851_hang.ll
pr22086.ll
pr26096.ll
pr27840.ll
pr33605.ll
pr33917.ll
pr36133.ll
pr40992-indirectbr-folding.ll
range-compare.ll
removed-use.ll
select.ll
stale-loop-info-after-unfold-select.ll
static-profile.ll
thread-cmp.ll
thread-loads.ll IR: print value numbers for unnamed function arguments 2019-08-03 14:28:34 +00:00
threading_prof1.ll
threading_prof2.ll
unreachable-loops.ll [JumpThreading] Stop searching predecessor when the current bb is in a 2019-07-26 20:59:22 +00:00
update-edge-weight.ll [JumpThreading] Use profile data even with the new pass manager 2019-11-22 08:21:48 -08:00