Commit Graph

93200 Commits

Author SHA1 Message Date
Sean Silva
a622a3f450 [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
2013-06-21 21:51:15 +00:00
Michael Gottesman
5b3d711240 [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
2013-06-21 20:52:49 +00:00
Kevin Enderby
a89594947e 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
2013-06-21 20:51:39 +00:00
Michael Liao
72d59c7999 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
2013-06-21 20:22:45 +00:00
Benjamin Kramer
b47aceaf06 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
2013-06-21 20:20:27 +00:00
Michael Gottesman
5a18572320 [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
2013-06-21 19:44:30 +00:00
Michael Gottesman
72507101f7 [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
2013-06-21 19:44:27 +00:00
Benjamin Kramer
93702a3b07 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
2013-06-21 19:30:05 +00:00
Michael Gottesman
65af4b5333 [objcarcopts] Encapsulated PtrState.RRI.IsTrackingImpreciseRelease() => PtrState.IsTrackingImpreciseRelease().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184583 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 19:12:38 +00:00
Michael Gottesman
a211578aa2 [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
2013-06-21 19:12:36 +00:00
Justin Holewinski
0ff4287fe2 [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
2013-06-21 18:51:49 +00:00
Andrew Trick
c22e02b1f4 Add missing REQUIRES: asserts in crash.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184576 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 18:47:08 +00:00
Michael Liao
2da863984b 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
2013-06-21 18:45:27 +00:00
Andrew Trick
c12c880998 Update physreg live intervals during remat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184574 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 18:33:26 +00:00
Andrew Trick
c6bae79adb 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
2013-06-21 18:33:23 +00:00
Andrew Trick
03dca5e4b6 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
2013-06-21 18:33:20 +00:00
Andrew Trick
f1f99f394f 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
2013-06-21 18:33:17 +00:00
Andrew Trick
005622ffae whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184570 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 18:33:14 +00:00
Andrew Trick
ff197dfcf9 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
2013-06-21 18:33:11 +00:00
Andrew Trick
0db6df0d96 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
2013-06-21 18:33:09 +00:00
Andrew Trick
b5f906b98f 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
2013-06-21 18:33:06 +00:00
Andrew Trick
9b5575d55a 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
2013-06-21 18:33:04 +00:00
Andrew Trick
3bf23304ee MI-Sched: cleanup DEBUG output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184565 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 18:33:01 +00:00
Andrew Trick
1f8b48ab32 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
2013-06-21 18:32:58 +00:00
Ulrich Weigand
84569698f0 [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
2013-06-21 14:44:37 +00:00
Ulrich Weigand
cab0a19338 [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
2013-06-21 14:44:15 +00:00
Ulrich Weigand
f7c1ee79fe [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
2013-06-21 14:43:42 +00:00
Ulrich Weigand
f8f87dcfce [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
2013-06-21 14:43:10 +00:00
Ulrich Weigand
d284957246 [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
2013-06-21 14:42:49 +00:00
Ulrich Weigand
92cfa61c50 [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
2013-06-21 14:42:20 +00:00
Kostya Serebryany
e0026d00f9 add Function::removeFnAttr()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 07:38:09 +00:00
Manuel Klimek
bc735ecbbc 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
2013-06-21 07:23:14 +00:00
Michael Gottesman
3b5714de9d [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
2013-06-21 07:03:07 +00:00
Michael Gottesman
8fcf2ca81c [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
2013-06-21 07:00:44 +00:00
Michael Gottesman
00dacc44f5 [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
2013-06-21 06:59:02 +00:00
Michael Gottesman
36d9cda15d [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
2013-06-21 06:54:31 +00:00
Michael Gottesman
817ef2d78e [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
2013-06-21 05:42:08 +00:00
Nadav Rotem
de26195f3c 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
2013-06-21 04:18:13 +00:00
Michael Gottesman
d3d03fe758 [APFloat] Added missing doxygen module closing statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184526 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 04:14:17 +00:00
David Blaikie
e954d98394 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
2013-06-21 03:41:54 +00:00
Meador Inge
47afd0b77a 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
2013-06-21 03:08:23 +00:00
Sean Silva
d6e7daecf9 [docs] Fix broken link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184514 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 01:11:52 +00:00
Sean Silva
326c193e0a [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
2013-06-21 01:11:48 +00:00
Sean Silva
552d7cd31a 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
2013-06-21 00:33:01 +00:00
Sean Silva
a5706fcd80 [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
2013-06-21 00:27:54 +00:00
Sean Silva
4235ba32f2 [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
2013-06-21 00:27:50 +00:00
Quentin Colombet
2b7cdf09a1 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
2013-06-20 22:51:44 +00:00
Ulrich Weigand
846565924a [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
2013-06-20 22:39:42 +00:00
Kevin Enderby
46d7de7a19 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
2013-06-20 22:32:18 +00:00
Rafael Espindola
1c97082f53 Add another fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184488 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 22:07:53 +00:00