Commit Graph

5570 Commits

Author SHA1 Message Date
Simon Dardis fcc7f6fad2 Revert "[misched] Extend scheduler to handle unsupported features"
This reverts commit r273551.

Patch contained a wrong check for isUnsupported.

llvm-svn: 273565
2016-06-23 14:54:47 +00:00
Aaron Ballman 0da8b2ec09 Explicitly specify the ANSI version of these Win32 APIs. While these are seemingly unrelated changes, they are all NFC because we currently default to the ANSI versions of the APIs when building for Windows. This simply makes the ANSI usage explicit.
llvm-svn: 273564
2016-06-23 14:45:54 +00:00
Simon Dardis 081e4bb14c [misched] Extend scheduler to handle unsupported features
Currently isComplete = 1 requires that every instruction must
be described, declared unsupported or marked as having no
scheduling information for a processor.

For some backends such as MIPS, this requirement entails
long regex lists of instructions that are unsupported.

This patch teaches Tablegen to skip over instructions that
are associated with unsupported feature when checking if the
scheduling model is complete.

Patch by: Daniel Sanders

Contributions by: Simon Dardis

Reviewers: MatzeB

Differential Reviewer: http://reviews.llvm.org/D20522

llvm-svn: 273551
2016-06-23 09:22:11 +00:00
Matthias Braun 6b1fd9aa63 TableGen/CodeGenSchedule: Move some getAllDerivedDefinitions() calls out of inner loops
This cuts the runtime of the two slowest tblgen invocations in aarch64
in half for me...

llvm-svn: 273235
2016-06-21 03:24:03 +00:00
Thomas Jablin 2263512a6c test commit: remove trailing whitespace
llvm-svn: 273197
2016-06-20 20:43:26 +00:00
Joerg Sonnenberger 1c547d41cd If the revision number starts with r, drop it. It will get added back
later and we don't want to use it twice.

llvm-svn: 273099
2016-06-18 23:23:38 +00:00
David Majnemer cbf614a93b Remove the ScalarReplAggregates pass
Nearly all the changes to this pass have been done while maintaining and
updating other parts of LLVM.  LLVM has had another pass, SROA, which
has superseded ScalarReplAggregates for quite some time.

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

llvm-svn: 272737
2016-06-15 00:19:09 +00:00
Daniel Sanders fd557cb01f [FileCheck] Add --check-prefixes as a shorthand for multiple --check-prefix options.
Summary:
This new alias takes a comma separated list of prefixes which allows
'--check-prefix=A --check-prefix=B --check-prefix=C' to be written as
'--check-prefixes=A,B,C'.

Reviewers: probinson

Subscribers: probinson, llvm-commits, dsanders

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

llvm-svn: 272670
2016-06-14 14:28:04 +00:00
Vedant Kumar d9aed82cf7 Add support for collating profiles for use with code coverage
Differential Revision: http://reviews.llvm.org/D20993

llvm-svn: 272599
2016-06-13 23:33:48 +00:00
Mike Spertus 292e511a93 Improved Visual Studio 2015 visualization of SmallVectorImpl
When visualizing small vectors in VS2015, show the first few elements in the DisplayString instead of the size. For example, a SmallVector of DeclAccessPair will visualize like

  {public typename ...Ts, public typename U}

The visualization in VS2013 remains the same because we continue to include the old visualizer with a lower-than-default priority of MediumLow, and the same SmallVector would continue to be visualized as

  {size = 2}

llvm-svn: 272525
2016-06-13 01:43:14 +00:00
Benjamin Kramer 4ca41fd09e Run clang-tidy's performance-unnecessary-copy-initialization over LLVM.
No functionality change intended.

llvm-svn: 272516
2016-06-12 17:30:47 +00:00
Simon Pilgrim 2b7c02a04f [X86] Updated test checks script to generalise LCPI symbol refs
The script now replace '.LCPI888_8' style asm symbols with the {{\.LCPI.*}} re pattern - this helps stop hardcoded symbols in 32-bit x86 tests changing with every edit of the file

Refreshed some tests to demonstrate the new check

llvm-svn: 272488
2016-06-11 20:39:21 +00:00
Daniel Dunbar b52765c5a4 [lit] Only gather redirected files for command failures.
- The intended use of this was just in diagnostics, so we shouldn't pay the
   cost of reading these all the time.

 - This will avoid including the full output of each command in tests which
   fail, but the most important use case for this was to gather the output of
   the specific command which failed.

llvm-svn: 272365
2016-06-10 04:17:30 +00:00
Vedant Kumar 6437eb9d5f Revert "[lit] Use os.devnull instead of named temp files"
This reverts commit r272290. It breaks a test that depends on being able
to seek the /dev/null equivalent on Windows:

http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/11360

llvm-svn: 272293
2016-06-09 19:36:48 +00:00
Vedant Kumar 4d27da90f0 [lit] Use os.devnull instead of named temp files
Use os.devnull instead of tempfiles when substituting '/dev/null' on
Windows machines. This should make the bots just a bit speedier.

Thanks to Yunzhong Gao for testing this patch on Windows!

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

llvm-svn: 272290
2016-06-09 18:38:41 +00:00
Richard Smith 2ad6d48b0c Search for llvm-symbolizer binary in the same directory as argv[0], before
looking for it along $PATH. This allows installs of LLVM tools outside of
$PATH to find the symbolizer and produce pretty backtraces if they crash.

llvm-svn: 272232
2016-06-09 00:53:21 +00:00
Benjamin Kramer c321e53402 Apply most suggestions of clang-tidy's performance-unnecessary-value-param
Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.

llvm-svn: 272190
2016-06-08 19:09:22 +00:00
Daniel Dunbar 48295619b5 [lit] Ensure we get bytes when reading redirected output files.
llvm-svn: 272147
2016-06-08 14:41:44 +00:00
Daniel Dunbar f62faf6c48 [lit] Ignore errors when decoding redirected output.
llvm-svn: 272066
2016-06-07 22:06:57 +00:00
Daniel Dunbar 918a92881b [lit] Fix an uninitialized var on Windows.
llvm-svn: 272052
2016-06-07 20:14:17 +00:00
Daniel Dunbar 498abac3e9 [utils/lit] Show available_features with --show-suites.
llvm-svn: 272022
2016-06-07 16:22:24 +00:00
Daniel Dunbar 1934108270 [lit] Improve logging with file redirection.
- This will cause lit to automatically include the first 1K of data in
   redirected output files when a command fails (previously if the command
   failed, but the main point of the test was, say, a `FileCheck` later on, then
   the log wasn't helpful in showing why the command failed).

llvm-svn: 272021
2016-06-07 16:13:40 +00:00
Mike Spertus 3e45d77835 Add Visual Studio Visualizer for ArrayRef
Modeled after visualization of llvm::SmallVec

llvm-svn: 271847
2016-06-05 18:34:02 +00:00
Sjoerd Meijer 3c2f785769 AsmWriterEmitter.cpp assumes that all operands of a printed alias
will appear after a blank. This assumption does not hold in the ARM
target.

Patch by: Roger Ferrer Ibanez

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

llvm-svn: 271666
2016-06-03 13:17:37 +00:00
Sjoerd Meijer 84e2f69245 Currently AsmWriterEmiter.cpp (used by tblgen -gen-asm-writer) does not
consider the Predicates attached to InstAlias when generating printAliasInstr.
This forces users of printAliasInstr to check those predicates beforehand.

This commit adds them in the condition set of the IAPrinter object.

Patch by: Roger Ferrer Ibanez

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

llvm-svn: 271665
2016-06-03 13:14:19 +00:00
Daniel Dunbar 591838d1d3 [lit] Improve readability of failing scripts.
- This only applies to scripts executed by the _internal_ shell script
   interpreter.

 - This patch reworks the log to look more like a shell transcript, and be less
   verbose (but in the interest of calling attention to the important parts).

Here is an example of the new format, for commands with/without failures and
with/without output:
```
$ true
$ echo hi
hi

$ false
note: command had no output on stdout or stderr
error: command failed with exit status 1

```

llvm-svn: 271610
2016-06-02 23:49:42 +00:00
Daniel Dunbar c2708c8662 [lit] Factor out a helper for shell command results.
llvm-svn: 271608
2016-06-02 23:32:35 +00:00
Eric Fiselier cd24b0d0d8 Add "REQUIRES-ANY" feature test
Summary:
This patch adds a "REQUIRES-ANY" feature test that is disjunctive. This marks a test as `UNSUPPORTED` if none of the specified features are available.

Libc++ has the need to write feature test such as `// REQUIRES-ANY: c++98, c++03`  when testing of behavior that is specific to older dialects but has since changed.


Reviewers: rnk, ddunbar

Subscribers: ddunbar, probinson, llvm-commits, cfe-commits

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

llvm-svn: 271468
2016-06-02 01:59:57 +00:00
Joerg Sonnenberger a13a0e1aea Update usage(), make sure srcdir is really empty.
llvm-svn: 271396
2016-06-01 14:16:00 +00:00
David Blaikie 09ec5756dc Reference gdb python type printer scripts from SmallString, SmallVector, ArrayRef, and StringRef
llvm-svn: 271357
2016-06-01 01:02:32 +00:00
Joerg Sonnenberger ed58207c46 Make it easier to process merges in a normal buildable directory tree by
allowing the user to specify the base directory of the checkout.

llvm-svn: 271192
2016-05-29 22:09:54 +00:00
Xinliang David Li 2bd4f8b66b FileCheck: dump command line context with empty input
Differential Revision: http://reviews.llvm.org/D20716

llvm-svn: 271047
2016-05-27 21:23:25 +00:00
Benjamin Kramer 82de7d323d Apply clang-tidy's misc-move-constructor-init throughout LLVM.
No functionality change intended, maybe a tiny performance improvement.

llvm-svn: 270997
2016-05-27 14:27:24 +00:00
Benjamin Kramer 4fed928f53 Avoid some copies by using const references.
clang-tidy's performance-unnecessary-copy-initialization with some manual
fixes. No functional changes intended.

llvm-svn: 270988
2016-05-27 12:30:51 +00:00
John Brawn 3546c2f158 Add auto-exporting of symbols from tools so that plugins work on Windows
The problem with plugins on Windows is that when building a plugin DLL it needs
to explicitly link against something (an exe or DLL) if it uses symbols from
that thing, and that thing must explicitly export those symbols. Also there's a
limit of 65535 symbols that can be exported. This means that currently plugins
only work on Windows when using BUILD_SHARED_LIBS, and that doesn't work with
MSVC.

This patch adds an LLVM_EXPORT_SYMBOLS_FOR_PLUGINS option, which when enabled
automatically exports from all LLVM tools the symbols that a plugin could want
to use so that a plugin can link against a tool directly. Plugins can specify
what tool they link against by using PLUGIN_TOOL argument to llvm_add_library.
The option can also be enabled on Linux, though there all it should do is
restrict the set of symbols that are exported as by default all symbols are
exported.

This option is currently OFF by default, as while I've verified that it works
with MSVC, linux gcc, and cygwin gcc, I haven't tried mingw gcc and I have no
idea what will happen on OSX. Also unfortunately we can't turn on
LLVM_ENABLE_PLUGINS when the option is ON as bugpoint-passes needs to be
loaded by both bugpoint.exe and opt.exe which is incompatible with this
approach. Also currently clang plugins don't work with this approach, which
will be fixed in future patches.

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

llvm-svn: 270839
2016-05-26 11:16:43 +00:00
Matt Arsenault 4fb996e82d TableGen: Use StringRef instead of std::string
llvm-svn: 270741
2016-05-25 18:07:40 +00:00
Eugene Zelenko 75259bb3cb Fix Clang-tidy modernize-use-bool-literals in generated Target code; other minor fixes; other minor fixes.
Make generated code more readable.

Fix some Include What You Use warnings.

Differential revision: http://reviews.llvm.org/D20317

llvm-svn: 269783
2016-05-17 17:04:23 +00:00
Justin Bogner 1df01f0e31 SDAG: Make SelectCodeCommon return void
This means SelectCode unconditionally returns nullptr now. I'll follow
up with a change to make that return void as well, but it seems best
to keep that one very mechanical.

This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.

llvm-svn: 269136
2016-05-10 22:58:26 +00:00
Sam Kolton 5f10a137d0 [TableGen] AsmMatcher: support for default values for optional operands
Summary:
This change allows to specify "DefaultMethod" for optional operand (IsOptional = 1) in AsmOperandClass that return default value for operand. This is used in convertToMCInst to set default values in MCInst.
Previously if you wanted to set default value for operand you had to create custom converter method. With this change it is possible to use standard converters even when optional operands presented.

Reviewers: tstellarAMD, ab, craig.topper

Subscribers: jyknight, dsanders, arsenm, nhaustov, llvm-commits

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

llvm-svn: 268726
2016-05-06 11:31:17 +00:00
Craig Topper c6b3669884 [TableGen] Fix a memory leak when creating SwitchOpcodeMatchers.
llvm-svn: 268712
2016-05-06 06:56:14 +00:00
Craig Topper 332dd6614a [TableGen] Remove isSafeToReorderWithPatternPredicate from DAGISelMatchers as its not used anymore.
llvm-svn: 268711
2016-05-06 06:21:27 +00:00
Craig Topper 05e772b36b [TableGen] Remove getHash support from DAGISelMatcher. It hasn't been used for some time.
llvm-svn: 268706
2016-05-06 02:37:59 +00:00
Craig Topper b3fb529cc6 [TableGen] Remove SinkPatternPredicates from the DAG isel matcher optimizer.
Pattern predicates already appear to be emitted as far down as they can be. The optimization was making no changes on any in-tree target.

llvm-svn: 268705
2016-05-06 02:37:56 +00:00
Justin Bogner 465886ece1 SDAG: Remove OPC_MarkGlueResults and associated logic. NFC
This opcode never happens in practice, and yet the logic we have in
place to handle it would be undefined behaviour if we ever executed
it. Remove it rather than trying to refactor code that's never
reached.

llvm-svn: 268692
2016-05-05 22:37:45 +00:00
Chris Bieneman 62de33c2db Remove LLVM_ENABLE_TIMESTAMPS
Summary:
As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS.

The only complicated bit of this patch is the Windows support. On windows we used to log an error if /INCREMENTAL was passed to the linker when timestamps were disabled.

With this change since timestamps in code are always disabled we will always compile on windows with /Brepro unless /INCREMENTAL is specified, and we will log a warning when /INCREMENTAL is specified to notify the user that the build will be non-deterministic.

See: http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html

Reviewers: bogner, silvas, rnk

Subscribers: llvm-commits

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

llvm-svn: 268670
2016-05-05 19:57:03 +00:00
James Y Knight 0c145c0c3a Remove bit-rotten CppBackend.
This backend was supposed to generate C++ code which will re-construct
the LLVM IR passed as input. This seems to me to have very marginal
usefulness in the first place.

However, the code has never been updated to use IRBuilder, which makes
its current value negative -- people who look at the output may be
steered to use the *wrong* C++ APIs to construct IR.

Furthermore, it's generated code that doesn't compile since at least
2013.

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

llvm-svn: 268631
2016-05-05 14:35:40 +00:00
Craig Topper 94753520c6 [TableGen] Make sure to recursively factor any ScopeMatchers created while forming a SwitchType node. Remove a couple hundred bytes from the X86 matcher table.
llvm-svn: 268611
2016-05-05 06:19:27 +00:00
Craig Topper d34bf350b2 [TableGen] Remove stale comment.
llvm-svn: 268610
2016-05-05 06:19:25 +00:00
Hans Wennborg f28d2a7cb2 Win packaging script: include the OpenMP run-time
llvm-svn: 268398
2016-05-03 16:43:40 +00:00
Craig Topper 3fc0e668ff [CodeGen] Add some space optimized forms of EmitNode and MorphNodeTo that implicitly indicate the number of result VTs. This shaves about 16K off the X86 matching table taking it down to about 470K.
Overall this reduces the llc binary size with all in-tree targets by about 40K.

llvm-svn: 268365
2016-05-03 05:54:13 +00:00