llvm-6502/lib
Andrea Di Biagio e6cfdc8471 [X86] Add support for builtin to read performance monitoring counters.
This patch adds support for a new builtin instruction called
__builtin_ia32_rdpmc.

Builtin '__builtin_ia32_rdpmc' is defined as a 'GCC builtin'; on X86, it can
be used to read performance monitoring counters. It takes as input the index
of the performance counter to read, and returns the value of the specified
performance counter as a 64-bit number.

Calls to this new builtin will map to instruction RDPMC.
The index in input to the builtin call is moved to register %ECX. The result
of the builtin call is the value of the specified performance counter (RDPMC
would return that quantity in registers RDX:RAX).

This patch:
 - Adds builtin int_x86_rdpmc as a GCCBuiltin;
 - Adds a new x86 DAG node called 'RDPMC_DAG';
 - Teaches how to lower this new builtin;
 - Adds an ISel pattern to select instruction RDPMC;
 - Fixes the definition of instruction RDPMC adding %RAX and %RDX as
   implicit definitions, and adding %ECX as implicit use;
 - Adds a LLVM test to verify that the new builtin is correctly selected.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212049 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-30 17:14:21 +00:00
..
Analysis Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
AsmParser IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
Bitcode IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
CodeGen CodeGen: rename Win64 ExceptionHandling to WinEH 2014-06-29 21:43:47 +00:00
DebugInfo Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
ExecutionEngine Fix build following r211956 2014-06-28 06:31:47 +00:00
IR Verifier: Update assert message to reflect LangRef 2014-06-28 06:24:49 +00:00
IRReader IRReader: don't mark MemoryBuffers const 2014-06-27 09:19:14 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Include <tuple> to make buildbots happy 2014-06-27 18:38:12 +00:00
LTO Use a range loop. No functionality change. 2014-06-28 18:44:59 +00:00
MC MC: rename EmitWin64EH routines 2014-06-29 01:52:01 +00:00
Object macho-dump: add code to print LC_ID_DYLIB load commands. 2014-06-30 14:40:57 +00:00
Option Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
ProfileData Renaming SwapByteOrder() to getSwappedBytes() 2014-06-14 11:36:01 +00:00
Support lldb can interrupt waitpid, so EINTR shouldn't be an error. This fixes the case 2014-06-27 18:02:54 +00:00
TableGen Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
Target [X86] Add support for builtin to read performance monitoring counters. 2014-06-30 17:14:21 +00:00
Transforms IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00