1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/utils/TableGen
Ayman Musa e708cd8422 [TableGen] Fix bug in TableGen CodeGenPatterns when adding variants of the patterns.
All patterns reside in a std::vector container, where new variants are added to it using the standard library's emplace_back function.
When calling this with a new element while there is no enough allocated space, a bigger space is allocated and all the old info in the small vector is copied to the newly allocated vector, then the old vector is freed.
The problem is that before doing this "copying", we take a reference of one of the elements in the old vector, and after the "copying" we add it to the new vector.
As the old vector is freed after the copying, the reference now does not point to a valid element.

Added new function to the API of CodeGenDAGPatterns class to return the same information as a copy in order to avoid this issue.

This was revealed in rL305465 that added many patterns and forced the reallocation of the vector which caused crashes in windows bots.

Differential Revision: https://reviews.llvm.org/D34341

llvm-svn: 306371
2017-06-27 07:10:20 +00:00
..
AsmMatcherEmitter.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
AsmWriterEmitter.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
AsmWriterInst.cpp
AsmWriterInst.h
Attributes.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
CallingConvEmitter.cpp
CMakeLists.txt [x86] Revert the X86FoldTablesEmitter due to more miscompiles. 2017-06-06 02:15:31 +00:00
CodeEmitterGen.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
CodeGenDAGPatterns.cpp [TableGen] Fix bug in TableGen CodeGenPatterns when adding variants of the patterns. 2017-06-27 07:10:20 +00:00
CodeGenDAGPatterns.h [TableGen] Remove some copies around PatternToMatch. 2017-06-25 17:33:49 +00:00
CodeGenInstruction.cpp [TableGen] Add EncoderMethod to RegisterOperand 2017-05-15 10:13:07 +00:00
CodeGenInstruction.h
CodeGenIntrinsics.h TableGen: Add IntrHasSideEffects property for intrinsics 2017-04-28 21:01:46 +00:00
CodeGenMapTable.cpp [TableGen] Make CodeGenMapTable understand the namespace field of an instruction 2017-03-27 07:13:44 +00:00
CodeGenRegisters.cpp [TableGen] Remove code for renaming anonymous register classes as it can never execute. 2017-06-01 06:56:13 +00:00
CodeGenRegisters.h [TableGen] Use StringRef to capture getValueAsString in a couple more places. NFC 2017-06-01 06:56:11 +00:00
CodeGenSchedule.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
CodeGenSchedule.h
CodeGenTarget.cpp [MVT] add v1i1 MVT 2017-05-18 11:29:41 +00:00
CodeGenTarget.h
CTagsEmitter.cpp
DAGISelEmitter.cpp
DAGISelMatcher.cpp
DAGISelMatcher.h
DAGISelMatcherEmitter.cpp [tablegen] Use categories on options that only matter to one emitter. 2017-03-27 13:15:13 +00:00
DAGISelMatcherGen.cpp Use range for loops. NFCI. 2017-06-19 13:24:12 +00:00
DAGISelMatcherOpt.cpp
DFAPacketizerEmitter.cpp
DisassemblerEmitter.cpp
FastISelEmitter.cpp
FixedLenDecoderEmitter.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
GlobalISelEmitter.cpp [globalisel][tablegen] Add support for COPY_TO_REGCLASS. 2017-06-20 12:36:34 +00:00
InstrInfoEmitter.cpp
IntrinsicEmitter.cpp [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
LLVMBuild.txt
OptParserEmitter.cpp [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
PseudoLoweringEmitter.cpp
RegisterBankEmitter.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
RegisterInfoEmitter.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
SearchableTableEmitter.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
SequenceToOffsetTable.h
SubtargetEmitter.cpp [TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string. 2017-05-31 21:12:46 +00:00
SubtargetFeatureInfo.cpp [globalisel][tablegen] Compute available feature bits correctly. 2017-04-29 17:30:09 +00:00
SubtargetFeatureInfo.h [globalisel][tablegen] Compute available feature bits correctly. 2017-04-29 17:30:09 +00:00
TableGen.cpp [x86] Revert the X86FoldTablesEmitter due to more miscompiles. 2017-06-06 02:15:31 +00:00
TableGenBackends.h [x86] Revert the X86FoldTablesEmitter due to more miscompiles. 2017-06-06 02:15:31 +00:00
tdtags
Types.cpp [globalisel][tablegen] Import SelectionDAG's rule predicates and support the equivalent in GIRule. 2017-04-21 15:59:56 +00:00
Types.h
X86DisassemblerShared.h
X86DisassemblerTables.cpp
X86DisassemblerTables.h
X86EVEX2VEXTablesEmitter.cpp Another instance where GCC doesn't understand implicit construction of StringLiteral. 2017-03-24 14:17:56 +00:00
X86ModRMFilters.cpp
X86ModRMFilters.h
X86RecognizableInstr.cpp [X86] Moving X86Local namespace from .cpp to .h file to use it in memory folding TableGen backend. 2017-05-11 11:51:12 +00:00
X86RecognizableInstr.h [X86] Moving X86Local namespace from .cpp to .h file to use it in memory folding TableGen backend. 2017-05-11 11:51:12 +00:00