diff options
author | Douglas Yung <douglas.yung@sony.com> | 2017-04-18 03:25:11 +0000 |
---|---|---|
committer | Douglas Yung <douglas.yung@sony.com> | 2017-04-18 03:25:11 +0000 |
commit | 8439c8ed1374c03fdc36d76933c7a549bcc070ea (patch) | |
tree | f54bcb7d80c17fad25cf7e9303adc751f1afa27c /llvm/unittests/ADT/APIntTest.cpp | |
parent | f692e7db51534283bd709c60984144c267e842e6 (diff) | |
download | bcm5719-llvm-8439c8ed1374c03fdc36d76933c7a549bcc070ea.tar.gz bcm5719-llvm-8439c8ed1374c03fdc36d76933c7a549bcc070ea.zip |
[XRay][compiler-rt] Use emulated TSC when CPU supports rdtscp, but cannot determine the CPU frequency
A problem arises if a machine supports the rdtscp instruction, but the processor
frequency cannot be determined by the function getTSCFrequency(). In this case,
we want to use the emulated TSC instead. This patch implements that by adding a
call to getTSCFrequency() from probeRequiredCPUFeatures(), and the function only
returns true if both the processor supports rdtscp and the CPU frequency can be
determined.
This should fix PR32620.
Reviewers: dberris
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32067
llvm-svn: 300525
Diffstat (limited to 'llvm/unittests/ADT/APIntTest.cpp')
0 files changed, 0 insertions, 0 deletions