1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/include/llvm/CodeGen
Andrew Lenharth 6600f4a1d0 Add support for a cycle counter intrinsic. As basically all processors have
this and have it in about the same form, I think this makes sense.
on X86, you do a RDTSC (64bit result, from any ring since the P5MMX)
on Alpha, you do a RDCC
on PPC, there is a sequence which may or may not work depending on how things
are setup by the OS.  Or something like that.  Maybe someone who knows PPC
can add support.  Something about the time base register.
on Sparc, you read %tick, which in some solaris versions (>=8) is readable by
userspace
on IA64 read ar.itc

So I think the ulong is justified since all of those are 64bit.
Support is slighly flaky on old chips (P5 and lower) and sometimes
depends on OS (PPC, Sparc).  But for modern OS/Hardware (aka this decade),
we should be ok.

I am still not sure what to do about lowering.  I can either see a lower to 0, to
gettimeofday (or the target os equivalent), or loudly complaining and refusing to
continue.

I am commiting an Alpha implementation.  I will add the X86 implementation if I
have to (I have use of it in the near future), but if someone who knows that
backend (and the funky multi-register results) better wants to add it, it would
take them a lot less time ;)

TODO: better lowering and legalizing, and support more platforms
llvm-svn: 24299
2005-11-11 16:45:18 +00:00
..
AsmPrinter.h add support for .asciz, and enable it by default. If your target assembler 2005-11-10 18:05:57 +00:00
ELFWriter.h Add two helper methods, adjust a prototype 2005-07-16 17:40:34 +00:00
InstrScheduling.h Remove trailing whitespace 2005-04-21 20:39:54 +00:00
IntrinsicLowering.h Remove trailing whitespace 2005-04-21 20:39:54 +00:00
LiveInterval.h add a new method 2005-10-20 07:37:59 +00:00
LiveIntervalAnalysis.h add missing prototype 2005-10-21 15:49:28 +00:00
LiveVariables.h Fix a problem Duraid noticed, where we weren't removing values from the kills 2005-08-25 05:45:31 +00:00
MachineBasicBlock.h Remove trailing whitespace 2005-04-21 20:39:54 +00:00
MachineCodeEmitter.h new is not a valid default anywhere, so make this pure virtual 2005-07-28 18:13:59 +00:00
MachineConstantPool.h add a helper method 2005-07-11 04:49:33 +00:00
MachineFrameInfo.h Change a comment slightly 2005-11-06 17:40:18 +00:00
MachineFunction.h remove an inappropriate comment 2005-08-31 22:49:51 +00:00
MachineFunctionPass.h Remove trailing whitespace 2005-04-21 20:39:54 +00:00
MachineInstr.h Mark these as V9 specific 2005-08-01 20:38:31 +00:00
MachineInstrBuilder.h Remove trailing whitespace 2005-04-21 20:39:54 +00:00
MachineRelocation.h Eliminate tabs and trailing spaces. 2005-07-27 05:53:44 +00:00
Passes.h Remove a prototype 2005-10-24 04:13:21 +00:00
SchedGraphCommon.h Convert tabs to spaces 2005-04-22 03:46:24 +00:00
SelectionDAG.h Switch the allnodes list from a vector of pointers to an ilist of nodes. 2005-11-09 23:46:43 +00:00
SelectionDAGISel.h add a method 2005-08-18 18:44:33 +00:00
SelectionDAGNodes.h Add support for a cycle counter intrinsic. As basically all processors have 2005-11-11 16:45:18 +00:00
SSARegMap.h add an assertion 2005-01-05 16:27:34 +00:00
ValueSet.h Remove trailing whitespace 2005-04-21 20:39:54 +00:00
ValueTypes.h add an enum value 2005-08-25 17:07:09 +00:00