llvm-6502/utils/TableGen
Benjamin Kramer 9589ff8949 Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types
If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of characters.


Call sites were found with the ASTMatcher + some semi-automated cleanup.

memberCallExpr(
    argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
    on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
    hasArgument(0, bindTemporaryExpr(
                       hasType(recordDecl(hasNonTrivialDestructor())),
                       has(constructExpr()))),
    unless(isInTemplateInstantiation()))

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238602 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-29 19:43:39 +00:00
..
AsmMatcherEmitter.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
AsmWriterEmitter.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
AsmWriterInst.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
AsmWriterInst.h [MCInstPrinter] Enable MCInstPrinter to change its behavior based on the 2015-03-27 20:36:02 +00:00
CallingConvEmitter.cpp CodeGen: convert CCState interface to using ArrayRefs 2015-02-21 02:11:17 +00:00
CMakeLists.txt
CodeEmitterGen.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
CodeGenDAGPatterns.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
CodeGenDAGPatterns.h [TableGen] Add support constraining a vector type in a pattern to have a specific element type and for constraining a vector type to have the same number of elements as another vector type. This is useful for AVX512 mask operations so we relate the mask type to the type of the other arguments. 2015-03-05 07:11:34 +00:00
CodeGenInstruction.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
CodeGenInstruction.h Add support for the convergent flag at the MC and MachineInstr levels. 2015-05-28 18:33:39 +00:00
CodeGenIntrinsics.h Add initial support for the convergent attribute. 2015-05-26 23:48:40 +00:00
CodeGenMapTable.cpp [TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() if it was just comparing to 0. NFC. 2015-05-14 05:53:53 +00:00
CodeGenRegisters.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
CodeGenRegisters.h RegAllocGreedy: Allow target to specify register class ordering. 2015-03-31 19:57:53 +00:00
CodeGenSchedule.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
CodeGenSchedule.h
CodeGenTarget.cpp Add initial support for the convergent attribute. 2015-05-26 23:48:40 +00:00
CodeGenTarget.h
CTagsEmitter.cpp
DAGISelEmitter.cpp
DAGISelMatcher.cpp
DAGISelMatcher.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
DAGISelMatcherEmitter.cpp Teach raw_ostream to accept SmallString. 2015-03-10 07:33:23 +00:00
DAGISelMatcherGen.cpp Fix tablegen's PrintFatalError function to run registered file 2015-05-11 22:17:13 +00:00
DAGISelMatcherOpt.cpp
DFAPacketizerEmitter.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
DisassemblerEmitter.cpp
FastISelEmitter.cpp
FixedLenDecoderEmitter.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
InstrInfoEmitter.cpp Add support for the convergent flag at the MC and MachineInstr levels. 2015-05-28 18:33:39 +00:00
IntrinsicEmitter.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
LLVMBuild.txt
Makefile
module.modulemap
OptParserEmitter.cpp
PseudoLoweringEmitter.cpp MC: Modernize MCOperand API naming. NFC. 2015-05-13 18:37:00 +00:00
RegisterInfoEmitter.cpp TableGen: Generate more const goodness 2015-04-01 22:09:55 +00:00
SequenceToOffsetTable.h
SubtargetEmitter.cpp Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
TableGen.cpp
TableGenBackends.h
tdtags
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 AVX-512: Added VPTESTM and VPTESTNM instructions for SKX 2015-04-21 13:13:46 +00:00
X86DisassemblerTables.h [X86] Make the instructions that use AdSize16/32/64 co-exist together without using mode predicates. 2015-01-02 07:02:25 +00:00
X86ModRMFilters.cpp
X86ModRMFilters.h
X86RecognizableInstr.cpp AVX-512: Added VPMOVx2M instructions for SKX, 2015-04-21 14:38:31 +00:00
X86RecognizableInstr.h