Commit Graph

6132 Commits

Author SHA1 Message Date
Diana Picus
33dd8eaf5d [ARM] GlobalISel: Use TableGen instruction selector
Emit and use the TableGen instruction selector for ARM. At the moment,
this allows us to remove the hand-written code for selecting G_SDIV and
G_UDIV.

Future commits will focus on increasing the code coverage for it and
removing more dead code from the current instruction selector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 09:40:49 +00:00
Daniel Sanders
bb8d1d09bc [globalisel][tablegen] Silence unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301755 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-29 19:10:19 +00:00
Daniel Sanders
f31ac9d1e8 [globalisel][tablegen] Compute available feature bits correctly.
Summary:
Predicate<> now has a field to indicate how often it must be recomputed.
Currently, there are two frequencies, per-module (RecomputePerFunction==0)
and per-function (RecomputePerFunction==1). Per-function predicates are
currently recomputed more frequently than necessary since the only predicate
in this category is cheap to test. Per-module predicates are now computed in
getSubtargetImpl() while per-function predicates are computed in selectImpl().

Tablegen now manages the PredicateBitset internally. It should only be
necessary to add the required includes.

Also fixed a problem revealed by the test case where
constrainSelectedInstRegOperands() would attempt to tie operands that
BuildMI had already tied.

Reviewers: ab, qcolombet, t.p.northover, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: kristof.beyls, igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301750 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-29 17:30:09 +00:00
Matt Arsenault
8c9ed246f2 TableGen: Add IntrHasSideEffects property for intrinsics
The IntrNoMem, IntrReadMem, IntrWriteMem, and IntrArgMemOnly intrinsic
properties differ from their corresponding LLVM IR attributes by specifying
that the intrinsic, in addition to its memory properties, has no other side
effects.

The IntrHasSideEffects flag used in combination with one of the memory flags
listed above, makes it possible to define an intrinsic such that its
properties at the CodeGen layer match its properties at the IR layer.

Patch by Tom Stellard

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301685 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28 21:01:46 +00:00
Matt Arsenault
ea376dae25 Add speculatable function attribute
This attribute tells the optimizer that the function may be speculated.

Patch by Tom Stellard

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301680 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28 20:25:27 +00:00
Simon Pilgrim
452c525cff Fixed assert message to correctly refer to MRMSrcReg4VOp3Frm/MRMSrcMeg4VOp3Frm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301544 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27 14:25:04 +00:00
Igor Breger
a620093752 [globalisel][tablegen] Fix vector element size
Summary: Fix vector element size.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: rovka, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301421 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26 15:59:05 +00:00
Reid Kleckner
154994d2b5 [git-llvm] Remove CR from middle of svn propget output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301268 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 22:26:46 +00:00
Reid Kleckner
d403ad1ed0 [git-llvm] Make push work on CRLF files with svn:eol-style=native
Summary:
`git apply` on Windows doesn't work for files that SVN checks out as
CRLF. There is no way to force SVN to check everything out with Unix
line endings on Windows. Files with svn:eol-style=native will always
come out with CRLF, breaking `git apply`, which wants Unix line endings.
My workaround is to list all files with this property set in the change,
and run `dos2unix` on them. SVN doesn't commit a massive line ending
change because the svn:eol-style property indicates that these are text
files.

Tested on r301245.

Reviewers: zturner, jlebar

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301262 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 22:09:08 +00:00
Daniel Sanders
4a4290955c [globalisel][tablegen] Add support for RegisterOperand.
Summary:
It functions just like RegisterClass except that the class is obtained
from a field.

Depends on D31761.

Reviewers: ab, qcolombet, t.p.northover, rovka, kristof.beyls, aditya_nandakumar

Reviewed By: ab

Subscribers: dberris, llvm-commits, igorb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301080 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-22 15:53:21 +00:00
Daniel Sanders
cc3830e7da [globalisel][tablegen] Revise API for ComplexPattern operands to improve flexibility.
Summary:
Some targets need to be able to do more complex rendering than just adding an
operand or two to an instruction. For example, it may need to insert an
instruction to extract a subreg first, or it may need to perform an operation
on the operand.

In SelectionDAG, targets would create SDNode's to achieve the desired effect
during the complex pattern predicate. This worked because SelectionDAG had a
form of garbage collection that would take care of SDNode's that were created
but not used due to a later predicate rejecting a match. This doesn't translate
well to GlobalISel and the churn was wasteful.

The API changes in this patch enable GlobalISel to accomplish the same thing
without the waste. The API is now:
	InstructionSelector::OptionalComplexRendererFn selectArithImmed(MachineOperand &Root) const;
where Root is the root of the match. The return value can be omitted to
indicate that the predicate failed to match, or a function with the signature
ComplexRendererFn can be returned. For example:
	return OptionalComplexRendererFn(
	       [=](MachineInstrBuilder &MIB) { MIB.addImm(Immed).addImm(ShVal); });
adds two immediate operands to the rendered instruction. Immed and ShVal are
captured from the predicate function.

As an added bonus, this also reduces the amount of information we need to
provide to GIComplexOperandMatcher.

Depends on D31418

Reviewers: aditya_nandakumar, t.p.northover, qcolombet, rovka, ab, javed.absar

Reviewed By: ab

Subscribers: dberris, kristof.beyls, igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301079 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-22 15:11:04 +00:00
Daniel Sanders
caed319d51 [globalisel][tablegen] Fix PR32733 by checking which instruction operands belong to.
canMutate() was returning true when the operands were all in the same order as
the matched instruction. However, it wasn't checking the operands were actually
on that instruction. This worked when we could only match a single instruction
but the addition of nested instruction matching led to cases where the operands
could be split across multiple instructions. canMutate() now returns false if
operands belong to instructions other than the root of the match.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301077 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-22 14:31:28 +00:00
Daniel Sanders
e8660ea63d [globalisel][tablegen] Import SelectionDAG's rule predicates and support the equivalent in GIRule.
Summary:
The SelectionDAG importer now imports rules with Predicate's attached via
Requires, PredicateControl, etc. These predicates are implemented as
bitset's to allow multiple predicates to be tested together. However,
unlike the MC layer subtarget features, each target only pays for it's own
predicates (e.g. AArch64 doesn't have 192 feature bits just because X86
needs a lot).

Both AArch64 and X86 derive at least one predicate from the MachineFunction
or Function so they must re-initialize AvailableFeatures before each
function. They also declare locals in <Target>InstructionSelector so that
computeAvailableFeatures() can use the code from SelectionDAG without
modification.

Reviewers: rovka, qcolombet, aditya_nandakumar, t.p.northover, ab

Reviewed By: rovka

Subscribers: aemerson, rengolin, dberris, kristof.beyls, llvm-commits, igorb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300993 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 15:59:56 +00:00
Daniel Sanders
9eb6db17b6 Revert r300964 + r300970 - [globalisel][tablegen] Import SelectionDAG's rule predicates and support the equivalent in GIRule.
It's causing llvm-clang-x86_64-expensive-checks-win to fail to compile and I
haven't worked out why. Reverting to make it green while I figure it out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300978 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 14:09:20 +00:00
Daniel Sanders
20f23a27dd [globalisel][tablegen] Try again to fix builds on old MSVC's after r300964
This should fix llvm-clang-x86_64-expensive-checks-win

I reproduced the error using the following code:
namespace llvm {
// Moving this out of the llvm namespace fixes the error.
template<unsigned NumBits> class PredicateBitsetImpl {};
}
namespace {
const unsigned MAX_SUBTARGET_PREDICATES = 11;
// This works on Clang but is broken on MSVC
//     using PredicateBitset = PredicateBitsetImpl<MAX_SUBTARGET_PREDICATES>;
// Some versions emit a syntax error here ("error C2061: syntax error: identifier
// 'PredicateBitsetImpl'") but others accept it and only emit the C3646 below.
//
// This works on Clang and MSVC
using PredicateBitset = llvm::PredicateBitsetImpl<MAX_SUBTARGET_PREDICATES>;

class Foo {
private: 
    PredicateBitset A; // error C3646: 'A': unknown override specifier
};
}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300970 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 12:51:43 +00:00
Daniel Sanders
ec8dbe0803 Revert: r300966 - [globalisel][tablegen] Attempt to fix builds on old MSVC's after r300964
It didn't fix the builder.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300968 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 12:08:25 +00:00
Daniel Sanders
548d25c9dd [globalisel][tablegen] Attempt to fix builds on old MSVC's after r300964
This should fix llvm-clang-x86_64-expensive-checks-win


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300966 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 11:29:29 +00:00
Daniel Sanders
d3ed5b78e5 [globalisel][tablegen] Import SelectionDAG's rule predicates and support the equivalent in GIRule.
Summary:
The SelectionDAG importer now imports rules with Predicate's attached via
Requires, PredicateControl, etc. These predicates are implemented as
bitset's to allow multiple predicates to be tested together. However,
unlike the MC layer subtarget features, each target only pays for it's own
predicates (e.g. AArch64 doesn't have 192 feature bits just because X86
needs a lot).

Both AArch64 and X86 derive at least one predicate from the MachineFunction
or Function so they must re-initialize AvailableFeatures before each
function. They also declare locals in <Target>InstructionSelector so that
computeAvailableFeatures() can use the code from SelectionDAG without
modification.

Reviewers: rovka, qcolombet, aditya_nandakumar, t.p.northover, ab

Reviewed By: rovka

Subscribers: aemerson, rengolin, dberris, kristof.beyls, llvm-commits, igorb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300964 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 10:27:20 +00:00
Amara Emerson
0e3700625d [MVT][SVE] Scalable vector MVTs (2/3)
Adds scalable vector machine value types, and updates
the switch statements required for tablegen.

Patch by Graham Hunter.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300840 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 13:36:58 +00:00
Aditya Nandakumar
48c8dfd647 [tblgen] GCC/MS builtin to target intrisics map.
Patch by Ettore Speziale

Allow TableGen to generate static functions to perform GCC/MS builtin name to
target specific intrinsic ID mapping.

https://reviews.llvm.org/D31150

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300735 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 19:14:20 +00:00
Hans Wennborg
c941e1f94e build_llvm_package.bat: Move to VS2017
It's required for building the clang-format plugin after r300225.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300273 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13 23:13:23 +00:00
Daniel Sanders
78f9d9d6a4 [globalisel][tablegen] Report more detail in some SelectionDAG import failures. NFC
Reviewers: ab, t.p.northover, qcolombet, aditya_nandakumar, rovka

Reviewed By: ab

Subscribers: dberris, kristof.beyls, igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300186 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13 09:45:37 +00:00
Daniel Sanders
81de2d08ab [globalisel][tablegen] Add experimental support for OperandWithDefaultOps, PredicateOperand, and OptionalDefOperand
Summary:
As far as instruction selection is concerned, all three appear to be same thing.

Support for these operands is experimental since AArch64 doesn't make use
of them and the in-tree targets that do use them (AMDGPU for
OperandWithDefaultOps, AMDGPU/ARM/Hexagon/Lanai for PredicateOperand, and ARM
for OperandWithDefaultOps) are not using tablegen-erated GlobalISel yet.

Reviewers: rovka, aditya_nandakumar, t.p.northover, qcolombet, ab

Reviewed By: rovka

Subscribers: inglorion, aemerson, rengolin, mehdi_amini, dberris, kristof.beyls, igorb, tpr, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300037 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-12 08:23:08 +00:00
Reid Kleckner
7b4e08c8d8 [lit] Try using process pools by default again
Both pickling errors encountered on clang bots and Darwin compiler-rt
should now be fixed.

This has no impact on testing time on Linux, and on Windows goes from
88s to 63s for 'check'. The tests pass on Mac, but I haven't compared
execution time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299775 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-07 15:28:32 +00:00
Reid Kleckner
57cceedbb1 [lit] Implement timeouts and max_time for process pool testing
This is necessary to pass the lit test suite at llvm/utils/lit/tests.

There are some pre-existing failures here, but now switching to pools
doesn't regress any tests.

I had to change test-data/lit.cfg to import DummyConfig from a module to
fix pickling problems, but I think it'll be OK if we require test
formats to be written in real .py modules outside lit.cfg files.

I also discovered that in some circumstances AsyncResult.wait() will not
raise KeyboardInterrupt in a timely manner, but you can pass a non-zero
timeout to work around this. This makes threading.Condition.wait use a
polling loop that runs through the interpreter, so it's capable of
asynchronously raising KeyboardInterrupt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299605 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06 00:38:28 +00:00
Reid Kleckner
3282f4edba [lit] Revert to old execution strategy while I debug these pickling errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299565 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-05 17:16:37 +00:00
Reid Kleckner
3f58a16d8e [lit] Use Python 3 style print to satisfy some bots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-05 17:05:31 +00:00
Reid Kleckner
e514965f7e [lit] Use process pools for test execution by default
Summary:
This drastically reduces lit test execution startup time on Windows. Our
previous strategy was to manually create one Process per job and manage
the worker pool ourselves. Instead, let's use the worker pool provided
by multiprocessing.  multiprocessing.Pool(jobs) returns almost
immediately, and initializes the appropriate number of workers, so they
can all start executing tests immediately. This avoids the ramp-up
period that the old implementation suffers from.  This appears to speed
up small test runs.

Here are some timings of the llvm-readobj tests on Windows using the
various execution strategies:

 # multiprocessing.Pool:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-process-pool |& grep real: ; done
real: 0m1.156s
real: 0m1.078s
real: 0m1.094s

 # multiprocessing.Process:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-processes |& grep real: ; done
real: 0m6.062s
real: 0m5.860s
real: 0m5.984s

 # threading.Thread:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-threads |& grep real: ; done
real: 0m9.438s
real: 0m10.765s
real: 0m11.079s

I kept the old code to launch processes in case this change doesn't work
on all platforms that LLVM supports, but at some point I would like to
remove both the threading and old multiprocessing execution strategies.

Reviewers: modocache, rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-05 16:44:56 +00:00
Daniel Sanders
be2d374747 [globalisel][tablegen] Fix patterns involving multiple ComplexPatterns.
Summary:
Temporaries are now allocated to operands instead of predicates and this
allocation is used to correctly pair up the rendered operands with the
matched operands.

Previously, ComplexPatterns were allocated temporaries independently in the
Src Pattern and Dst Pattern, leading to mismatches. Additionally, the Dst
Pattern failed to account for the allocated index and therefore always used
temporary 0, 1, ... when it should have used base+0, base+1, ...

Thanks to Aditya Nandakumar for noticing the bug.

Depends on D30539

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: igorb, dberris, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299538 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-05 13:14:03 +00:00
Rafael Espindola
7cc76f28bd [lit] Add a minimum export implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299475 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04 22:20:18 +00:00
Daniel Sanders
62b3ad70e2 [globalisel][tablegen] Fix non-determinism introduced in r299430.
This should fix the last issue on llvm-clang-x86_64-expensive-checks-win.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299436 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04 14:27:06 +00:00
Daniel Sanders
8eaecfe64f [globalisel][tablegen] Try to make MSVC happy with r299430
Fix other cases of 'const StringRef' creeping back in at the same time.

This should fix the llvm-clang-x86_64-expensive-checks-win buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299433 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04 13:52:00 +00:00
Daniel Sanders
690f0b25ab [tablegen][globalisel] Add support for nested instruction matching.
Summary:
Lift the restrictions that prevented the tree walking introduced in the
previous change and add support for patterns like:
  (G_ADD (G_MUL (G_SEXT $src1), (G_SEXT $src2)), $src3) -> SMADDWrrr $dst, $src1, $src2, $src3
Also adds support for G_SEXT and G_ZEXT to support these cases.

One particular aspect of this that I should draw attention to is that I've
tried to be overly conservative in determining the safety of matches that
involve non-adjacent instructions and multiple basic blocks. This is intended
to be used as a cheap initial check and we may add a more expensive check in
the future. The current rules are:
* Reject if any instruction may load/store (we'd need to check for intervening
  memory operations.
* Reject if any instruction has implicit operands.
* Reject if any instruction has unmodelled side-effects.
See isObviouslySafeToFold().

Reviewers: t.p.northover, javed.absar, qcolombet, aditya_nandakumar, ab, rovka

Reviewed By: ab

Subscribers: igorb, dberris, llvm-commits, kristof.beyls

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299430 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04 13:25:23 +00:00
Rafael Espindola
bc8f4f4a24 Rename variable.
Requested on post commit code review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299232 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 17:11:51 +00:00
Rafael Espindola
7066857d65 Add a %basename substitution.
This will be used to avoid various call to basename in the asan tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299216 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 13:41:10 +00:00
Rafael Espindola
922c62304e Use the current working directory in the glob expansion
This fixes tests that do things like

mkdir <dir>
cd <dir>
..
<cmd> *.foo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299209 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 12:46:39 +00:00
Simon Pilgrim
8d28e34276 Spelling mistakes in comments. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299197 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 10:59:37 +00:00
Rafael Espindola
62aabaa87d Use os.path.realpath when tracking the cwd.
This is needed by TestCases/Posix/coverage-direct.cc

The problem is that the test does:

mkdir <dir>
cd <dir>
cd ..
rm -rf <dir>
<more commands>

the current directory currently looks like "/.../<dir>/../" which
doesn't exist when dir is deleted.

at some point we should probably switch to using the os current
directory (specially if we want to add subshell), but this is a small
incremental improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299113 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 21:05:31 +00:00
Rafael Espindola
4e16bc09ec lit: support redirect from globs
This adds support for commands like

FileCheck < foobar*

which is used by some asan tests because the file they want to read
has a pid in the name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299111 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 20:48:58 +00:00
Daniel Sanders
b774d824a4 [globalisel][tablegen] Change Expected<bool> to Error and rename functions.
Functions that still return Expected<X> are now called createAndImport*()

Changing the return type was requested in the review comments for r299001



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299063 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30 09:36:33 +00:00
Daniel Sanders
5ae7dc8862 [tablegen][globalisel] Convert the SelectionDAG importer to a tree walking approach. NFC
Summary:
But don't actually inspect the tree any deeper than we already do. This
change is NFC but the next one will enable full traversal of the
source/destination patterns.

Depends on D30535

Reviewers: t.p.northover, qcolombet, aditya_nandakumar, rovka, ab

Subscribers: igorb, dberris, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 15:37:18 +00:00
Rafael Espindola
814c8a1f89 Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298994 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-29 14:20:38 +00:00
Javed Absar
47652291c2 Improve machine schedulers for in-order processors
This patch enables schedulers to specify instructions that 
cannot be issued with any other instructions.
It also fixes BeginGroup/EndGroup.

Reviewed by: Andrew Trick
Differential Revision: https://reviews.llvm.org/D30744



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298885 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-27 20:46:37 +00:00
Krzysztof Parzyszek
daa7fe44b1 [TableGen] Print #nnn as a name of an non-native reg unit with id nnn
When using -debug with -gen-register-info, tablegen will crash when
trying to print a name of a non-native register unit. This patch only
affects the debug information generated while running llvm-tblgen,
and has no impact on the compilable code coming out of it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298875 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-27 19:08:24 +00:00
Daniel Sanders
d5d860727b [tablegen] Use categories on options that only matter to one emitter.
Summary:
The categories are emitted in a strange order in this patch due to a bug in the
CommandLine library.

Reviewers: ab

Reviewed By: ab

Subscribers: ab, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298843 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-27 13:15:13 +00:00
Karl-Johan Karlsson
f6c7abbfd1 [TableGen] Make CodeGenMapTable understand the namespace field of an instruction
Do not force the backends to use target name as namespace.

Original patch by Mattias Eriksson

Reviewers: stoklund, craig.topper

Reviewed By: stoklund

Subscribers: materi, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298834 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-27 07:13:44 +00:00
Krzysztof Parzyszek
4712ec63c2 Move spill size and alignment info from MC to TargetRegisterInfo
This is another step towards implementing register classes with
parametrized register/spill sizes and value types.

This is an updated version of r298652. The difference is that MCRegister-
Class still contains register size, available as getPhysRegSize(). The
old function getSize was retained as a temporary measure to avoid build
breakage for out-of-tree targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298739 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 21:01:16 +00:00
Krzysztof Parzyszek
b3204c752e Revert r298652 on Quentin's request
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298727 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 19:18:29 +00:00
Tom Stellard
7a6e6b169d stable-merge-request.sh: Add a script for submitting merge requests via bugzilla
Summary:
This script will automatically create a new stable merge request bug in
bugzilla for the given svn revision and release number.

Reviewers: hans

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298705 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 16:13:18 +00:00
Benjamin Kramer
01a5eed38e Another instance where GCC doesn't understand implicit construction of StringLiteral.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298703 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 14:17:56 +00:00