Commit Graph

120209 Commits

Author SHA1 Message Date
Damián Silvani f91a14ca03 Update README.md 2015-08-03 20:39:05 -03:00
Damián Silvani 556aedf270 Write README 2015-08-03 20:37:17 -03:00
Damián Silvani 0f0de95ee3 Define first regression test (copied from SPARC) 2015-08-03 20:15:00 -03:00
Damián Silvani f6cfc7d588 Replace namespace SP for M6502 2015-08-03 20:10:07 -03:00
Damián Silvani d436bd8dc8 Add missing switch case for mos6502 2015-08-03 18:48:43 -03:00
Damián Silvani 964a041a08 Eliminate big-endian subtargets of Mos6502
They were copied from SPARC V8 and V9.
2015-08-03 17:13:53 -03:00
Damián Silvani 36ee8fe697 Register Mos6502 target
Also add mos6502 subtargets on Triple class
2015-08-02 22:47:30 -03:00
Damián Silvani 642eccbb21 Clone "Sparc" target as "Mos6502"
All string occurences for "sparc", "Sparc" and "SPARC" were already
replaced, with the exception of ELF constans in the object file
descriptor as it will get removed later on (we won't be building ELF
object files for the 6502).
2015-08-02 22:45:53 -03:00
Duncan P. N. Exon Smith 5bb95798bc AsmPrinter: Stop inheriting from DIE
Change `DIELoc` and `DIEBlock` to stop inheriting from `DIE`, instead
inheriting from `DIEValueList` to share the value storage API.  This
awkward bit of code-sharing was also fairly confusing: neither `DIELoc`
nor `DIEBlock` represents a `DIE`, so why would they inherit from it?

Aside from the API cleanup, this should improve debug info memory usage
in the backend, since it shaves five pointers off of every `DIELoc` and
`DIEBlock`.  I haven't bothered to measure the savings, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243858 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-02 20:54:50 +00:00
Duncan P. N. Exon Smith 401c02a7ed DwarfLinker: Use DIEValueList instead of DIE, NFC
Use `DIEValueList` as a pointer to either `DIEBlock` or `DIELoc` instead
of `DIE`, since soon they won't inherit from the latter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243857 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-02 20:48:47 +00:00
Duncan P. N. Exon Smith 94404e8097 AsmPrinter: Split out non-DIE printing from DIE::print(), NFC
Split out a helper `printValues()` for printing `DIEBlock` and `DIELoc`,
instead of relying on `DIE::print()`.  The shared code was actually
fairly small there.  No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243856 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-02 20:46:49 +00:00
Duncan P. N. Exon Smith 69e4c2fc86 AsmPrinter: Take DIEValueList in some DwarfUnit API, NFC
Take `DIEValueList` instead of `DIE` so that `DIEBlock` and `DIELoc` can
stop inheriting from `DIE` in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-02 20:44:46 +00:00
Duncan P. N. Exon Smith bc3c2c319c AsmPrinter: Change DIEValueList to a subclass of DIE, NFC
Rewrite `DIEValueList` as a subclass of `DIE`, renaming its API to match
`DIE`'s.  This is preparation for changing `DIEBlock` and `DIELoc` to
stop inheriting from `DIE` and inherit directly from `DIEValueList`.

I thought about leaving this as a has-a relationship (and changing
`DIELoc` and `DIEBlock` to also have-a `DIEValueList`), but that seemed
to require a fair bit more boilerplate and I think it needed more
changes to the `DwarfUnit` API than this will.

No functionality change intended here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243854 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-02 20:42:45 +00:00
Duncan P. N. Exon Smith 1e95eedbab Remove dead code, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243853 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-02 20:40:05 +00:00
Simon Pilgrim 61147ebb94 [X86][SSE] Refreshed sse2 vector shift tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243850 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-02 15:23:53 +00:00
Andrew Wilkins 510a661596 Add support to set/get ordering for load/store from the C API
Summary: As per title

Reviewers: chandlerc, bogner, majnemer, axw

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243847 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-02 12:16:57 +00:00
Craig Topper f03f83cfc0 Mark CompositeType::getTypeAtIndex as const. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243845 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 22:52:12 +00:00
Craig Topper 55afc08759 Mark Type::getPointerTo as const. Unfortunately, this requires a const_cast inside, but at least it makes all methods on Type const. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243844 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 22:20:31 +00:00
Craig Topper e0582480a4 Merge the const and non-const Type::getScalarType to a const version that returns a non-const pointer. Since we don't put const on Types all places were already calling the non-const version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243843 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 22:20:27 +00:00
Craig Topper 84bbcfe200 De-constify pointers to Type since they can't be modified. NFC
This was already done in most places a while ago. This just fixes the ones that crept in over time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243842 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 22:20:21 +00:00
Jingyue Wu 6ebf387fdd [NVPTX] allow register copy between float and int
Summary:
Fixes PR24303. With Bruno's WIP (D11197) on PeepholeOptimizer, across-class
register copying (e.g. i32 to f32) becomes possible. Enhance
NVPTXInstrInfo::copyPhysReg to handle these cases.

Reviewers: jholewinski

Subscribers: eliben, jholewinski, llvm-commits, bruno

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243839 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 18:02:12 +00:00
Simon Pilgrim 93ed1b3388 Remove trailing whitespace. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243838 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 17:06:47 +00:00
Simon Pilgrim c87d0b570d Use SDValue bool check. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243837 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 17:05:50 +00:00
Yaron Keren 83d21e9cb2 Provide move constructor to appease Visual C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 15:50:53 +00:00
Simon Atanasyan e35d602838 [Mips] Support DT_MIPS_RLD_MAP_REL dynamic section tag in the llvm-readobj
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243833 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 12:02:02 +00:00
Simon Pilgrim fa2c240c15 [DAGCombiner] Convert constant AND masks to shuffle clear masks down to the byte level
The XformToShuffleWithZero method currently checks AND masks at the per-lane level for all-one and all-zero constants and attempts to convert them to legal shuffle clear masks.

This patch generalises XformToShuffleWithZero, splitting and checking the sub-lanes of the constants down to the byte level to see if any legal shuffle clear masks are possible. This allows a lot of masks (often from legalization or truncation) to be folded into existing shuffle patterns and removes a lot of constant mask loading.

There are a few examples of poor shuffle lowering that are exposed by this patch that will be cleaned up in future patches (e.g. merging shuffles that are separated by bitcasts, x86 legalized v8i8 zero extension uses PMOVZX+AND+AND instead of AND+PMOVZX, etc.)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243831 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 10:01:46 +00:00
David Blaikie b80eede641 -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
Remove some unnecessary explicit special members in Hexagon that, once
removed, allow the other implicit special members to be used without
depending on deprecated features.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243825 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 05:31:27 +00:00
David Blaikie 3d171d4f73 -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 05:10:40 +00:00
David Blaikie 0ef4b3cef4 Workaround some compilers that give a stricter throw spec to = default than implicit dtors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243823 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 05:10:37 +00:00
JF Bastien e428ba798e WebAssembly: handle more than int32 argument/return
Summary: Also test 64-bit integers, except shifts for now which are broken because isel dislikes the 32-bit truncate that precedes them.

Reviewers: sunfish

Subscribers: llvm-commits, jfb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243822 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 04:48:44 +00:00
David Blaikie 14ec817aea Missing formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243821 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 04:42:53 +00:00
David Blaikie 299ab3d150 -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
Various targets use std::swap on specific MCAsmOperands (ARM and
possibly Hexagon as well). It might be helpful to mark those subclasses
as final, to ensure that the availability of move/copy operations can't
lead to slicing. (same sort of requirements as the non-vitual dtor -
protected or a final class)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243820 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 04:40:41 +00:00
Kostya Serebryany 0dd9ec77d1 [libFuzzer] more refactoring of the Mutator and adding tests to it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243818 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 02:23:06 +00:00
Kostya Serebryany 8d4c8061c9 [libFuzzer] start refactoring the Mutator and adding tests to it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243817 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 01:42:51 +00:00
David Blaikie 8bf187c91f -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243816 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 01:08:30 +00:00
Alex Lorenz f5cf675376 AMDGPU/SI: Add implicit register operands in the correct order.
This commit fixes a bug in the class 'SIInstrInfo' where the implicit register
machine operands were added to a machine instruction in an incorrect order -
the implicit uses were added before the implicit defs.

I found this bug while working on moving the implicit register operand
verification code from the MIR parser to the machine verifier.

This commit also makes the method 'addImplicitDefUseOperands' in the machine
instruction class public so that it can be reused in the 'SIInstrInfo' class.

Reviewers: Matt Arsenault

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243799 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 23:30:09 +00:00
Alex Lorenz c198b23a4d MIR Parser: Report an error when a jump table entry is redefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243798 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 23:13:23 +00:00
Alex Lorenz faa33cdc3c MIR Parser: Remove unused variable.
This variable is unused as of r243572.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243796 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 22:59:20 +00:00
Kostya Serebryany 427b5a50cf [libFuzzer] limit the size of the inputs printed to stderr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243795 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 22:07:17 +00:00
Kostya Serebryany cab56781b5 [libFuzzer] minimal documentation on data-flow-guided fuzzing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243793 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 21:48:10 +00:00
David Blaikie 7c24e4d3c5 Fix an MSVC build break since it can't synthesize move ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243792 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 21:47:07 +00:00
David Blaikie d79f0dd3d4 Fix a GCC buildbot that seemed to be having trouble producing the implicit move ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243791 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 21:47:04 +00:00
Jingyue Wu bd11ccb2b9 [NVPTX] convert pointers in byval kernel arguments to global
Summary:
For example, in

  struct S {
    int *x;
    int *y;
  };
  __global__ void foo(S s) {
    int *b = s.y;
    // use b
  }

"b" is guaranteed to point to global. NVPTX should emit ld.global/st.global for
accessing "b".

Reviewers: jholewinski

Subscribers: llvm-commits, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243790 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 21:44:14 +00:00
David Blaikie be031d9158 Fix some formatting from a recent commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243789 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 21:37:58 +00:00
David Blaikie 4c20864f94 -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243788 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 21:37:09 +00:00
David Blaikie b4b38d65e6 -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243786 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 21:26:16 +00:00
JF Bastien caf175c28c WebAssembly: handle `ret void`.
Summary:
Use -1 as numoperands for the return SDTypeProfile, denoting that return is variadic. Note that the patterns in InstrControl.td still need to match the inputs, so this ins't an "anything goes" variadic on ret!

The next step will be to handle other local types (not just int32).

Reviewers: sunfish

Subscribers: llvm-commits, jfb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243783 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 21:04:18 +00:00
Kostya Serebryany f7aa7e6f49 [libFuzzer] make sure that 2-byte arguments of switch() are handled properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243781 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 20:58:55 +00:00
Alex Lorenz c225eda1f1 MIR Serialization: Serialize the floating point immediate machine operands.
Reviewers: Duncan P. N. Exon Smith


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243780 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 20:49:21 +00:00
Duncan P. N. Exon Smith 82e3e48d52 IR: Add a broad bitcode compatibility test
Successive versions of LLVM should retain the ability to parse bitcode
generated by old releases of the compiler.  This adds a bitcode format
compatibility test, which is intended to provide good (albeit not
entirely exhaustive) coverage of the current LangRef.

This also includes compatibility tests for LLVM 3.6.  After every 3.X.0
release, the compatibility.ll file from the 3.X branch should be copied
to compatibility-3.X.ll on trunk, and the 3.X.0 release used to generate
a corresponding bitcode file.

Patch by Vedant Kumar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243779 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 20:44:32 +00:00