]> granicus.if.org Git - llvm/commit
[Analysis] RemoveTotalMemInst counting in InstCount to avoid reading back other Stati...
authorCraig Topper <craig.topper@intel.com>
Tue, 18 Jul 2017 02:41:12 +0000 (02:41 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 18 Jul 2017 02:41:12 +0000 (02:41 +0000)
commite9e008859f6be9ddb7898d2d538f287cc4752459
tree4acecd1262418dd710019f0ca390b501c35040a1
parent0b1f2e3edaf0e4b18504b70069200f4713f2d294
[Analysis] RemoveTotalMemInst counting in InstCount to avoid reading back other Statistic variables

Summary:
Previously, we counted TotalMemInst by reading certain instruction counters before and after calling visit and then finding the difference. But that wouldn't be thread safe if this same pass was being ran on multiple threads.

This list of "memory instructions" doesn't make sense to me as it includes call/invoke and is missing atomics.

This patch removes the counter all together.

Reviewers: hfinkel, chandlerc, davide

Reviewed By: davide

Subscribers: davide, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308260 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstCount.cpp