1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

142 Commits

Author SHA1 Message Date
Matthias Braun
61888f54ba TableGen: Use StringRef instead of const std::string& for parameters
This avoid an extra construction of a std::string (and a heap
allocation) when the caller only has a StringRef but no std::string at
hand.

llvm-svn: 288610
2016-12-04 05:48:03 +00:00
Eugene Zelenko
181555a389 [ADT, Support, TableGen] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 288424
2016-12-01 22:13:24 +00:00
Matt Arsenault
21352a084a TableGen: Add operator !or
llvm-svn: 286936
2016-11-15 06:49:28 +00:00
Ahmed Bougacha
72f3c45c2f [TableGen] Autobrief-ize Record. NFC.
llvm-svn: 275425
2016-07-14 14:53:14 +00:00
Ahmed Bougacha
34b0efb1cb [TableGen] Cleanup Record comments. NFC.
LLVM doesn't use exceptions anymore.
Also remove the implementation comments. Some of them diverged.

llvm-svn: 275424
2016-07-14 14:53:11 +00:00
Tim Northover
86fa0255b2 AArch64: TableGenerate system instruction operands.
The way the named arguments for various system instructions are handled at the
moment has a few problems:

  - Large-scale duplication between AArch64BaseInfo.h and AArch64BaseInfo.cpp
  - That weird Mapping class that I have no idea what I was on when I thought
    it was a good idea.
  - Searches are performed linearly through the entire list.
  - We print absolutely all registers in upper-case, even though some are
    canonically mixed case (SPSel for example).
  - The ARM ARM specifies sysregs in terms of 5 fields, but those are relegated
    to comments in our implementation, with a slightly opaque hex value
    indicating the canonical encoding LLVM will use.

This adds a new TableGen backend to produce efficiently searchable tables, and
switches AArch64 over to using that infrastructure.

llvm-svn: 274576
2016-07-05 21:23:04 +00:00
Tim Northover
049109d83f TableGen: promote "code" type from syntactic sugar.
It's being immediately converted to a "string", but being able to tell what
type the field was originally can be useful in backends.

llvm-svn: 274575
2016-07-05 21:22:55 +00:00
Reid Kleckner
d7e996cba7 [TableGen] Use a SmallVector for Record::Values to avoid debug iterators
Debug iterators are valuable so we don't want to turn them off
completely. However, llvm-tblgen is critical to build speed, so we can
skip them here.

Regenerating X86GenSubtargetInfo.inc in a clang-cl self-host debug build
now takes 39s instead of 1m29s.

Helps PR28222

llvm-svn: 274288
2016-06-30 23:04:07 +00:00
Aaron Ballman
c67a26e6d8 Reverting r263474; it turns out there are uses of the public interface, but MSVC wasn't caring about them.
http://lab.llvm.org:8080/green//job/clang-stage1-cmake-RA-incremental_build/21475/consoleFull#-45876453249ba4694-19c4-4d7e-bec5-911270d8a58c
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/8879

llvm-svn: 263475
2016-03-14 20:03:15 +00:00
Aaron Ballman
8cda7bef4f The file header of TrailingObjects.h suggests that TrailingObjects be inherited privately because the public APIs it exposes are not meant as part of the interface. There's no functional change because nothing currently relied on these being inherited publicly.
llvm-svn: 263474
2016-03-14 19:57:48 +00:00
Richard Smith
2ea1e68515 A couple more UB fixes for C++14 sized deallocation.
llvm-svn: 262891
2016-03-08 00:59:44 +00:00
Reid Kleckner
0262ca1fce Minor performance tweaks to llvm-tblgen (and a few that might be a good idea)
Summary:
This patch adds a reserve call to an expensive function
(`llvm::LoadIntrinsics`), and may fix a few other low hanging
performance fruit (I've put them in comments for now, so we can
discuss).

**Motivation:**

As I'm sure other developers do, when I build LLVM, I build the entire
project with the same config (`Debug`, `MinSizeRel`, `Release`, or
`RelWithDebInfo`). However, the `Debug` config also builds llvm-tblgen
in `Debug` mode. Later build steps that run llvm-tblgen then can
actually be the slowest steps in the entire build. Nobody likes slow
builds.

Reviewers: rnk, dblaikie

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

Patch by Alexander G. Riccio

llvm-svn: 259683
2016-02-03 19:34:28 +00:00
Reid Kleckner
822ed5c846 [llvm-tblgen] Avoid StringMatcher for GCC and MS builtin names
This brings the compile time of Function.cpp from ~40s down to ~4s for
me locally. It also shaves off about 400KB of object file size in a
release+asserts build.

I also realized that the AMDGPU backend does not have any GCC builtin
names to match, so the extra lookup was a no-op. I removed it to silence
a zero-length string table array warning. There should be no functional
change here.

This change really ends the story of PR11951.

llvm-svn: 258897
2016-01-27 01:43:12 +00:00
Craig Topper
7b0b0f6cca [TableGen] Use FoldingSets instead of DenseMaps to unique UnOpInit, BinOpInit and TernOpInit. This remove the memory needed to store the key for the DenseMap. NFC
llvm-svn: 258071
2016-01-18 20:36:06 +00:00
Craig Topper
a5ac333af9 [TableGen] Merge the SuperClass Record and SMRange vector into a single vector. This removes the state needed to manage the extra vector thus reducing the size of the Record class. NFC
llvm-svn: 258065
2016-01-18 19:52:37 +00:00
Craig Topper
c7ba465dbf [TableGen] Reorder fields in Record class to optimize memory usage. NFC
llvm-svn: 258064
2016-01-18 19:52:29 +00:00
Craig Topper
22fa1c4ac6 [TableGen] Allocate the Init pointer array for BitsInit/ListInit after the BitsInit/ListInit object itself. Saves a bit of memory. NFC
llvm-svn: 258063
2016-01-18 19:52:24 +00:00
Craig Topper
572858397e [TableGen] Fix a typo in r256733.
llvm-svn: 256734
2016-01-04 06:35:08 +00:00
Craig Topper
651083b897 [TableGen] Use some free space in Init to store the opcode for UnOpInit/BinOpInit/TernOpInit allowing those types to be a little smaller. NFC
llvm-svn: 256733
2016-01-04 06:28:49 +00:00
Hans Wennborg
4583e4a824 Re-commit r247216: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
Except the changes that defined virtual destructors as =default, because that
ran into problems with GCC 4.7 and overriding methods that weren't noexcept.

llvm-svn: 247298
2015-09-10 16:49:58 +00:00
Hans Wennborg
ddb1cf7aeb Revert r247216: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
This caused build breakges, e.g.
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/24926

llvm-svn: 247226
2015-09-10 00:57:26 +00:00
Hans Wennborg
b5db40bf43 Fix Clang-tidy misc-use-override warnings, other minor fixes
Patch by Eugene Zelenko!

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

llvm-svn: 247216
2015-09-10 00:12:56 +00:00
Craig Topper
c89b8e3d72 [TableGen] Remove unused constructor.
llvm-svn: 244718
2015-08-12 06:43:10 +00:00
Craig Topper
53690ef92d [TableGen] Make StringInit constructor take a StringRef instead of const std::string&. NFC.
llvm-svn: 244426
2015-08-09 22:03:04 +00:00
Craig Topper
156446ee87 [TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC
llvm-svn: 241430
2015-07-06 06:23:01 +00:00
Craig Topper
f5bf09aa95 [TableGen] Restore the use of the TheInit field in Record to cache the Record's DefInit. I broke this when I fixed memory leaks recently. Remove the DenseMap that mapped Record's to DefInit.
llvm-svn: 240524
2015-06-24 06:19:19 +00:00
Alexander Kornienko
f993659b8f Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.

llvm-svn: 240390
2015-06-23 09:49:53 +00:00
Alexander Kornienko
40cb19d802 Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
  -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
  llvm/lib/


Thanks to Eugene Kosov for the original patch!

llvm-svn: 240137
2015-06-19 15:57:42 +00:00
Craig Topper
b603d53f5d [TableGen] Remove unused method declaration. NFC
llvm-svn: 239801
2015-06-16 05:44:06 +00:00
Craig Topper
14be9a98ed [TableGen] Use the SMLoc header file instead of SourceMgr header file in a couple places. NFC
llvm-svn: 239274
2015-06-08 01:35:40 +00:00
Craig Topper
fbba0828fb [TableGen] Remove unnecessary include. NFC.
llvm-svn: 239249
2015-06-07 06:01:22 +00:00
Craig Topper
2c6b9fbbdc [TableGen] Remove unnecessary forward declaration. NFC
llvm-svn: 239248
2015-06-07 06:01:19 +00:00
Craig Topper
b7821932ae [TableGen] Write one of the Record constructors in terms of the other constructor to reduce code duplication. NFC
llvm-svn: 239247
2015-06-07 06:01:17 +00:00
Craig Topper
4da40128c6 [TableGen] Remove unused function. NFC
llvm-svn: 239246
2015-06-07 06:01:15 +00:00
Craig Topper
3a3edc012a [TableGen] Use 'isa' to check if something is an UnsetInit rather than getting the UnsetInit singleton and comparing pointers. NFC.
llvm-svn: 239245
2015-06-07 06:01:13 +00:00
Craig Topper
70c292f8a1 [TableGen] Change OpInit::getNumOperands and getOperand to use unsigned integers. NFC
llvm-svn: 239210
2015-06-06 01:34:04 +00:00
Craig Topper
972503638b [TableGen] Replace a couple if/else chains with a switch. NFC
llvm-svn: 239023
2015-06-04 07:40:16 +00:00
Craig Topper
db6fb90199 [TableGen] Merge single prefix bit in RecordVal into PointerIntPair with Name to reduce memory usage.
llvm-svn: 239021
2015-06-04 07:40:12 +00:00
Craig Topper
4d00961e59 [TableGen] Use range-based for loops. NFC
llvm-svn: 238808
2015-06-02 06:19:28 +00:00
Craig Topper
4186e2227a Fix typo in comment. NFC
llvm-svn: 238807
2015-06-02 06:19:25 +00:00
Craig Topper
e630929d8d [TableGen] Rename ListInit::getSize to just 'size' to be more consistent.
llvm-svn: 238806
2015-06-02 04:15:57 +00:00
Craig Topper
36634fb48e [TableGen] Move a couple virtual methods out of line so vtable anchors can be removed. NFC
llvm-svn: 238727
2015-06-01 06:44:18 +00:00
Craig Topper
2ccbe25333 [TableGen] Remove unnecessary explicit initialization to null of a unique_ptr. NFC
llvm-svn: 238726
2015-06-01 06:44:16 +00:00
Craig Topper
6a5f166baf [TableGen] Remove unnecessary forward declarations. NFC
llvm-svn: 238725
2015-06-01 06:44:14 +00:00
Craig Topper
baa40e9044 [TableGen] Merge RecTy::typeIsConvertibleTo and RecTy::baseClassOf. NFC
typeIsConvertibleTo was just calling baseClassOf(this) on the argument passed to it, but there weren't different signatures for baseClassOf so passing 'this' didn't really do anything interesting. typeIsConvertibleTo could have just been a non-virtual method in RecTy. But since that would be kind of a silly method, I instead re-distributed the logic from baseClassOf into typeIsConvertibleTo.

llvm-svn: 238648
2015-05-30 07:36:01 +00:00
Craig Topper
06ba30a59e [TableGen] Remove all the variations of RecTy::convertValue and just handle the conversions in convertInitializerTo directly. This saves a bunch of vtable entries. NFC
llvm-svn: 238646
2015-05-30 07:34:51 +00:00
Craig Topper
6d0adbbb1b [TableGen] Remove convertValue functions for UnOpInit, BinOpInit, and TernOpInit as they weren't able to be called.
I don't think converting the inputs to the Ops was the right behavior anyway.

llvm-svn: 238543
2015-05-29 05:51:32 +00:00
Craig Topper
79a628ff02 [TableGen] Remove unnecessary include and just forward declare. NFC
llvm-svn: 238179
2015-05-26 06:48:43 +00:00
Craig Topper
2af3864479 [TableGen] Make some variable names consistent with their type names and just generally consistent across all of the overloads.
llvm-svn: 237775
2015-05-20 05:40:13 +00:00
Craig Topper
8546defae8 [TableGen] Don't override convertValue for some of the Init types when it does the same thing as the base class implementation.
llvm-svn: 237773
2015-05-20 05:40:06 +00:00