1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

17354 Commits

Author SHA1 Message Date
Eli Bendersky
0a20d105c9 Simplify the code in FastISel::tryToFoldLoad, add an assertion and fix a comment.
llvm-svn: 179908
2013-04-19 23:26:18 +00:00
Eli Bendersky
09f182f14c Move TryToFoldFastISelLoad to FastISel, where it belongs. In general, I'm
trying to move as much FastISel logic as possible out of the main path in
SelectionDAGISel - intermixing them just adds confusion.

llvm-svn: 179902
2013-04-19 22:29:18 +00:00
Michael Liao
3b258b6b24 ArrayRefize getMachineNode(). No functionality change.
llvm-svn: 179901
2013-04-19 22:22:57 +00:00
Jakob Stoklund Olesen
b2fb3bf647 Add an MRI::verifyUseLists() function.
This checks the sanity of the register use lists in the MI intermediate
representation.

llvm-svn: 179895
2013-04-19 21:40:57 +00:00
Eric Christopher
ea92b616fc Reformat and nuke trailing whitespace.
llvm-svn: 179880
2013-04-19 20:37:09 +00:00
Adrian Prantl
2f35f044a1 Rename ClassType to the more accurate UnderlyingType and document its purpose.
rdar://problem/13463793

llvm-svn: 179877
2013-04-19 19:56:02 +00:00
Eric Christopher
88bdd26cc9 Revert "PR14606: debug info imported_module support"
This reverts commit r179836 as it seems to have caused test failures.

llvm-svn: 179840
2013-04-19 07:47:16 +00:00
David Blaikie
46f35f8e56 PR14606: debug info imported_module support
Adding another CU-wide list, in this case of imported_modules (since they
should be relatively rare, it seemed better to add a list where each element
had a "context" value, rather than add a (usually empty) list to every scope).
This takes care of DW_TAG_imported_module, but to fully address PR14606 we'll
need to expand this to cover DW_TAG_imported_declaration too.

llvm-svn: 179836
2013-04-19 06:57:04 +00:00
Lang Hames
99f891a858 Add support for index resources (for a SlotIndex) to be relinquished.
When the SlotIndexes pass was introduced it was intended to support insertion
of code during register allocation. Removal of code was a minor consideration
(and raised the question of what to do about dangling SlotIndex objects pointing
to the erased index), so I opted to keep all indexes around indefinitely and
simply null out those that weren't being used.

Nowadays people are moving more code around (e.g. via HandleMove), which means
more zombie indexes. I want to start killing off indexes when we're done with
them to reclaim the resources they use up.
 

llvm-svn: 179834
2013-04-19 04:31:49 +00:00
Chad Rosier
645b701422 [asm parser] Add support for predicating MnemonicAlias based on the assembler
variant/dialect.  Addresses a FIXME in the emitMnemonicAliases function.
Use and test case to come shortly.
rdar://13688439 and part of PR13340.

llvm-svn: 179804
2013-04-18 22:35:36 +00:00
Bill Wendling
4f17a0e079 Make the TargetIndependent flag have the right boolean value.
llvm-svn: 179798
2013-04-18 21:45:04 +00:00
Eli Bendersky
3cb1041d23 Fix typo
llvm-svn: 179793
2013-04-18 20:49:17 +00:00
Bill Wendling
2bc73801cb Cleanup patch:
Semantics of parameters named Index and Idx were inconsistent between
"include/llvm/IR/Attributes.h", "lib/IR/AttributeImpl.h" and
"lib/IR/Attributes.cpp": sometimes these were fixed 1-based indexes of IR
parameters (or AttributeSet::ReturnIndex for IR return values or
AttributeSet::FunctionIndex for IR functions), other times they were the
internal slot for storage in the underlying AttributeSetImpl. I renamed usage of
the former to "Index" and usage of the latter to "Slot" ("Slot" was already
being used consistently for the latter in a subset of cases)

Patch by Stephen Lin!

llvm-svn: 179791
2013-04-18 20:17:28 +00:00
Bill Wendling
480edeaf79 This patch addresses two cleanup issues:
1. Verify::VerifyParameterAttrs in "lib/IR/Verifier.cpp" and
   AttrBuilder::removeFunctionOnlyAttrs in "lib/IR/Attributes.cpp" (only called
   by Verify::VerifyFunctionAttrs) separately maintained a list of function-only
   attribute types. I've consolidated the logic into a new function used for
   both cases in "lib/IR/Verifier.cpp", so this logic is in one place (other
   than the AsmParser front-end)

2. Various functions in "lib/IR/Verifier.cpp" passed AttributeSet around by
   reference needlessly, as it's just a handle to an immutable pimpl body.

Patch by Stephen Lin!

llvm-svn: 179790
2013-04-18 20:15:25 +00:00
Rafael Espindola
c44b97c596 At Jim Grosbach's request detemplate Object/MachO.h.
We are still able to handle mixed endian objects by swapping one struct at a
time.

llvm-svn: 179778
2013-04-18 18:08:55 +00:00
Chad Rosier
3db77b6309 Fix comment spacing.
llvm-svn: 179761
2013-04-18 15:19:45 +00:00
Bill Wendling
503365830b Add an option `-enable-old-style-attr-syntax' to print out function attributes in the "old" style.
It's sometimes beneficial to emit a testcase with the old style attribute
syntax. Allow someone to do this.
<rdar://problem/13563209>

llvm-svn: 179735
2013-04-17 23:35:59 +00:00
Rafael Espindola
198846e1d1 Two small cleanups for ELF's templates.
* We only ever specialize these templates with an instantiation of ELFType,
  so we don't need a template template.
* Replace LLVM_ELF_COMMA with just passing the individual parameters to the
  macro. This requires a second macro for when we only have ELFT, but that
  is still a small win.

llvm-svn: 179726
2013-04-17 21:20:55 +00:00
Peter Collingbourne
a0d11d0e11 Add support for subsections to the ELF assembler. Fixes PR8717.
Differential Revision: http://llvm-reviews.chandlerc.com/D598

llvm-svn: 179725
2013-04-17 21:18:16 +00:00
Alexey Samsonov
542f535116 Create a stub for DWARF parser unittests
Moves one DWARF-specific header to include/llvm/DebugInfo from lib/.
Add a short unittest for r179095.

llvm-svn: 179678
2013-04-17 08:29:02 +00:00
Eli Bendersky
6bcfbc1d6e Cleanup naming: DataLayout s/TD/DL/
llvm-svn: 179601
2013-04-16 15:41:18 +00:00
Rafael Espindola
0c8ccca49b Fix silly typo that broke big endian hosts.
llvm-svn: 179551
2013-04-15 20:13:59 +00:00
Rafael Espindola
9cf2c1eeb5 Fix endianness on some MSVC versions.
Looks like it was evaluating undef == undef to true.

llvm-svn: 179549
2013-04-15 19:28:45 +00:00
Jim Grosbach
3c2cf9b6eb Simplify the MCInst operator iterator declaration.
llvm-svn: 179541
2013-04-15 17:40:45 +00:00
Rafael Espindola
9b255d0066 Try to fix the mingw builds.
llvm-svn: 179536
2013-04-15 16:46:43 +00:00
Arnold Schwaighofer
a9354729cb Fix bit size of v64i8 and v32i16 vector types.
Patch by Cameron McInally <cameron.mcinally@nyu.edu>.

llvm-svn: 179535
2013-04-15 16:11:25 +00:00
Rafael Espindola
75e5e1335a Remove getters now that we can specialize structs on the host endianness.
llvm-svn: 179534
2013-04-15 16:08:02 +00:00
Rafael Espindola
485be5761d Remove unused function.
llvm-svn: 179530
2013-04-15 15:13:10 +00:00
Rafael Espindola
55f068deb0 Make the host endianness check an integer constant expression.
I will remove the isBigEndianHost function once I update clang.

The ifdef logic is designed to
* not use configure/cmake to avoid breaking -arch i686 -arch ppc.
* default to little endian
* be as small as possible

It looks like sys/endian.h is the preferred header on most modern BSD systems,
but it is better to change this in a followup patch as machine/endian.h is
available on FreeBSD, OpenBSD, NetBSD and OS X.

llvm-svn: 179527
2013-04-15 14:44:24 +00:00
Andy Gibbs
0e5a87325f Replace uses of the deprecated std::auto_ptr with OwningPtr.
This is a rework of the broken parts in r179373 which were subsequently reverted in r179374 due to incompatibility with C++98 compilers.  This version should be ok under C++98.

llvm-svn: 179520
2013-04-15 12:06:32 +00:00
Nadav Rotem
9360cf35a9 Add an option -vectorize-slp-aggressive for running the BB vectorizer. Make -fslp-vectorize run the slp-vectorizer.
llvm-svn: 179508
2013-04-15 05:39:58 +00:00
Nadav Rotem
4628b1562a Rename the slp-vectorizer clang/llvm flags. No functionality change.
llvm-svn: 179505
2013-04-15 04:54:42 +00:00
Andrew Trick
861493bc4f MI-Sched: schedule physreg copies.
The register allocator expects minimal physreg live ranges. Schedule
physreg copies accordingly. This is slightly tricky when they occur in
the middle of the scheduling region. For now, this is handled by
rescheduling the copy when its associated instruction is
scheduled. Eventually we may instead bundle them, but only if we can
preserve the bundles as parallel copies during regalloc.

llvm-svn: 179449
2013-04-13 06:07:40 +00:00
Rafael Espindola
1fc762e9af Add typenames to see if bot goes green.
I hope this brings http://lab.llvm.org:8011/builders/clang-x86_64-darwin11-self-mingw32 back.

llvm-svn: 179446
2013-04-13 02:31:34 +00:00
Rafael Espindola
2d0358f2ad Some versions of gcc don't like typenames in these places.
Should fix the bots.

llvm-svn: 179441
2013-04-13 01:55:34 +00:00
Rafael Espindola
7beab5afc5 Finish templating MachObjectFile over endianness.
We are now able to handle big endian macho files in llvm-readobject. Thanks to
David Fang for providing the object files.

llvm-svn: 179440
2013-04-13 01:45:40 +00:00
Benjamin Kramer
1bbc641f5c Revert broken pieces of r179373.
You can't copy an OwningPtr, and move semantics aren't available in C++98.

llvm-svn: 179374
2013-04-12 12:13:51 +00:00
Andy Gibbs
651d32efb2 Replace uses of the deprecated std::auto_ptr with OwningPtr.
llvm-svn: 179373
2013-04-12 10:56:28 +00:00
Nico Rieck
c3adfbc689 Add missing relocation names
llvm-svn: 179358
2013-04-12 04:01:28 +00:00
Nico Rieck
9a59fc56ae Support MIPS64EL relocation type names
MIPS64EL relocation entries have up to three relocation operations. Because
libObject only exposes a single relocation name, use the concatenation of
the individual relocation type names.

llvm-svn: 179357
2013-04-12 03:59:28 +00:00
Rafael Espindola
af3cfcbc9f Add 179294 back, but don't use bit fields so that it works on big endian hosts.
Original message:

Print more information about relocations.

With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

llvm-svn: 179345
2013-04-12 00:17:33 +00:00
Manman Ren
744adaa6e5 TBAA: add utility to create a TBAA scalar type node
llvm-svn: 179331
2013-04-11 22:51:30 +00:00
Chad Rosier
9450b92496 [ms-inline asm] Add a new AsmRewriteKind, AOK_Delete. To be used in a future
commit.
Part of rdar://13453209

llvm-svn: 179325
2013-04-11 22:00:03 +00:00
Rafael Espindola
6c9d485a40 Revert my last two commits while I debug what is wrong in a big endian host.
llvm-svn: 179303
2013-04-11 17:46:10 +00:00
Rafael Espindola
a8d1f9a6ee Fix llvm-readobj tests on big endian hosts.
llvm-svn: 179298
2013-04-11 17:23:23 +00:00
Rafael Espindola
857bda0e10 Print more information about relocations.
With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

llvm-svn: 179294
2013-04-11 16:31:37 +00:00
Rafael Espindola
4f785c387d Add a function to check if an argument list is too long.
This will be used in clang to decide if it should create an @file or not. It
will be tested on the clang side.

Patch by Nathan Froyd.

llvm-svn: 179285
2013-04-11 14:06:34 +00:00
Alexey Samsonov
e5e655ef63 [ASan] Allow disabling init-order checks for globals by source file name.
llvm-svn: 179280
2013-04-11 13:20:00 +00:00
Rafael Espindola
25654a6ef4 Fix MachO's getRelocationAdditionalInfo.
It was returning the loaded address of the section containing the relocation,
which really doesn't seem to be the intent of this function.

llvm-svn: 179255
2013-04-11 02:21:31 +00:00
Nico Rieck
8e22855ea6 MC: Support COFF image-relative MCSymbolRefs
Add support for the COFF relocation types IMAGE_REL_I386_DIR32NB and
IMAGE_REL_AMD64_ADDR32NB for 32- and 64-bit respectively. These are
similar to normal 4-byte relocations except that they do not include
the base address of the image.

Image-relative relocations are used for debug information (32-bit) and
SEH unwind tables (64-bit).

A new MCSymbolRef variant called 'VK_COFF_IMGREL32' is introduced to
specify such relocations. For AT&T assembly, this variant can be accessed
using the symbol suffix '@imgrel'.

llvm-svn: 179240
2013-04-10 23:28:17 +00:00