[X86] Add support for Read Time Stamp Counter x86 builtin intrinsics.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 24 Apr 2014 17:18:27 +0000 (17:18 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 24 Apr 2014 17:18:27 +0000 (17:18 +0000)
commit35f9e1aa4990a20245cb7c39eb01f9feffc97853
tree12f8866fbe3cf355e19b2bce470cf22a4c9a33ea
parent2dbbd173946632d950715001330070d656858642
[X86] Add support for Read Time Stamp Counter x86 builtin intrinsics.

This patch:
- Adds two new X86 builtin intrinsics ('int_x86_rdtsc' and
   'int_x86_rdtscp') as GCCBuiltin intrinsics;
- Teaches the backend how to lower the two new builtins;
- Introduces a common function to lower READCYCLECOUNTER dag nodes
  and the two new rdtsc/rdtscp intrinsics;
- Improves (and extends) the existing x86 test 'rdtsc.ll'; now test 'rdtsc.ll'
  correctly verifies that both READCYCLECOUNTER and the two new intrinsics
  work fine for both 64bit and 32bit Subtargets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207127 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsX86.td
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86InstrSystem.td
test/CodeGen/X86/rdtsc.ll