summaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2017-11-23[lit] Implement non-pipelined ‘mkdir’, ‘diff’ and ‘rm’ commands ↵Ying Yi
internally Summary: The internal shell already supports 'cd', ‘export’ and ‘echo’ commands. This patch adds implementation of non-pipelined ‘mkdir’, ‘diff’ and ‘rm’ commands as the internal shell builtins. Reviewers: Zachary Turner, Reid Kleckner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39567 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318911 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-23Revert r318822 "[llvm-tblgen] - Stop using std::string in RecordKeeper."George Rimar
It reported to have problems with memory sanitizers and DBUILD_SHARED_LIBS=ON. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318899 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22[llvm-tblgen] - Stop using std::string in RecordKeeper.George Rimar
RecordKeeper::getDef() is a hot place, it shows up in profiling and it creates std::string instance for each search in RecordMap though RecordKeeper::RecordMap can use StringRef as a key instead to avoid that. Patch do that change. Differential revision: https://reviews.llvm.org/D40170 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318822 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22[SelectionDAG] Add a isel matcher op to check the type of node results other ↵Craig Topper
than result 0. I plan to use this to check the type of the mask result of masked gathers in the X86 backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318820 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21[TableGen] Improve error reportingEvandro Menezes
When searching for a resource unit, use the reference location instead of the definition location in case of an error. Differential revision: https://reviews.llvm.org/D40263 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318803 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21[Asm] Improve "too few operands" errorsOliver Stannard
- We can still emit this error if the actual instruction has two or more operands missing compared to the expected one. - We should only emit this error once per instruction. Differential revision: https://reviews.llvm.org/D36746 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318770 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21[Asm] Finish matching once end of formal and actual lists reached (NFC)Oliver Stannard
This is NFC, as the matcher would continue looping up to the maximum number of operands with no effect, but this should improve performance a bit, and makes the debug trace clearer. Differential revision: https://reviews.llvm.org/D36744 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318769 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21Revert r318759 due to make check-all failure on WindowsSander de Smalen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318768 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21[TableGen] AsmMatcher: Fix bug with reported diagnostic for operand.Sander de Smalen
Summary: The generated diagnostic by the AsmMatcher isn't always applicable to the AsmOperand. This is because the code will only update the diagnostic if it is more specific than the previous diagnostic. However, when having validated operands and 'moved on' to a next operand (for some instruction/alias for which all previous operands are valid), if the diagnostic is InvalidOperand, than that should be set as the diagnostic, not the more specific message about a previous operand for some other instruction/alias candidate. Reviewers: craig.topper, olista01, rengolin, stoklund Reviewed By: olista01 Subscribers: javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D40011 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318759 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21Re-revert "Refactor debuginfo-tests."Zachary Turner
This is still breaking greendragon. At this point I give up until someone can fix the greendragon bots, and I will probably abandon this effort in favor of using a private github repository. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318722 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-20Resubmit "Refactor debuginfo-tests" again.Zachary Turner
This was reverted due to the tests being run twice on some build bots. Each run had a slightly different configuration due to the way in which it was being invoked. This fixes the problem (albeit in a somewhat hacky way). Hopefully in the future we can get rid of the workflow of running debuginfo-tests as part of clang, and then this hack can go away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318697 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-20[AArch64][TableGen] Skip tied result operands for InstAliasSander de Smalen
Summary: This patch fixes an issue so that the right alias is printed when the instruction has tied operands. It checks the number of operands in the resulting instruction as opposed to the alias, and then skips over tied operands that should not be printed in the alias. This allows to generate the preferred assembly syntax for the AArch64 'ins' instruction, which should always be displayed as 'mov' according to the ARM Architecture Reference Manual. Several unit tests have changed as a result, but only to reflect the preferred disassembly. Some other InstAlias patterns (movk/bic/orr) needed a slight adjustment to stop them becoming the default and breaking other unit tests. Please note that the patch is mostly the same as https://reviews.llvm.org/D29219 which was reverted because of an issue found when running TableGen with the Address Sanitizer. That issue has been addressed in this iteration of the patch. Reviewers: rengolin, stoklund, huntergr, SjoerdMeijer, rovka Reviewed By: rengolin, SjoerdMeijer Subscribers: fhahn, aemerson, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D40030 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318650 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-19[LIT] Fix testing out-of-tree Clang buildsEric Fiselier
Summary: Currently, LIT configures the LLVM binary path before the Clang binary path. However this breaks testing out-of-tree Clang builds (where the LLVM binary path includes a copy of Clang). This patch reverses the order of the paths when looking for Clang, putting the Clang binary directory first. Reviewers: zturner, beanz, chapuni, modocache, EricWF Reviewed By: EricWF Subscribers: mgorny, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D40217 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-18[globalisel][tablegen] Generalize pointer-type inference by introducing ↵Daniel Sanders
ptypeN. NFC ptypeN is functionally the same as typeN except that it informs the SelectionDAG importer that an operand should be treated as a pointer even if it was written as iN. This is important for patterns that use iN instead of iPTR to represent pointers. E.g.: (set GPR64:$dst, (load GPR64:$addr)) Previously, this was handled as a hardcoded special case for the appropriate operands to G_LOAD and G_STORE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318574 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-17[lit] Try to improve Ctrl-C behavior on WindowsReid Kleckner
This functionality was broken during a refactor a while back because 'pool' is no longer in scope. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-17Fix an issue with llvm lit tool substitutions.Zachary Turner
When using an installed clang with an in-tree llvm, we were not searching in the right paths for the tools. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-17Fix a bunch more layering of CodeGen headers that are in TargetDavid Blaikie
All these headers already depend on CodeGen headers so moving them into CodeGen fixes the layering (since CodeGen depends on Target, not the other way around). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318490 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-17Re-revert "Refactor debuginfo-tests"Zachary Turner
This is still broken because it causes certain tests to be run twice with slightly different configurations, which is wrong in some cases. You can observe this by running: ninja -nv check-all | grep debuginfo-tests And seeing that it passes clang/test and clang/test/debuginfo-tests to lit, which causes it to run debuginfo-tests twice. The fix is going to involve either: a) figuring out that we're running in this "deprecated" configuration, and then deleting the clang/test/debuginfo-tests path, which should cause it to behave identically to before, or: b) make lit smart enough that it doesn't descend into a sub-suite if that sub-suite already has a lit.cfg file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318486 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16Resubmit "Refactor debuginfo-tests"Zachary Turner
This was reverted due to some failures on specific darwin buildbots, the issue being that the new lit configuration was not setting the SDKROOT environment variable. We've tested a fix locally and confirmed that it works, so this patch resubmits everything with the fix applied. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318435 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16[globalisel][tablegen] Generate rule coverage and use it to identify ↵Daniel Sanders
untested rules Summary: This patch adds a LLVM_ENABLE_GISEL_COV which, like LLVM_ENABLE_DAGISEL_COV, causes TableGen to instrument the generated table to collect rule coverage information. However, LLVM_ENABLE_GISEL_COV goes a bit further than LLVM_ENABLE_DAGISEL_COV. The information is written to files (${CMAKE_BINARY_DIR}/gisel-coverage-* by default). These files can then be concatenated into ${LLVM_GISEL_COV_PREFIX}-all after which TableGen will read this information and use it to emit warnings about untested rules. This technique could also be used by SelectionDAG and can be further extended to detect hot rules and give them priority over colder rules. Usage: * Enable LLVM_ENABLE_GISEL_COV in CMake * Build the compiler and run some tests * cat gisel-coverage-[0-9]* > gisel-coverage-all * Delete lib/Target/*/*GenGlobalISel.inc* * Build the compiler Known issues: * ${LLVM_GISEL_COV_PREFIX}-all must be generated as a manual step due to a lack of a portable 'cat' command. It should be the concatenation of all ${LLVM_GISEL_COV_PREFIX}-[0-9]* files. * There's no mechanism to discard coverage information when the ruleset changes Depends on D39742 Reviewers: ab, qcolombet, t.p.northover, aditya_nandakumar, rovka Reviewed By: rovka Subscribers: vsk, arsenm, nhaehnle, mgorny, kristof.beyls, javed.absar, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D39747 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-14[Docs] Add tablegen backend for target opcode documentationOliver Stannard
This is a tablegen backend to generate documentation for the opcodes that exist for each target. For each opcode, it lists the assembly string, the names and types of all operands, and the flags and predicates that apply to the opcode. Differential revision: https://reviews.llvm.org/D31025 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318155 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13Revert "Update test_debuginfo.pl script to point to new tree location."Zachary Turner
This reverts the aforementioned patch and 2 subsequent follow-ups, as some buildbots are still failing 2 tests because of it. Investigation is ongoing into the cause of the failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318112 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13[tablegen] Handle atomic predicates for ordering inside tablegen. NFC.Daniel Sanders
Similar to r315841, GlobalISel and SelectionDAG require different code for the common atomic predicates due to differences in the representation. Even without that, differences in the IR (SDNode vs MachineInstr) require differences in the C++ predicate. This patch moves the implementation of the common atomic predicates related to ordering into tablegen so that it can handle these differences. It's NFC for SelectionDAG since it emits equivalent code and it's NFC for GlobalISel since the rules involving the relevant predicates are still rejected by the importer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318102 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13[tablegen] Handle atomic predicates for memory type inside tablegen. NFC.Daniel Sanders
Similar to r315841, GlobalISel and SelectionDAG require different code for the common atomic predicates due to differences in the representation. Even without that, differences in the IR (SDNode vs MachineInstr) require differences in the C++ predicate. This patch moves the implementation of the common atomic predicates related to memory type into tablegen so that it can handle these differences. It's NFC for SelectionDAG since it emits equivalent code and it's NFC for GlobalISel since the rules involving the relevant predicates are still rejected by the importer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318095 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13[globalisel][tablegen] Add support for extload.Daniel Sanders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318068 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13fix printing of alias instructions by removing redundant spacingPetar Jovanovic
Some alias instructions are printed with an extra space after the tab character. Fix this by skipping that space when the tab character is printed so that the instructions are aligned with the rest of the code. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D35946 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318059 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-11[globalisel][tablegen] Import signextload and zeroextload.Daniel Sanders
Allow a pattern rewriter to be installed in CodeGenDAGPatterns and use it to correct situations where SelectionDAG and GlobalISel disagree on representation. For example, it would rewrite: (sextload:i32 $ptr)<<unindexedload>><<sextload>><<sextloadi16> to: (sext:i32 (load:i16 $ptr)<<unindexedload>>) I'd have preferred to replace the fragments and have the expansion happen naturally as part of PatFrag expansion but the type inferencing system can't cope with loads of types narrower than those mentioned in register classes. This is because the SDTCisInt's on the sext constrain both the result and operand to the 'legal' integer types (where legal is defined as 'a register class can contain the type') which immediately rules the narrower types out. Several targets (those with only one legal integer type) would then go on to crash on the SDTCisOpSmallerThanOp<> when it removes all the possible types for the result of the extend. Also, improve isObviouslySafeToFold() slightly to automatically return true for neighbouring instructions. There can't be any re-ordering problems if re-ordering isn't happenning. We'll need to improve it further to handle sign/zero-extending loads when the extend and load aren't immediate neighbours though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317971 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10Update test_debuginfo.pl script to point to new tree location.Zachary Turner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317949 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10[debuginfo-tests] Make debuginfo-tests work in a standard configuration.Zachary Turner
Previously, debuginfo-tests was expected to be checked out into clang/test and then the tests would automatically run as part of check-clang. This is not a standard workflow for handling external projects, and it brings with it some serious drawbacks such as the inability to depend on things other than clang, which we will need going forward. The goal of this patch is to migrate towards a more standard workflow. To ease the transition for build bot maintainers, this patch tries not to break the existing workflow, but instead simply deprecate it to give maintainers a chance to update the build infrastructure. Differential Revision: https://reviews.llvm.org/D39605 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10Allow separation of declarations and definitions in <Target>ISelDAGToDAG.incKrzysztof Parzyszek
This patch adds the ability to include the member function declarations in the instruction selector class separately from the member bodies. Defining GET_DAGISEL_DECL macro to any value will only include the member declarations. To include bodies, define GET_DAGISEL_BODY macro to be the selector class name. Example: class FooDAGToDAGISel : public SelectionDAGISel { // Pull in declarations only. #define GET_DAGISEL_DECL #include "FooISelDAGToDAG.inc" }; // Include the function bodies (with names qualified with the provided // class name). #define GET_DAGISEL_BODY FooDAGToDAGISel #include "FooISelDAGToDAG.inc" When neither of the two macros are defined, the function bodies are emitted inline (in the same way as before this patch). Differential Revision: https://reviews.llvm.org/D39596 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317903 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[utils] Fix RISC-V support in update_llc_test_checks.pyAlex Bradbury
scrub_asm_riscv now takes two arguments rather than one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317826 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08[utils] Add RISC-V support to update_llc_test_checks.pyAlex Bradbury
This should be a trivial change, and I've started using it for generating all tests at https://github.com/lowrisc/riscv-llvm (i.e. it's been tested in action quite a lot). Note that the regex does not attempt to match .cfi_startproc, as I want to ensure compatibility with functions that have the nounwind attribute. Differential Revision: https://reviews.llvm.org/D39789 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317693 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07Add a -D flag to FileCheck to define variablesAlexander Richardson
Summary: This makes it very easy to test files that only differ in a constant value somewhere in the test case. Reviewers: jlebar, hfinkel, chandlerc, probinson Reviewed By: probinson Subscribers: probinson, llvm-commits Differential Revision: https://reviews.llvm.org/D39629 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07[AArch64][SVE] Asm: Extend EnforceVectorSubVectorTypeIs to distinguish ↵Florian Hahn
Scalable Vectors Patch [1/5] in a series to add assembler/disassembler support for AArch64 SVE unpredicated ADD/SUB instructions. Patch by Sander De Smalen. Reviewed by: rengolin Differential Revision: https://reviews.llvm.org/D39087 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-06update_mir_test_checks: Be careful about replacing entire vregsJustin Bogner
Previously, this could end up replacing a vreg like %14 with [[VREG1]]4, where VREG1 was the match for %1. That's obviously not correct, though it hasn't actually come up in any tests I've converted so far. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317509 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-04Move the llvm-tblgen project into the Tablegenning folder on IDEs like ↵Aaron Ballman
Visual Studio rather than leave it in the root directory. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317420 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-04[X86] Teach EVEX->VEX pass to turn SHUFI32X4/SHUFF32X4/SHUFI64X/SHUFF64X2 ↵Craig Topper
into VPERM2F128/VPERM2I128. This recovers some of the tests that were changed by r317403. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317410 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03[globalisel][tablegen] Skip src child predicatesDiana Picus
The GlobalISel TableGen backend didn't check for predicates on the source children. This caused it to generate code for ARM patterns such as SMLABB or similar, but without properly checking for the sext_16_node part of the operands. This in turn meant that we would select SMLABB instead of MLA for simple sequences such as s32 + s32 * s32, which is wrong (we want a MLA on the full operands, not just their bottom 16 bits). This patch forces TableGen to skip patterns with predicates on the src children, so it doesn't generate code for SMLABB and other similar ARM instructions at all anymore. AArch64 and X86 are not affected. Differential Revision: https://reviews.llvm.org/D39554 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317313 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03[TableGen] Add an extra blank line to DAGISel output file to separate functions.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317298 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01[globalisel][regbank] Warn about MIR ambiguities when register bank/class ↵Daniel Sanders
names clash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317132 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01[X86] Add custom code to EVEX to VEX pass to turn unmasked 128-bit ↵Craig Topper
VPALIGND/Q into VPALIGNR if the extended registers aren't being used. This will enable us to prefer VALIGND/Q during shuffle lowering in order to get the extended register encoding space when BWI isn't available. But if we end up not using the extended registers we can switch VPALIGNR for the shorter VEX encoding. Differential Revision: https://reviews.llvm.org/D39401 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01[globalisel][tablegen] Add support for multi-insn emissionDaniel Sanders
The importer will now accept nested instructions in the result pattern such as (ADDWrr $a, (SUBWrr $b, $c)). This is only valid when the nested instruction def's a single vreg and the parent instruction consumes a single vreg where a nested instruction is specified. The importer will automatically create a vreg to connect the two using the type information from the pattern. This vreg will be constrained to the register classes given in the instruction definitions*. * REG_SEQUENCE is explicitly rejected because of this. The definition doesn't constrain to a register class and it therefore needs special handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317117 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01Fix warnings discovered by rL317076. [-Wunused-private-field]NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317091 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01[globalisel][tablegen] Stop hard-coding the emitted instruction ID to 0. NFCDaniel Sanders
The next commit will add support for multi-instruction emission so we need to start allocating instruction ID's instead of hard-coding them to 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317057 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01Add system-linux to allow tests run with llvm-lit to restrict themselves to ↵Jake Ehrlich
linux I need a test that only runs in a reasonable amount of time on systems that have sparse files. The broadest class of systems that support sparse files are linux systems. So restricting my test to linux systems should suffice. This change adds the system-linux feature to llvm-lit so that it can be required. Differential Revision: https://reviews.llvm.org/D39482 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317055 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31Re-commit: [globalisel][tablegen] Keep track of the insertion point while ↵Daniel Sanders
adding BuildMIAction's. NFC Multi-instruction emission needs to ensure the the instructions are generated a depth-first fashion. For example: (ADDWrr (SUBWrr a, b), c) needs to emit the SUBWrr before the ADDWrr. However, our walk over TreePatternNode's is highly context sensitive which makes it difficult to append BuildMIActions in the order we want. To fix this, we now keep track of the insertion point as we add actions. This will allow multi-insn emission to insert BuildMI's in the correct place. The previous commit failed on the Ubuntu bots using GCC 4.8. These bots lack the const_iterator forms of insert() and emplace() that were added in C++11. As a result I've switched the const_iterators to iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317049 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31Revert r317040: [globalisel][tablegen] Keep track of the insertion point ↵Daniel Sanders
while adding BuildMIAction's. NFC The same bots fail but I believe I know what the issue is now. These bots are missing the const_iterator versions of insert/emplace/etc. that were introduced in C++11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317042 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31Re-commit: [globalisel][tablegen] Keep track of the insertion point while ↵Daniel Sanders
adding BuildMIAction's. NFC Multi-instruction emission needs to ensure the the instructions are generated a depth-first fashion. For example: (ADDWrr (SUBWrr a, b), c) needs to emit the SUBWrr before the ADDWrr. However, our walk over TreePatternNode's is highly context sensitive which makes it difficult to append BuildMIActions in the order we want. To fix this, we now keep track of the insertion point as we add actions. This will allow multi-insn emission to insert BuildMI's in the correct place. The previous commit failed on the Ubuntu bots using GCC 4.8. These bots didn't like a call to emplace(). I've replaced it with insert() to see if it's a quirk of the C++11 support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317040 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31Revert r317029: [globalisel][tablegen] Keep track of the insertion point ↵Daniel Sanders
while adding BuildMIAction's. NFC The Linux bots don't seem to like this usage of emplace(). Reverting while I look into it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317033 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31[globalisel][tablegen] Keep track of the insertion point while adding ↵Daniel Sanders
BuildMIAction's. NFC Multi-instruction emission needs to ensure the the instructions are generated a depth-first fashion. For example: (ADDWrr (SUBWrr a, b), c) needs to emit the SUBWrr before the ADDWrr. However, our walk over TreePatternNode's is highly context sensitive which makes it difficult to append BuildMIActions in the order we want. To fix this, we now keep track of the insertion point as we add actions. This will allow multi-insn emission to insert BuildMI's in the correct place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317029 91177308-0d34-0410-b5e6-96231b3b80d8