oota-llvm.git
11 years agoFunctionAttrs: Merge attributes once instead of doing it for every argument.
Benjamin Kramer [Sat, 22 Jun 2013 15:51:19 +0000 (15:51 +0000)]
FunctionAttrs: Merge attributes once instead of doing it for every argument.

It has become an expensive operation. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184638 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRelocVisitor: Add another PPC64 relocation that occurs in dwarf output.
Benjamin Kramer [Sat, 22 Jun 2013 13:03:15 +0000 (13:03 +0000)]
RelocVisitor: Add another PPC64 relocation that occurs in dwarf output.

Should bring the ppc64 buildbot back to life.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184633 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCreate the file with the right permissions instead of setting it afterwards.
Rafael Espindola [Sat, 22 Jun 2013 02:34:24 +0000 (02:34 +0000)]
Create the file with the right permissions instead of setting it afterwards.

Removes the last use of PathV1.h in llvm-ar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184630 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Make symbol table top-level key.
Sean Silva [Sat, 22 Jun 2013 01:38:00 +0000 (01:38 +0000)]
[yaml2obj][ELF] Make symbol table top-level key.

Although in reality the symbol table in ELF resides in a section, the
standard requires that there be no more than one SHT_SYMTAB. To enforce
this constraint, it is cleaner to group all the symbols under a
top-level `Symbols` key on the object file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184627 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Narrow parameter.
Sean Silva [Sat, 22 Jun 2013 01:37:55 +0000 (01:37 +0000)]
[yaml2obj][ELF] Narrow parameter.

The full ELFYAML::Section isn't needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184626 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Don't special case writing these.
Sean Silva [Sat, 22 Jun 2013 01:06:12 +0000 (01:06 +0000)]
[yaml2obj][ELF] Don't special case writing these.

Just add them to the vector of section headers like the rest of the
section headers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184624 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Make this "type switch" actually readable.
Sean Silva [Sat, 22 Jun 2013 01:03:35 +0000 (01:03 +0000)]
[yaml2obj][ELF] Make this "type switch" actually readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184623 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Align section contents in the output.
Sean Silva [Sat, 22 Jun 2013 00:47:43 +0000 (00:47 +0000)]
[yaml2obj][ELF] Align section contents in the output.

The improperly aligned section content in the output was causing
buildbot failures. This should fix them.

Incidentally, this results in a simpler and more robust API for
ContiguousBlobAccumulator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184621 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPrevent LiveRangeEdit from deleting bundled instructions.
Andrew Trick [Sat, 22 Jun 2013 00:33:48 +0000 (00:33 +0000)]
Prevent LiveRangeEdit from deleting bundled instructions.

We have no targets on trunk that bundle before regalloc. However, we
have been advertising regalloc as bundle safe for use with out-of-tree
targets. We need to at least contain the parts of the code that are
still unsafe.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184620 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReapply documentation changes from r184584.
Benjamin Kramer [Fri, 21 Jun 2013 23:45:18 +0000 (23:45 +0000)]
Reapply documentation changes from r184584.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184609 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis was a nifty test, but remove it.
Sean Silva [Fri, 21 Jun 2013 23:17:13 +0000 (23:17 +0000)]
This was a nifty test, but remove it.

It wouldn't really test anything that doesn't already have a more
targeted test:
`yaml2obj-elf-section-basic.yaml`:
  Already tests that section content is correctly passed though.
`yaml2obj-elf-symbol-basic.yaml` (this file):
  Tests that the st_value and st_size attributes of `main` are set
  correctly.
Between those two tests, disassembling the file doesn't really add
anything, so just remove mention of disassembling the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184607 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "Put r184469 disassembler test back on X86"
Sean Silva [Fri, 21 Jun 2013 23:17:10 +0000 (23:17 +0000)]
Revert "Put r184469 disassembler test back on X86"

This reverts commit r184602. In an upcoming commit, I will just remove
the disassembler part of the test; it was mostly just a "nifty" thing
marking a milestone but it doesn't test anything that isn't tested
elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184606 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebugInfo: Don't lose unreferenced non-trivial by-value parameters
David Blaikie [Fri, 21 Jun 2013 22:56:30 +0000 (22:56 +0000)]
DebugInfo: Don't lose unreferenced non-trivial by-value parameters

A FastISel optimization was causing us to emit no information for such
parameters & when they go missing we end up emitting a different
function type. By avoiding that shortcut we not only get types correct
(very important) but also location information (handy) - even if it's
only live at the start of a function & may be clobbered later.

Reviewed/discussion by Evan Cheng & Dan Gohman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184604 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPut r184469 disassembler test back on X86
Renato Golin [Fri, 21 Jun 2013 22:42:20 +0000 (22:42 +0000)]
Put r184469 disassembler test back on X86

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184602 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert some uses of PathV1.h in ArchiveWriter.cpp.
Rafael Espindola [Fri, 21 Jun 2013 22:11:36 +0000 (22:11 +0000)]
Convert some uses of PathV1.h in ArchiveWriter.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184599 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Don't do disassembly in this test.
Sean Silva [Fri, 21 Jun 2013 21:51:15 +0000 (21:51 +0000)]
[yaml2obj][ELF] Don't do disassembly in this test.

This was causing buildbot failures when build without X86 support.

Is there a way to conditionalize the test on the X86 target being
present?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184597 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objc-arc-opts] Make IsTrackingImpreciseReleases a const method.
Michael Gottesman [Fri, 21 Jun 2013 20:52:49 +0000 (20:52 +0000)]
[objc-arc-opts] Make IsTrackingImpreciseReleases a const method.

Thanks to Bill Wendling for pointing this out!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184593 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImprove the time it takes to generating dwarf for assembly source files
Kevin Enderby [Fri, 21 Jun 2013 20:51:39 +0000 (20:51 +0000)]
Improve the time it takes to generating dwarf for assembly source files
that have been run through the 'C' pre-processor.

The implementation of SrcMgr.FindLineNumber() is slow but OK if
it uses its cache when called multiple times with an SMLoc that is
forward of the previous call.

In the case of generating dwarf for assembly source files that have
been run through the 'C' pre-processor we need to calculate the
logical line number based on the last parsed cpp hash file line
comment.  And the current code calls SrcMgr.FindLineNumber()
twice to do this causing its cache not to work and results in very
slow compile times:

% time /Volumes/SandBox/build-llvm/Debug+Asserts/bin/llvm-mc -triple thumbv7-apple-ios -filetype=obj -o /tmp/x.o mscorlib.dll.E -g
672.542u 0.299s 11:13.15 99.9% 0+0k 0+2io 2106pf+0w

So we save the info from the last parsed cpp hash file line comment
to avoid making the second call to SrcMgr.FindLineNumber() most times
and end up with compile times like:

% time /Volumes/SandBox/build-llvm/Debug+Asserts/bin/llvm-mc -triple thumbv7-apple-ios -filetype=obj -o /tmp/x.o mscorlib.dll.E -g
3.404u 0.104s 0:03.80 92.1% 0+0k 0+3io 2105pf+0w

rdar://14156934

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184592 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd '-mcpu=' to prevent breaking on ATOM due to different code schedule
Michael Liao [Fri, 21 Jun 2013 20:22:45 +0000 (20:22 +0000)]
Add '-mcpu=' to prevent breaking on ATOM due to different code schedule

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184591 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with...
Benjamin Kramer [Fri, 21 Jun 2013 20:20:27 +0000 (20:20 +0000)]
Revert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch probability."

This reverts commit r184584. Breaks PPC selfhost.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184590 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objc-arc-opts] Now that PtrState.RRI is encapsulated in PtrState, make PtrState...
Michael Gottesman [Fri, 21 Jun 2013 19:44:30 +0000 (19:44 +0000)]
[objc-arc-opts] Now that PtrState.RRI is encapsulated in PtrState, make PtrState.RRI private and delete the TODO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184587 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objc-arc-opts] Encapsulated PtrState.RRI.{Calls,ReverseInsertPts} into several metho...
Michael Gottesman [Fri, 21 Jun 2013 19:44:27 +0000 (19:44 +0000)]
[objc-arc-opts] Encapsulated PtrState.RRI.{Calls,ReverseInsertPts} into several methods on PtrState.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184586 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoBlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch...
Benjamin Kramer [Fri, 21 Jun 2013 19:30:05 +0000 (19:30 +0000)]
BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch probability.

Zero is used by BlockFrequencyInfo as a special "don't know" value. It also
causes a sink for frequencies as you can't ever get off a zero frequency with
more multiplies.

This recovers a 10% regression on MultiSource/Benchmarks/7zip. A zero frequency
was propagated into an inner loop causing excessive spilling.

PR16402.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184584 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objcarcopts] Encapsulated PtrState.RRI.IsTrackingImpreciseRelease() => PtrState...
Michael Gottesman [Fri, 21 Jun 2013 19:12:38 +0000 (19:12 +0000)]
[objcarcopts] Encapsulated PtrState.RRI.IsTrackingImpreciseRelease() => PtrState.IsTrackingImpreciseRelease().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184583 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objcarcopts] Encapsulate PtrState.RRI.CFGHazardAfflicted via methods PtrState.{IsCFG...
Michael Gottesman [Fri, 21 Jun 2013 19:12:36 +0000 (19:12 +0000)]
[objcarcopts] Encapsulate PtrState.RRI.CFGHazardAfflicted via methods PtrState.{IsCFGHazardAfflicted,SetCFGHazardAfflicted}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184582 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[NVPTX] Add support for selecting CUDA vs OCL mode based on triple
Justin Holewinski [Fri, 21 Jun 2013 18:51:49 +0000 (18:51 +0000)]
[NVPTX] Add support for selecting CUDA vs OCL mode based on triple

IR for CUDA should use "nvptx[64]-nvidia-cuda", and IR for NV OpenCL should use "nvptx[64]-nvidia-nvcl"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184579 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd missing REQUIRES: asserts in crash.ll.
Andrew Trick [Fri, 21 Jun 2013 18:47:08 +0000 (18:47 +0000)]
Add missing REQUIRES: asserts in crash.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184576 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix PR16360
Michael Liao [Fri, 21 Jun 2013 18:45:27 +0000 (18:45 +0000)]
Fix PR16360

When (srl (anyextend x), c) is folded into (anyextend (srl x, c)), the
high bits are not cleared. Add 'and' to clear off them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184575 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate physreg live intervals during remat.
Andrew Trick [Fri, 21 Jun 2013 18:33:26 +0000 (18:33 +0000)]
Update physreg live intervals during remat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184574 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdded -precompute-phys-liveness for testing LiveIntervals updates.
Andrew Trick [Fri, 21 Jun 2013 18:33:23 +0000 (18:33 +0000)]
Added -precompute-phys-liveness for testing LiveIntervals updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184573 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHandle more cases in LiveRangeEdit::eliminateDeadDefs.
Andrew Trick [Fri, 21 Jun 2013 18:33:20 +0000 (18:33 +0000)]
Handle more cases in LiveRangeEdit::eliminateDeadDefs.

Live intervals for dead physregs may be created during coalescing. We
need to update these in the event that their instruction goes away.

crash.ll is the unit test that catches it when MI sched is enabled on
X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184572 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRefactor LiveRangeEdit::eliminateDeadDefs.
Andrew Trick [Fri, 21 Jun 2013 18:33:17 +0000 (18:33 +0000)]
Refactor LiveRangeEdit::eliminateDeadDefs.

I want to add logic to handle more cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184571 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agowhitespace
Andrew Trick [Fri, 21 Jun 2013 18:33:14 +0000 (18:33 +0000)]
whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184570 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a -join-globalcopies bug; handle undef operands.
Andrew Trick [Fri, 21 Jun 2013 18:33:11 +0000 (18:33 +0000)]
Fix a -join-globalcopies bug; handle undef operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184569 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoModify the -join-globalcopies option (off by default).
Andrew Trick [Fri, 21 Jun 2013 18:33:09 +0000 (18:33 +0000)]
Modify the -join-globalcopies option (off by default).

Always coalesce in forward order to propagate rematerialization.
I'm fixing this option so I can enable it by default soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184568 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMake rematerialization in the coalescer less sensitive to LRG order.
Andrew Trick [Fri, 21 Jun 2013 18:33:06 +0000 (18:33 +0000)]
Make rematerialization in the coalescer less sensitive to LRG order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184567 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix IMULX machine model. Multiple def operands require multiple SchedWrites.
Andrew Trick [Fri, 21 Jun 2013 18:33:04 +0000 (18:33 +0000)]
Fix IMULX machine model. Multiple def operands require multiple SchedWrites.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184566 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: cleanup DEBUG output.
Andrew Trick [Fri, 21 Jun 2013 18:33:01 +0000 (18:33 +0000)]
MI-Sched: cleanup DEBUG output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184565 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMI-Sched: Adjust regpressure limits for reserved regs.
Andrew Trick [Fri, 21 Jun 2013 18:32:58 +0000 (18:32 +0000)]
MI-Sched: Adjust regpressure limits for reserved regs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184564 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Support R_PPC_REL16 family of relocations
Ulrich Weigand [Fri, 21 Jun 2013 14:44:37 +0000 (14:44 +0000)]
[PowerPC] Support R_PPC_REL16 family of relocations

The GNU assembler supports (as extension to the ABI) use of PC-relative
relocations in half16 fields, which allows writing code like:

  li 1, base-.

This patch adds support for those relocation types in the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184552 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Support various tls-related modifiers
Ulrich Weigand [Fri, 21 Jun 2013 14:44:15 +0000 (14:44 +0000)]
[PowerPC] Support various tls-related modifiers

The current code base only supports the minimum set of tls-related
relocations and @modifiers that are necessary to support compiler-
generated code.  This patch extends this to the full set defined
in the ABI (and supported by the GNU assembler) for the benefit
of the assembler parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184551 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Support @higher et.al. modifiers
Ulrich Weigand [Fri, 21 Jun 2013 14:43:42 +0000 (14:43 +0000)]
[PowerPC] Support @higher et.al. modifiers

This adds support for the @higher, @highera, @highest, and @highesta
modifers, including some missing relocation types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184550 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Support @toc@h modifier
Ulrich Weigand [Fri, 21 Jun 2013 14:43:10 +0000 (14:43 +0000)]
[PowerPC] Support @toc@h modifier

This adds the relocation type and other necessary infrastructure
to use the @toc@h modifier in the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184549 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Support @h modifier
Ulrich Weigand [Fri, 21 Jun 2013 14:42:49 +0000 (14:42 +0000)]
[PowerPC] Support @h modifier

This adds necessary infrastructure to support the @h modifier.
Note that all required relocation types were already present
(and unused).

This patch provides support for using @h in the assembler;
it would also be possible to now use this feature in code
generated by the compiler, but this is not done yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184548 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Rename some more VK_PPC_ enums
Ulrich Weigand [Fri, 21 Jun 2013 14:42:20 +0000 (14:42 +0000)]
[PowerPC] Rename some more VK_PPC_ enums

This renames more VK_PPC_ enums, to make them more closely reflect
the @modifier string they represent.  This also prepares for adding
a bunch of new VK_PPC_ enums in upcoming patches.

For consistency, some MO_ flags related to VK_PPC_ enums are
likewise renamed.

No change in behaviour.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184547 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoadd Function::removeFnAttr()
Kostya Serebryany [Fri, 21 Jun 2013 07:38:09 +0000 (07:38 +0000)]
add Function::removeFnAttr()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184536 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix an ordering problem in the test.
Manuel Klimek [Fri, 21 Jun 2013 07:23:14 +0000 (07:23 +0000)]
Fix an ordering problem in the test.

The output can be in different orders, which breaks the test in some
situations. I have not yet found out what the root cause of the order
difference is. This fixes our internal build. If it is not the right
solution, feel free to roll back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184535 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objcarcopts] Encapsulate PtrState.RRI.ReleaseMetadata into the methods PtrState...
Michael Gottesman [Fri, 21 Jun 2013 07:03:07 +0000 (07:03 +0000)]
[objcarcopts] Encapsulate PtrState.RRI.ReleaseMetadata into the methods PtrState.GetReleaseMetadata() and PtrState.SetReleaseMetadata().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184534 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objcarcopts] Encapsulate PtrState.RRI.IsTailCallRelease into the method PtrState...
Michael Gottesman [Fri, 21 Jun 2013 07:00:44 +0000 (07:00 +0000)]
[objcarcopts] Encapsulate PtrState.RRI.IsTailCallRelease into the method PtrState.IsTailCallRelease() and PtrState.SetTailCallRelease().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184533 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[obcjarcopts] Encapsulate PtrState.RRI.KnownSafe in the methods PtrState.IsKnownSafe...
Michael Gottesman [Fri, 21 Jun 2013 06:59:02 +0000 (06:59 +0000)]
[obcjarcopts] Encapsulate PtrState.RRI.KnownSafe in the methods PtrState.IsKnownSafe and PtrState.SetKnownSafe.

This is apart of a series of patches to encapsulate PtrState.RRI and
make PtrState.RRI a private field of PtrState.

*NOTE* This is actually the second commit in the patch stream. I should
have put this note on the first such commit r184528.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184532 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objcarcopts] Some more minor code cleanups/comment additions.
Michael Gottesman [Fri, 21 Jun 2013 06:54:31 +0000 (06:54 +0000)]
[objcarcopts] Some more minor code cleanups/comment additions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184531 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[objcarcopts] Refactor out the RRInfo merging code from PtrState into RRInfo::Merge.
Michael Gottesman [Fri, 21 Jun 2013 05:42:08 +0000 (05:42 +0000)]
[objcarcopts] Refactor out the RRInfo merging code from PtrState into RRInfo::Merge.

I also added some comments and performed minor code cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184528 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSLP Vectorizer: do not search for store-chains that are wider than the vector-registe...
Nadav Rotem [Fri, 21 Jun 2013 04:18:13 +0000 (04:18 +0000)]
SLP Vectorizer: do not search for store-chains that are wider than the vector-register size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184527 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[APFloat] Added missing doxygen module closing statement.
Michael Gottesman [Fri, 21 Jun 2013 04:14:17 +0000 (04:14 +0000)]
[APFloat] Added missing doxygen module closing statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184526 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDebugInfo: When asm printing include a '[def]' tag for tag decls that are definitions...
David Blaikie [Fri, 21 Jun 2013 03:41:54 +0000 (03:41 +0000)]
DebugInfo: When asm printing include a '[def]' tag for tag decls that are definitions (& rename the 'fwd' tag to 'decl' for clarity)

This change is version locked with a change in Clang, so expect some
transient buildbot fallout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184525 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a release note for removing the simplify-libcalls pass.
Meador Inge [Fri, 21 Jun 2013 03:08:23 +0000 (03:08 +0000)]
Add a release note for removing the simplify-libcalls pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184522 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[docs] Fix broken link.
Sean Silva [Fri, 21 Jun 2013 01:11:52 +0000 (01:11 +0000)]
[docs] Fix broken link.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184514 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Allow expressing undefined symbols.
Sean Silva [Fri, 21 Jun 2013 01:11:48 +0000 (01:11 +0000)]
[yaml2obj][ELF] Allow expressing undefined symbols.

Previously we unconditionally enforced that section references in
symbols in the YAML had a name that was a section name present in the
object, and linked the references to that section. Now, permit empty
section names (already the default, if the `Section` key is not
provided) to indicate SHN_UNDEF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184513 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUnbreak bots. Didn't realize this was a C++11 feature.
Sean Silva [Fri, 21 Jun 2013 00:33:01 +0000 (00:33 +0000)]
Unbreak bots. Didn't realize this was a C++11 feature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184508 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[docs] Fix formatting.
Sean Silva [Fri, 21 Jun 2013 00:27:54 +0000 (00:27 +0000)]
[docs] Fix formatting.

'\n' was displaying as 'n'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184507 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Don't explicitly set `Binding` with STB_*
Sean Silva [Fri, 21 Jun 2013 00:27:50 +0000 (00:27 +0000)]
[yaml2obj][ELF] Don't explicitly set `Binding` with STB_*

Instead, just have 3 sub-lists, one for each of
{STB_LOCAL,STB_GLOBAL,STB_WEAK}.

This allows us to be a lot more explicit w.r.t. the symbol ordering in
the object file, because if we allowed explicitly setting the STB_*
`Binding` key for the symbol, then we might have ended up having to
shuffle STB_LOCAL symbols to the front of the list, which is likely to
cause confusion and potential for error.

Also, this new approach is simpler ;)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184506 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: Remove a (false) dependency on the memoryoperand's value as we do not use
Quentin Colombet [Thu, 20 Jun 2013 22:51:44 +0000 (22:51 +0000)]
ARM: Remove a (false) dependency on the memoryoperand's value as we do not use
it at the moment.
This allows to form more paired loads even when stack coloring pass destroys the
memoryoperand's value.

<rdar://problem/13978317>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184492 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Clean up VK_PPC_TOC... names
Ulrich Weigand [Thu, 20 Jun 2013 22:39:42 +0000 (22:39 +0000)]
[PowerPC] Clean up VK_PPC_TOC... names

This is another minor cleanup; to bring enum names in line
with the corresponding @modifier names, this renames:

  VK_PPC_TOC -> VK_PPC_TOCBASE
  VK_PPC_TOC_ENTRY -> VK_PPC_TOC16

No code change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184491 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate the X86 disassembler to use xacquire and xrelease when appropriate.
Kevin Enderby [Thu, 20 Jun 2013 22:32:18 +0000 (22:32 +0000)]
Update the X86 disassembler to use xacquire and xrelease when appropriate.

This is a bit tricky as the xacquire and xrelease hints use the same bytes,
0xf2 and 0xf3, as the repne and rep prefixes.

Fortunately llvm has different llvm MCInst Opcode enums for rep/xrelease
and repne/xacquire. So to make this work a boolean was added the
InternalInstruction struct as part of the Prefix state which is set with the
added logic in readPrefixes() when decoding an instruction to determine
if these prefix bytes are to be disassembled as xacquire or xrelease.  Then
we let the matcher pick the normal prefix instructionID and we change the
Opcode after that when it is set into the MCInst being created.

rdar://11019859

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184490 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd another fixme.
Rafael Espindola [Thu, 20 Jun 2013 22:07:53 +0000 (22:07 +0000)]
Add another fixme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184488 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a fixme.
Rafael Espindola [Thu, 20 Jun 2013 22:04:56 +0000 (22:04 +0000)]
Add a fixme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184486 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Minor cleanup in PPCELFObjectWriter::getRelocTypeInner
Ulrich Weigand [Thu, 20 Jun 2013 22:04:40 +0000 (22:04 +0000)]
[PowerPC] Minor cleanup in PPCELFObjectWriter::getRelocTypeInner

This just re-sorts the big switch statement in
PPCELFObjectWriter::getRelocTypeInner to follow
the (numerical) order of the reloc types, and
fixes a couple of whitespace issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184485 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove last use of PathV1.h from Archive.cpp.
Rafael Espindola [Thu, 20 Jun 2013 22:02:10 +0000 (22:02 +0000)]
Remove last use of PathV1.h from Archive.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184484 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Expand sub for v2i32 and v4i32 for SI
Tom Stellard [Thu, 20 Jun 2013 21:55:37 +0000 (21:55 +0000)]
R600/SI: Expand sub for v2i32 and v4i32 for SI

Also add a v2i32 test to the existing v4i32 test.

Patch by: Aaron Watry

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry<awatry@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184482 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: Expand add for v2i32 and v4i32
Tom Stellard [Thu, 20 Jun 2013 21:55:30 +0000 (21:55 +0000)]
R600/SI: Expand add for v2i32 and v4i32

Also add SI tests to existing file and a v2i32 test for both
R600 and SI.

Patch by: Aaron Watry

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184481 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600: Expand v2i32 load/store instead of custom lowering
Tom Stellard [Thu, 20 Jun 2013 21:55:23 +0000 (21:55 +0000)]
R600: Expand v2i32 load/store instead of custom lowering

The custom lowering causes llc to crash with a segfault.

Ideally, the custom lowering can be fixed, but this allows
programs which load/store v2i32 to work without crashing.

Patch by: Aaron Watry

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry<awatry@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184480 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMinor grammar and word usage fix to 'returned' parameter attribute section of LangRef
Stephen Lin [Thu, 20 Jun 2013 21:55:10 +0000 (21:55 +0000)]
Minor grammar and word usage fix to 'returned' parameter attribute section of LangRef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184479 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agomake getLastModificationTime const. Move it with the other getters.
Rafael Espindola [Thu, 20 Jun 2013 21:51:49 +0000 (21:51 +0000)]
make getLastModificationTime const. Move it with the other getters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184478 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Add support for st_value and st_size.
Sean Silva [Thu, 20 Jun 2013 20:59:47 +0000 (20:59 +0000)]
[yaml2obj][ELF] Add support for st_value and st_size.

After this patch, the ELF file produced by
`yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64
(under SysV ABI, obviously; I tested on Linux), produces a working
executable that goes into an infinite loop!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184469 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Allow symbols to reference sections.
Sean Silva [Thu, 20 Jun 2013 20:59:41 +0000 (20:59 +0000)]
[yaml2obj][ELF] Allow symbols to reference sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184468 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Add the section name -> section index map to State.
Sean Silva [Thu, 20 Jun 2013 20:59:34 +0000 (20:59 +0000)]
[yaml2obj][ELF] Add the section name -> section index map to State.

One of the key things that the YAML format abstracts over is the use of
section numbers for referencing sections. Instead, textual section names
are used, which yaml2obj then translates into appropriate section
numbers. (Technically ELF doesn't care about section names (only section
numbers), but since this is a testing tool, readability counts).

This simplifies using section names as symbolic references in various
parts of the code. An upcoming commit will use this to allow symbols to
reference sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184467 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a setLastModificationAndAccessTime to PathV2.
Rafael Espindola [Thu, 20 Jun 2013 20:56:14 +0000 (20:56 +0000)]
Add a setLastModificationAndAccessTime to PathV2.

With this we can remove the last use of PathV1 from llvm-ar.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184464 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips] Remove Triple:mips from SupportedArchs in MCJIT unittests
Akira Hatanaka [Thu, 20 Jun 2013 20:33:06 +0000 (20:33 +0000)]
[mips] Remove Triple:mips from SupportedArchs in MCJIT unittests

MIPS does not handle multiple relocations correctly, so two tests from the
unittests are expected to fail. These are:
 - MCJITTest.return_global and
 - MCJITTest.multiple_functions.

Until the multiple relocations are fixed, XFAIL the MCJIT unittests for
MIPS. This issue is tracked as Bug 16250.

Patch by Petar Jovanovic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184461 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse a raw_fd_ostream instead of a std::ofstream.
Rafael Espindola [Thu, 20 Jun 2013 19:50:39 +0000 (19:50 +0000)]
Use a raw_fd_ostream instead of a std::ofstream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184460 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove the simplify-libcalls pass (finally)
Meador Inge [Thu, 20 Jun 2013 19:48:07 +0000 (19:48 +0000)]
Remove the simplify-libcalls pass (finally)

This commit completely removes what is left of the simplify-libcalls
pass.  All of the functionality has now been migrated to the instcombine
and functionattrs passes.  The following C API functions are now NOPs:

  1. LLVMAddSimplifyLibCallsPass
  2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184459 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Start factoring into "single point of truth".
Sean Silva [Thu, 20 Jun 2013 19:11:44 +0000 (19:11 +0000)]
[yaml2obj][ELF] Start factoring into "single point of truth".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184457 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[yaml2obj][ELF] Just let this class own its buffer.
Sean Silva [Thu, 20 Jun 2013 19:11:41 +0000 (19:11 +0000)]
[yaml2obj][ELF] Just let this class own its buffer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184456 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove a trivial use of sys::Path.
Rafael Espindola [Thu, 20 Jun 2013 18:55:44 +0000 (18:55 +0000)]
Remove a trivial use of sys::Path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184455 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ReleaseNotes] Added bullet point stating that APFloat::isNormal() is now IEEE 754R...
Michael Gottesman [Thu, 20 Jun 2013 18:47:51 +0000 (18:47 +0000)]
[ReleaseNotes] Added bullet point stating that APFloat::isNormal() is now IEEE 754R-2008 compliant and that the relevant method renaming occurred.

For more information see r184449, r184350, r184356, r184366.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184452 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd support for getting the last modification time from a file_status.
Rafael Espindola [Thu, 20 Jun 2013 18:42:04 +0000 (18:42 +0000)]
Add support for getting the last modification time from a file_status.

Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184450 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[APFloat] Rename isIEEENormal => isNormal and remove old isNormal method.
Michael Gottesman [Thu, 20 Jun 2013 18:34:38 +0000 (18:34 +0000)]
[APFloat] Rename isIEEENormal => isNormal and remove old isNormal method.

The old isNormal is already functionally replaced by the method isFiniteNonZero
in r184350 and all references to said method were replaced in LLVM/clang in
r184356/134366.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184449 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse only the filename when deciding if a file is a duplicate.
Rafael Espindola [Thu, 20 Jun 2013 18:30:37 +0000 (18:30 +0000)]
Use only the filename when deciding if a file is a duplicate.

Matches gnu ar behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184448 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[APFloat] Fix typo in test so we actually test if we handle denormals.
Michael Gottesman [Thu, 20 Jun 2013 18:25:16 +0000 (18:25 +0000)]
[APFloat] Fix typo in test so we actually test if we handle denormals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184447 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoClang-format the SLP vectorizer. No functionality change.
Nadav Rotem [Thu, 20 Jun 2013 17:54:36 +0000 (17:54 +0000)]
Clang-format the SLP vectorizer. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184446 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis reverts r155000.
Joey Gouly [Thu, 20 Jun 2013 17:42:36 +0000 (17:42 +0000)]
This reverts r155000.
The cdp2 instruction should have the same restrictions as cdp on the
co-processor registers.

VFP instructions on v8/AArch32 share the same encoding space as cdp2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184445 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSLPVectorization: Add a basic support for cross-basic block slp vectorization.
Nadav Rotem [Thu, 20 Jun 2013 17:41:45 +0000 (17:41 +0000)]
SLPVectorization:  Add a basic support for cross-basic block slp vectorization.

We collect gather sequences when we vectorize basic blocks. Gather sequences are excellent
hints for vectorization of other basic blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184444 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGive this X86-specific test a triple so it's actually X86-specific.
David Blaikie [Thu, 20 Jun 2013 17:31:32 +0000 (17:31 +0000)]
Give this X86-specific test a triple so it's actually X86-specific.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184443 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Remove unused parameter
Ulrich Weigand [Thu, 20 Jun 2013 16:58:14 +0000 (16:58 +0000)]
[PowerPC] Remove unused parameter

The isDarwin parameter to the llvm::LowerPPCMachineInstrToMCInst
routine is now no longer needed; remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184441 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange the debug type to match the debug type that is used by vecutils.cpp.
Nadav Rotem [Thu, 20 Jun 2013 16:38:05 +0000 (16:38 +0000)]
Change the debug type to match the debug type that is used by vecutils.cpp.
This change makes it easier to filter debug messages.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184440 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Add missing build dependency
Ulrich Weigand [Thu, 20 Jun 2013 16:38:00 +0000 (16:38 +0000)]
[PowerPC] Add missing build dependency

This (hopefully) fixes build failures resulting from r184436;
the PowerPC asm parser now depends on PowerPC target expresssions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184439 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[MC] Support @ variants with directional labels
Ulrich Weigand [Thu, 20 Jun 2013 16:24:17 +0000 (16:24 +0000)]
[MC] Support @ variants with directional labels

The assembler parser common code supports recognizing symbol variants
using the @ modifer.  On PowerPC, it should also be possible to use
(some of) those modifiers with directional labels, like "1f@l".

This patch adds support for accepting symbol variants on directional
labels as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184437 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Optimize @ha/@l constructs
Ulrich Weigand [Thu, 20 Jun 2013 16:23:52 +0000 (16:23 +0000)]
[PowerPC] Optimize @ha/@l constructs

This patch adds support for having the assembler optimize fixups
to constructs like "symbol@ha" or "symbol@l" if "symbol" can be
resolved at assembler time.

This optimization is already present in the PPCMCExpr.cpp code
for handling PPC_HA16/PPC_LO16 target expressions.  However,
those target expression were used only on Darwin targets.

This patch changes target expression code so that they are
usable also with the GNU assembler (using the @ha / @l syntax
instead of the ha16() / lo16() syntax), and changes the
MCInst lowering code to generate those target expressions
where appropriate.

It also changes the asm parser to generate HA16/LO16 target
expressions when parsing assembler source that uses the
@ha / @l modifiers.  The effect is that now the above-
mentioned optimization automatically becomes available
for those situations too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184436 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PowerPC] Support compare mnemonics with implied CR0
Ulrich Weigand [Thu, 20 Jun 2013 16:15:12 +0000 (16:15 +0000)]
[PowerPC] Support compare mnemonics with implied CR0

Just like for branch mnemonics (where support was recently added), the
assembler is supposed to support extended mnemonics for the compare
instructions where no condition register is specified explicitly
(and CR0 is assumed implicitly).

This patch adds support for those extended compare mnemonics.

Index: llvm-head/test/MC/PowerPC/ppc64-encoding-ext.s
===================================================================
--- llvm-head.orig/test/MC/PowerPC/ppc64-encoding-ext.s
+++ llvm-head/test/MC/PowerPC/ppc64-encoding-ext.s
@@ -449,21 +449,37 @@

 # CHECK: cmpdi 2, 3, 128                 # encoding: [0x2d,0x23,0x00,0x80]
          cmpdi 2, 3, 128
+# CHECK: cmpdi 0, 3, 128                 # encoding: [0x2c,0x23,0x00,0x80]
+         cmpdi 3, 128
 # CHECK: cmpd 2, 3, 4                    # encoding: [0x7d,0x23,0x20,0x00]
          cmpd 2, 3, 4
+# CHECK: cmpd 0, 3, 4                    # encoding: [0x7c,0x23,0x20,0x00]
+         cmpd 3, 4
 # CHECK: cmpldi 2, 3, 128                # encoding: [0x29,0x23,0x00,0x80]
          cmpldi 2, 3, 128
+# CHECK: cmpldi 0, 3, 128                # encoding: [0x28,0x23,0x00,0x80]
+         cmpldi 3, 128
 # CHECK: cmpld 2, 3, 4                   # encoding: [0x7d,0x23,0x20,0x40]
          cmpld 2, 3, 4
+# CHECK: cmpld 0, 3, 4                   # encoding: [0x7c,0x23,0x20,0x40]
+         cmpld 3, 4

 # CHECK: cmpwi 2, 3, 128                 # encoding: [0x2d,0x03,0x00,0x80]
          cmpwi 2, 3, 128
+# CHECK: cmpwi 0, 3, 128                 # encoding: [0x2c,0x03,0x00,0x80]
+         cmpwi 3, 128
 # CHECK: cmpw 2, 3, 4                    # encoding: [0x7d,0x03,0x20,0x00]
          cmpw 2, 3, 4
+# CHECK: cmpw 0, 3, 4                    # encoding: [0x7c,0x03,0x20,0x00]
+         cmpw 3, 4
 # CHECK: cmplwi 2, 3, 128                # encoding: [0x29,0x03,0x00,0x80]
          cmplwi 2, 3, 128
+# CHECK: cmplwi 0, 3, 128                # encoding: [0x28,0x03,0x00,0x80]
+         cmplwi 3, 128
 # CHECK: cmplw 2, 3, 4                   # encoding: [0x7d,0x03,0x20,0x40]
          cmplw 2, 3, 4
+# CHECK: cmplw 0, 3, 4                   # encoding: [0x7c,0x03,0x20,0x40]
+         cmplw 3, 4

 # FIXME: Trap mnemonics

Index: llvm-head/lib/Target/PowerPC/PPCInstrInfo.td
===================================================================
--- llvm-head.orig/lib/Target/PowerPC/PPCInstrInfo.td
+++ llvm-head/lib/Target/PowerPC/PPCInstrInfo.td
@@ -2201,3 +2201,12 @@ defm : BranchExtendedMnemonic<"ne", 68>;
 defm : BranchExtendedMnemonic<"nu", 100>;
 defm : BranchExtendedMnemonic<"ns", 100>;

+def : InstAlias<"cmpwi $rA, $imm", (CMPWI CR0, gprc:$rA, s16imm:$imm)>;
+def : InstAlias<"cmpw $rA, $rB", (CMPW CR0, gprc:$rA, gprc:$rB)>;
+def : InstAlias<"cmplwi $rA, $imm", (CMPLWI CR0, gprc:$rA, u16imm:$imm)>;
+def : InstAlias<"cmplw $rA, $rB", (CMPLW CR0, gprc:$rA, gprc:$rB)>;
+def : InstAlias<"cmpdi $rA, $imm", (CMPDI CR0, g8rc:$rA, s16imm:$imm)>;
+def : InstAlias<"cmpd $rA, $rB", (CMPD CR0, g8rc:$rA, g8rc:$rB)>;
+def : InstAlias<"cmpldi $rA, $imm", (CMPLDI CR0, g8rc:$rA, u16imm:$imm)>;
+def : InstAlias<"cmpld $rA, $rB", (CMPLD CR0, g8rc:$rA, g8rc:$rB)>;
+

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184435 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix get_magic() handling of short reads.
Evgeniy Stepanov [Thu, 20 Jun 2013 15:56:05 +0000 (15:56 +0000)]
Fix get_magic() handling of short reads.

PR16389

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184434 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove the transitional GetUniqueID.
Rafael Espindola [Thu, 20 Jun 2013 15:20:11 +0000 (15:20 +0000)]
Remove the transitional GetUniqueID.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184433 91177308-0d34-0410-b5e6-96231b3b80d8