[JumpThreading] NFC: Don't cache F.hasProfileData()
authorKazu Hirata <kazu@google.com>
Fri, 22 Nov 2019 16:50:54 +0000 (08:50 -0800)
committerKazu Hirata <kazu@google.com>
Fri, 22 Nov 2019 16:51:14 +0000 (08:51 -0800)
commita1955566282b98d5182877860b60d04029089788
treec4bc555fc4e5113ffac33cf9564ace65d94b4202
parent6d73265ad84107aa78dd7698fa073f43e426a186
[JumpThreading] NFC: Don't cache F.hasProfileData()

Summary:
With this patch, we no longer cache F.hasProfileData().  We simply
call the function again.

I'm doing this because:

- JumpThreadingPass also has a member variable named HasProfileData,
  which is very confusing,

- the function is very lightweight, and

- this patch makes JumpThreading::runOnFunction more consistent with
  JumpThreadingPass::run.

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70602
llvm/lib/Transforms/Scalar/JumpThreading.cpp