llvm-project/llvm/utils/TableGen
Dean Michael Berris 52735fc435 XRay: Add entry and exit sleds
Summary:
In this patch we implement the following parts of XRay:

- Supporting a function attribute named 'function-instrument' which currently only supports 'xray-always'. We should be able to use this attribute for other instrumentation approaches.
- Supporting a function attribute named 'xray-instruction-threshold' used to determine whether a function is instrumented with a minimum number of instructions (IR instruction counts).
- X86-specific nop sleds as described in the white paper.
- A machine function pass that adds the different instrumentation marker instructions at a very late stage.
- A way of identifying which return opcode is considered "normal" for each architecture.

There are some caveats here:

1) We don't handle PATCHABLE_RET in platforms other than x86_64 yet -- this means if IR used PATCHABLE_RET directly instead of a normal ret, instruction lowering for that platform might do the wrong thing. We think this should be handled at instruction selection time to by default be unpacked for platforms where XRay is not availble yet.

2) The generated section for X86 is different from what is described from the white paper for the sole reason that LLVM allows us to do this neatly. We're taking the opportunity to deviate from the white paper from this perspective to allow us to get richer information from the runtime library.

Reviewers: sanjoy, eugenis, kcc, pcc, echristo, rnk

Subscribers: niravd, majnemer, atrick, rnk, emaste, bmakam, mcrosier, mehdi_amini, llvm-commits

Differential Revision: http://reviews.llvm.org/D19904

llvm-svn: 275367
2016-07-14 04:06:33 +00:00
..
AsmMatcherEmitter.cpp [TableGen] Use StringRef::compare instead of != and <. NFC. 2016-06-23 17:09:49 +00:00
AsmWriterEmitter.cpp TableGen: promote "code" type from syntactic sugar. 2016-07-05 21:22:55 +00:00
AsmWriterInst.cpp [TableGen] Remove the CGIOpNo from AsmWriterOperand as its not used for anything. NFC 2016-01-22 05:59:37 +00:00
AsmWriterInst.h [TableGen] Reorder fields in AsmWriterOperand to remove padding and reduce size. NFC 2016-01-22 05:59:40 +00:00
Attributes.cpp Add LLVMGetAttrKindID in the C API in order to facilitate migration away from LLVMAttribute 2016-04-20 01:02:12 +00:00
CMakeLists.txt AArch64: TableGenerate system instruction operands. 2016-07-05 21:23:04 +00:00
CTagsEmitter.cpp [TableGen] Remove unnecessary default constructed SMLoc that just existed to return. Instead just call the default constructor in the return. 2015-06-08 01:35:45 +00:00
CallingConvEmitter.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
CodeEmitterGen.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
CodeGenDAGPatterns.cpp Add IntrWrite[Arg]Mem intrinsic property 2016-04-19 21:58:33 +00:00
CodeGenDAGPatterns.h [SelectionDAG] Add a SDTCisSameSizeAs type constraint that can be used to ensure vector widths match even if the element size and count don't. 2015-11-26 07:02:18 +00:00
CodeGenInstruction.cpp TableGen: Add hasNoSchedulingInfo to instructions 2016-03-01 20:03:11 +00:00
CodeGenInstruction.h Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
CodeGenIntrinsics.h Add a 'Returned' intrinsic property corresponding to the 'returned' argument attribute 2016-07-11 01:28:42 +00:00
CodeGenMapTable.cpp [TableGen] more helpful error message in MapTableEmitter 2016-03-10 18:51:58 +00:00
CodeGenRegisters.cpp TableGen: Produce CoveredBySubRegs summary for register classes 2016-04-28 03:07:11 +00:00
CodeGenRegisters.h TableGen: Produce CoveredBySubRegs summary for register classes 2016-04-28 03:07:11 +00:00
CodeGenSchedule.cpp Revert "Revert "[misched] Extend scheduler to handle unsupported features"" 2016-06-24 08:43:27 +00:00
CodeGenSchedule.h Revert "Revert "[misched] Extend scheduler to handle unsupported features"" 2016-06-24 08:43:27 +00:00
CodeGenTarget.cpp Add a 'Returned' intrinsic property corresponding to the 'returned' argument attribute 2016-07-11 01:28:42 +00:00
CodeGenTarget.h TableGen: Use StringRef instead of std::string 2016-05-25 18:07:40 +00:00
DAGISelEmitter.cpp
DAGISelMatcher.cpp [TableGen] Remove getHash support from DAGISelMatcher. It hasn't been used for some time. 2016-05-06 02:37:59 +00:00
DAGISelMatcher.h [TableGen] Remove isSafeToReorderWithPatternPredicate from DAGISelMatchers as its not used anymore. 2016-05-06 06:21:27 +00:00
DAGISelMatcherEmitter.cpp SDAG: Make SelectCodeCommon return void 2016-05-10 22:58:26 +00:00
DAGISelMatcherGen.cpp Apply most suggestions of clang-tidy's performance-unnecessary-value-param 2016-06-08 19:09:22 +00:00
DAGISelMatcherOpt.cpp [TableGen] Fix a memory leak when creating SwitchOpcodeMatchers. 2016-05-06 06:56:14 +00:00
DFAPacketizerEmitter.cpp Run clang-tidy's performance-unnecessary-copy-initialization over LLVM. 2016-06-12 17:30:47 +00:00
DisassemblerEmitter.cpp Apply most suggestions of clang-tidy's performance-unnecessary-value-param 2016-06-08 19:09:22 +00:00
FastISelEmitter.cpp Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
FixedLenDecoderEmitter.cpp [TableGen] Remove dead code. NFCI. 2016-07-04 19:21:42 +00:00
InstrInfoEmitter.cpp XRay: Add entry and exit sleds 2016-07-14 04:06:33 +00:00
IntrinsicEmitter.cpp Add a 'Returned' intrinsic property corresponding to the 'returned' argument attribute 2016-07-11 01:28:42 +00:00
LLVMBuild.txt
OptParserEmitter.cpp Fix some Clang-tidy modernize warnings, other minor fixes. 2015-11-04 22:32:32 +00:00
PseudoLoweringEmitter.cpp MC: Modernize MCOperand API naming. NFC. 2015-05-13 18:37:00 +00:00
RegisterInfoEmitter.cpp Avoid some copies by using const references. 2016-05-27 12:30:51 +00:00
SearchableTableEmitter.cpp TableGen: avoid string copy. 2016-07-05 22:51:30 +00:00
SequenceToOffsetTable.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
SubtargetEmitter.cpp Apply most suggestions of clang-tidy's performance-unnecessary-value-param 2016-06-08 19:09:22 +00:00
TableGen.cpp AArch64: TableGenerate system instruction operands. 2016-07-05 21:23:04 +00:00
TableGenBackends.h AArch64: TableGenerate system instruction operands. 2016-07-05 21:23:04 +00:00
X86DisassemblerShared.h Revert r234389. It really was needed but really should have been cstring instead of string.h 2015-04-08 06:03:17 +00:00
X86DisassemblerTables.cpp test commit: remove trailing whitespace 2016-06-20 20:43:26 +00:00
X86DisassemblerTables.h
X86ModRMFilters.cpp
X86ModRMFilters.h
X86RecognizableInstr.cpp AVX512F: Add GATHER/SCATTER assembler Intel syntax tests for knl/skx/avx . Change memory operand parser handling. 2016-02-25 13:30:17 +00:00
X86RecognizableInstr.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
tdtags