OSDN Git Service

[XRay] Lazily compute MachineLoopInfo instead of requiring it.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 20 Mar 2018 17:02:29 +0000 (17:02 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 20 Mar 2018 17:02:29 +0000 (17:02 +0000)
commit5926c6d6fe85f6623d2d14f473873bc72c72d482
tree0345f7b7b2d44a38bfd2bab0dcaecd8f05e2803c
parenta61bf37968d6b6bc17d0e46756449ef1881fa0d7
[XRay] Lazily compute MachineLoopInfo instead of requiring it.

Summary:
Currently X-Ray Instrumentation pass has a dependency on MachineLoopInfo
(and thus on MachineDominatorTree as well) and we have to compute them
even if X-Ray is not used. This patch changes it to a lazy computation
to save compile time by avoiding these redundant computations.

Reviewers: dberris, kubamracek

Subscribers: llvm-commits, hiraditya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327999 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/XRayInstrumentation.cpp
test/CodeGen/X86/O0-pipeline.ll