Commit Graph

5425 Commits

Author SHA1 Message Date
Dimitry Andric
85e9772512 Avoid early pipefail exits due to grep failures in stage comparisons.
If objects or executables did not contain any RPATH, grep would return
nonzero, and the whole stage comparison loop would unexpectedly exit.
Fix this by checking the grep result explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242722 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 22:24:40 +00:00
Dimitry Andric
186b3e7e9e Since BSD cmp(1) does not support the --ignore-initial option, use the
more portable 3rd and 4th arguments to skip the first 16 bytes during
the comparison of Phase2 and Phase3 objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242721 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 22:07:27 +00:00
Hans Wennborg
ca221d01d0 test-release.sh: don't include /usr/local prefix in the tarball
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242706 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 20:36:21 +00:00
Reid Kleckner
8fd1953423 [lit] Implement 'env' in the internal shell
The MSys 2 version of 'env' cannot be used to set 'TZ' in the
environment due to some portability hacks in the process spawning
compatibility layer[1]. This affects test/Object/archive-toc.test, which
tries to set TZ in the environment.

Other than that, this saves a subprocess invocation of a small unix
utility, which is makes the tests faster.

The internal shell does not support shell variable expansion, so this
idiom in the ASan tests isn't supported yet:
  RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:opt=1 ...

[1] https://github.com/Alexpux/MSYS2-packages/issues/294

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242696 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 19:42:08 +00:00
Eric Fiselier
4ec433f504 [LIT] Allow for executeCommand to take the stdin input.
Summary: This patch allows executeCommand to pass a string to the processes stdin.

Reviewers: ddunbar, jroelofs

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242631 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-19 00:28:14 +00:00
Hans Wennborg
8a8582d6e9 Add libunwind to the release scripts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242543 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-17 16:49:59 +00:00
Daniel Sanders
fe6ad9692a test-release.sh: Add ability to do a test build using the trunk or branches.
Summary:
Adds '--svn-path BRANCH' that causes the script to export the specified path
from each project. Otherwise the tag specified by -release, -rc, etc. will be
used. The version portion of the package name will be 'test-$path' (any forward
slashes in the branch name are replaced with underscores), for example:
  -svn-path trunk => clang+llvm-test-trunk-mips-linux-gnu.tar.xz
  -svn-path branches/release_35 => clang+llvm-test-branches_release_35-mips-linux-gnu.tar.xz

This is primarily useful for bringing new release packages up to standard
without needing to create and maintain a tag for the purpose.

Reviewers: tstellarAMD, hans

Subscribers: llvm-commits

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242518 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-17 10:40:40 +00:00
Mehdi Amini
9c5961b7ba Move most user of TargetMachine::getDataLayout to the Module one
Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

This patch is quite boring overall, except for some uglyness in
ASMPrinter which has a getDataLayout function but has some clients
that use it without a Module (llmv-dsymutil, llvm-dwarfdump), so
some methods are taking a DataLayout as parameter.

Reviewers: echristo

Subscribers: yaron.keren, rafael, llvm-commits, jholewinski

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242386 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16 06:11:10 +00:00
Hans Wennborg
db210912ad test-release.sh: Run both .o files through sed before comparing them
On some systems (e.g. Mac OS X), sed will add a newline to the end of
the output if there wasn't one already. This would cause false
cmp errors since the .o file from Phase 2 was passed through sed and
the one from Phase 3 wasn't. Work around this by passing both through
sed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242341 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 22:18:25 +00:00
Hans Wennborg
f9893938de Switch the release script to build with CMake by default (PR21561)
It retains the possibility to use the autoconf build with a
command-line option ('-use-autoconf'), and uses that by default on Darwin since
compiler-rt requires it on that platform.

This commit also removes the "Release-64" flavour and related logic. The script
would previously do two builds unless the '-no-64bit' flag was passed, but on
my machine and from those I asked this always ended up producing two 64-bit builds,
causing much confusion.

It also removes the -build-triple option, which caused the --build= flag to
get passed to ./configure. This was presumably intended for cross-compiling,
but none of the release testers use it. If someone does want to pass it,
they can use '-configure-flags --build=foo' instead.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242331 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 21:06:16 +00:00
Petr Pavlu
d2e1e42c1a [TableGen] Improve decoding options for non-orthogonal instructions
When FixedLenDecoder matches an input bitpattern of form [01]+ with an
instruction bitpattern of form [01?]+ (where 0/1 are static bits and ? are
mixed/variable bits) it passes the input bitpattern to a specific instruction
decoder method which then makes a final decision whether the bitpattern is a
valid instruction or not. This means the decoder must handle all possible
values of the variable bits which sometimes leads to opcode rewrites in the
decoder method when the instructions are not fully orthogonal.

The patch provides a way for the decoder method to say that when it returns
Fail it does not necessarily mean the bitpattern is invalid, but rather that
the bitpattern is definitely not an instruction that is recognized by the
decoder method. The decoder can then try to match the input bitpattern with
other possible instruction bitpatterns.

For example, this allows to solve a situation on AArch64 where the `MSR
(immediate)` instruction has form:
1101 0101 0000 0??? 0100 ???? ???1 1111
but not all values of the ? bits are allowed. The rejected values should be
handled by the `extended MSR (register)` instruction:
1101 0101 000? ???? ???? ???? ???? ????

The decoder will first try to decode an input bitpattern that matches both
bitpatterns as `MSR (immediate)` but currently this puts the decoder method of
`MSR (immediate)` into a situation when it must be able to decode all possible
values of the ? bits, i.e. it would need to rewrite the instruction to `MSR
(register)` when it is not `MSR (immediate)`.

The patch allows to specify that the decoder method cannot determine if the
instruction is valid for all variable values. The decoder method can simply
return Fail when it knows it is definitely not `MSR (immediate)`. The decoder
will then backtrack the decoding and find that it can match the input
bitpattern with the more generic `MSR (register)` bitpattern too.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 08:04:27 +00:00
Chandler Carruth
a07ff8e0fa [vim] Update the syntax to mark REQUIRES lines and not talk about
dejagnu.

I wonder if it would be useful to handle FileCheck prefixes specially?
Especially if we could get some error checking. Suggestions welcome.
Patches more welcome as I have no idea what I'm doing with vim
script....

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 01:48:40 +00:00
Chandler Carruth
11325f48fc [vim] Add the IR's comment prefix to the comments list. This allows vim
to intelligently wrap prose written in IR comment blocks. This has
bothered me for roughly ever, and my fellow IRC denziens convinced me to
fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242266 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 01:36:50 +00:00
Hans Wennborg
e1bb535422 test-release.sh: Remove the InstallDir parameter from configure_llvmCore
After r242187, it's never set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242194 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 20:15:15 +00:00
Dan Liew
fb17afba61 Fix several issues with the test-release.sh script
* Use the default install prefix (/usr/local) and use DESTDIR instead to
  set a temporary install location for tarballing. This is the correct
  way to package binary releases (otherwise the temporary install path
  ends up in files in the binary release).
* Remove ``-disable-clang`` option. It did not work correctly
  (tarballing assumed phase 3 was run) and when doing a release
  we should always be doing a three-phased build and test.

Note: Technically we should only be using DESTDIR for the third phase
and use --prefix for the first and second phase because we run the built
clang from phase 1 and 2 (and in general an application's behaviour
may depend on the install prefix). However in the case of clang it
seems to not care what the install prefix was so to simplify the script
we use DESTDIR for all three stages.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242187 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 19:46:19 +00:00
Petr Pavlu
936924f3fd Fix comment typo
Test commit access.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242128 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 08:00:34 +00:00
Elena Demikhovsky
a0a51734cd AVX-512: Added all AVX-512 forms of Vector Convert for Float/Double/Int/Long types.
In this patch I have only encoding. Intrinsics and DAG lowering will be in the next patch.
I temporary removed the old intrinsics test (just to split this patch).
Half types are not covered here.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242023 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-13 13:26:20 +00:00
Duncan P. N. Exon Smith
16859aa242 MC: Remove MCSubtargetInfo() default constructor
Force all creators of `MCSubtargetInfo` to immediately initialize it,
merging the default constructor and the initializer into an initializing
constructor.  Besides cleaning up the code a little, this makes it clear
that the initializer is never called again later.

Out-of-tree backends need a trivial change: instead of calling:

    auto *X = new MCSubtargetInfo();
    InitXYZMCSubtargetInfo(X, ...);
    return X;

they should call:

    return createXYZMCSubtargetInfoImpl(...);

There's no real functionality change here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241957 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-10 22:43:42 +00:00
JF Bastien
99cb989593 Target RegisterInfo: devirtualize TargetFrameLowering
Summary:
The target frame lowering's concrete type is always known in RegisterInfo, yet it's only sometimes devirtualized through a static_cast. This change adds an auto-generated static function <Target>GenRegisterInfo::getFrameLowering(const MachineFunction &MF) which does this devirtualization, and uses this function in all targets which can.

This change was suggested by sunfish in D11070 for WebAssembly, I figure that I may as well improve the other targets while I'm here.

Subscribers: sunfish, ted, llvm-commits, jfb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241921 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-10 18:13:17 +00:00
Reid Kleckner
8f32e5f0d6 Rename llvm.frameescape and llvm.framerecover to localescape and localrecover
Summary:
Initially, these intrinsics seemed like part of a family of "frame"
related intrinsics, but now I think that's more confusing than helpful.
Initially, the LangRef specified that this would create a new kind of
allocation that would be allocated at a fixed offset from the frame
pointer (EBP/RBP). We ended up dropping that design, and leaving the
stack frame layout alone.

These intrinsics are really about sharing local stack allocations, not
frame pointers. I intend to go further and add an `llvm.localaddress()`
intrinsic that returns whatever register (EBP, ESI, ESP, RBX) is being
used to address locals, which should not be confused with the frame
pointer.

Naming suggestions at this point are welcome, I'm happy to re-run sed.

Reviewers: majnemer, nicholas

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241633 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-07 22:25:32 +00:00
Dan Liew
9fb4897162 Fix bug in test-release.sh where the script would not exit if any
of the build stages that are sent through a pipe (e.g. tee) failed.

This potentially allowed builds and/or tests to fail without anyone
noticing. It appears that for the LLVM 3.6.[01] releases this actually
happened for the Ubuntu 14.04LTS binary releases. The essence of the
issue is that without ``set -o pipefail`` the following command in bash
has a zero exit code.

false | tee /dev/null ; exit $?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241599 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-07 15:50:33 +00:00
NAKAMURA Takumi
34be8041b3 Make UnitTestMain/TestMain.cpp free from llvm/Config/config.h.
llvm/Config/config.h is unavailable outside of build tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241523 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-06 23:51:40 +00:00
Ranjeet Singh
b0f7871d4e Reverting r241058 because it's causing buildbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241061 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-30 12:32:53 +00:00
Ranjeet Singh
a5106ca54d There are a few places where subtarget features are still
represented by uint64_t, this patch replaces these
usages with the FeatureBitset (std::bitset) type.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241058 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-30 11:30:42 +00:00
Alex Lorenz
1a4def3d97 MIR Serialization: Serialize the register mask machine operands.
This commit implements serialization of the register mask machine
operands. This commit serializes only the call preserved register
masks that are defined by a target, it doesn't serialize arbitrary
register masks.

This commit also extends the TargetRegisterInfo class and TableGen so that
the users of TRI can get the list of all the call preserved register masks and
their names.

Reviewers: Duncan P. N. Exon Smith

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240966 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-29 16:57:06 +00:00
Elena Demikhovsky
b23b2fbd3a AVX-512: Added all SKX forms of GATHER instructions.
Added intrinsics.
Added encoding and tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240905 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-28 10:53:29 +00:00
Evgeniy Stepanov
0d1ad626e8 Pass 2 more variables to lit tests.
Pass ADB and ADB_SERIAL environment variables to lit tests.
This would allow running Android tests in compiler-rt when
there is more than one device attached to the host.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240459 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-23 20:57:26 +00:00
Alexander Kornienko
b7c46b5fc9 Revert r240271 (Fixed/added namespace ending comments using clang-tidy. NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240393 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-23 10:48:35 +00:00
Hans Wennborg
33d68a5183 test-release.sh: Minor fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240334 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-22 21:13:30 +00:00
Rafael Espindola
09bbd16112 Avoid a Symbol -> Name -> Symbol conversion.
Before this we were producing a TargetExternalSymbol from a MCSymbol.
That meant extracting the symbol name and fetching the symbol again
down the pipeline.

This patch adds a DAG.getMCSymbol that lets the MCSymbol pass unchanged on the
DAG.

Doing so removes the need for MO_NOPREFIX and fixes the root cause of pr23900,
allowing r240130 to be committed again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240300 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-22 17:46:53 +00:00
Alexander Kornienko
948713ad4f Fixed/added namespace ending comments using clang-tidy. NFC
A few more files that were fixed while preparing r240270.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240271 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-22 09:57:54 +00:00
Sanjoy Das
1991e2a4df [CodeGen] Introduce a FAULTING_LOAD_OP pseudo-op.
Summary:
This instruction encodes a loading operation that may fault, and a label
to branch to if the load page-faults.  The locations of potentially
faulting loads and their "handler" destinations are recorded in a
FaultMap section, meant to be consumed by LLVM's clients.

Nothing generates FAULTING_LOAD_OP instructions yet, but they will be
used in a future change.

The documentation (FaultMaps.rst) needs improvement and I will update
this diff with a more expanded version shortly.

Depends on D10196

Reviewers: rnk, reames, AndyAyers, ab, atrick, pgavlin

Reviewed By: atrick, pgavlin

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239740 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-15 18:44:08 +00:00
Eric Fiselier
2111b5758f [LIT] Fix failing LIT tests
Summary:
I spend some time trying to get the LIT test suite passing. Here are the changes that I needed to make on my machine.

I made the following changes for the following reasons.

1. google-test.py: The Google test format now checks for "[  PASSED  ] 1 test." to check if a test passes.
2. discovery.py: The output appears in a different order on my machine than it did in the test.
3. unittest-adaptor.py: The output appears in a different order on my machine than it did in the test.
4. The classname is now formed differently in `getJUnitXML(...)`.

I'm not sure what is causing the output order to differ in discovery.py and unittest-adaptor.py. Does anybody have any thoughts?

Reviewers: ddunbar, danalbert, jroelofs

Reviewed By: jroelofs

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239663 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-13 06:55:44 +00:00
Daniel Sanders
4d13f315d1 Replace string GNU Triples with llvm::Triple in MCSubtargetInfo and create*MCSubtargetInfo(). NFC.
Summary:
This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.

Reviewers: rafael

Reviewed By: rafael

Subscribers: rafael, ted, jfb, llvm-commits, rengolin, jholewinski

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239467 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-10 12:11:26 +00:00
Elena Demikhovsky
22debdcab6 X86-MPX: Implemented encoding for MPX instructions.
Added encoding tests.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239403 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-09 13:02:10 +00:00
Craig Topper
095bfde743 [TableGen] Remove unnecessary default constructed SMLoc that just existed to return. Instead just call the default constructor in the return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239277 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-08 01:35:45 +00:00
Craig Topper
6af266fd88 [TableGen] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239276 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-08 01:35:43 +00:00
Craig Topper
904db1100f [TableGen] Remove unnecessary extern declaration that's already in an included header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-08 01:35:42 +00:00
Craig Topper
0547b62a14 [TableGen] Use the SMLoc header file instead of SourceMgr header file in a couple places. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-08 01:35:40 +00:00
Craig Topper
61f49542d7 [TableGen] Rename ListInit::getSize to just 'size' to be more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238806 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 04:15:57 +00:00
Craig Topper
a1bedd75a0 [TableGen] Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238805 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 04:15:51 +00:00
Arnold Schwaighofer
5a0272c759 lit: Allow configurations to restrict the set of tests to run
By setting limit_to_features to a non empty list of features a configuration can
restrict the set of tests to run to only include tests that require a feature in
this list.

rdar://21082253

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238766 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 17:50:03 +00:00
Hans Wennborg
1758082f64 Drop remaining Dragonegg support in release scripts
r236077 and r236081 dropped Dragonegg support from the release scripts
but left some pieces. The most notable change is that Dragonegg won't
be tagged any more.

Patch by David Wiberg <dwiberg@gmail.com>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238753 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 15:37:58 +00:00
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
Ahmed Bougacha
d4b59dcdba [TableGen][AsmMatcherEmitter] Only parse isolated tokens as registers.
Fixes PR23455, where, when TableGen generates the matcher from the
AsmString, it splits "cmp${cc}ss" into tokens, and the "ss" suffix
is recognized as the SS register.

I can't think of a situation where that's a feature, not a bug, hence:
when a token is "isolated", i.e., it is followed and preceded by
separators, it shouldn't be parsed as a register.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238536 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-29 01:03:37 +00:00
Ahmed Bougacha
85f66de8cc [TableGen][AsmMatcherEmitter] Factor out AsmOperand creation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238534 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-29 00:55:55 +00:00
Owen Anderson
2f6ca834ff Add support for the convergent flag at the MC and MachineInstr levels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238450 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-28 18:33:39 +00:00
Owen Anderson
ca67e337bf Expand the Flags field of MCInstrDesc to 64 bits, while simultaneously
shrinking the Size and NumDefs fields to offset the size growth, and
reordering the fields to preserve a good packing.

This is necessary in the short term for adding a convergent flag, and
simultaneously future-proofs us against more flags being added in the
future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238445 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-28 18:03:07 +00:00
Owen Anderson
13146c7e3b Add initial support for the convergent attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238264 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 23:48:40 +00:00
Tom Stellard
75775939fa AsmMatcherEmitter: Add an option to override custom converters for InstAlias
If there is an InstAlias defined for an instruction that had a custom
converter (AsmMatchConverter), then when the alias is matched,
the custom converter will be used rather than the converter generated
by the InstAlias.

This patch adds the UseInstAsmMatchConverter field to the InstAlias
class, which allows you to override this behavior and force the
converter generated by the InstAlias to be used.

This is required for some future improvemnts to the R600 assembler.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238210 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 15:55:50 +00:00