[X86] Add support for Read Time Stamp Counter x86 builtin intrinsics.

Press ? to show keyboard shortcuts.
Committed
adibiagioApr 24 2014, 10:18 AM
Parents
rL207126: R600/SI: Use address space in allowsUnalignedMemoryAccesses
Branches
Unknown
Tags
Unknown
Description

[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.

rL207127

llvm/trunk/include/llvm/IR/IntrinsicsX86.td

Loading...

llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Loading...

llvm/trunk/lib/Target/X86/X86ISelLowering.h

Loading...

llvm/trunk/lib/Target/X86/X86InstrInfo.td

Loading...

llvm/trunk/lib/Target/X86/X86InstrSystem.td

Loading...

llvm/trunk/test/CodeGen/X86/rdtsc.ll

Loading...

Add Comment