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

91235 Commits

Author SHA1 Message Date
Jakub Staszak
f66115f446 Don't run expensive -O2 and -O3 in tests.
llvm-svn: 179825
2013-04-19 01:10:45 +00:00
Eli Bendersky
87517bbadb Add some more stats for fast isel vs. SelectionDAG, w.r.t lowering function
arguments in entry BBs.

llvm-svn: 179824
2013-04-19 01:04:40 +00:00
Bill Wendling
accb8d458d Use an enum instead of magic constants to improve readability.
llvm-svn: 179820
2013-04-19 00:05:59 +00:00
Bill Wendling
a3ff7af289 Implement a better fix for PR15185.
If the return type is a pointer and the call returns an integer, then do the
inttoptr convertions. And vice versa.

llvm-svn: 179817
2013-04-18 23:34:17 +00:00
Bill Wendling
e8bed10789 Relax this assert. It may not hold in all cases.
llvm-svn: 179814
2013-04-18 23:16:46 +00:00
Chad Rosier
9eb6febf54 [ms-inline asm] Apply the condition code mnemonic aliases to both the Intel and
AT&T dialect.  Test case for r179804 as well.
rdar://13674398 and PR13340.

llvm-svn: 179813
2013-04-18 23:16:12 +00:00
Bill Wendling
eb86a401e2 Assert if we're trying to generate a null compact unwind entry.
llvm-svn: 179809
2013-04-18 22:56:05 +00:00
Bill Wendling
4e6332d4c3 Set the compact unwind encoding to 'requires EH DWARF' if we cannot generate a CU encoding.
llvm-svn: 179808
2013-04-18 22:55:29 +00:00
Hal Finkel
b96e61374f Disable PPC comparison optimization by default
This seems to cause a stage-2 LLVM compile failure (by crashing TableGen); do
I'm disabling this for now.

llvm-svn: 179807
2013-04-18 22:54:25 +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
Hal Finkel
44190578df Implement optimizeCompareInstr for PPC
Many PPC instructions have a so-called 'record form' which stores to a specific
condition register the result of comparing the result of the instruction with
zero (always as a signed comparison). For integer operations on PPC64, this is
always a 64-bit comparison.

This implementation is derived from the implementation in the ARM backend;
there are some differences because PPC condition registers are allocatable
virtual registers (although the record forms always use a specific one), and we
look for a matching subtraction instruction after the compare (but before the
first use) in addition to before it.

llvm-svn: 179802
2013-04-18 22:15:08 +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
Benjamin Kramer
aeff9e581b X86: Add an SSE2 lowering for 64 bit compares when pcmpgtq (SSE4.2) isn't available.
This pattern started popping up in vectorized min/max reductions.

llvm-svn: 179797
2013-04-18 21:37:45 +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
Dmitri Gribenko
ad7b3011a6 Fix a -Wdocumentation warning
llvm-svn: 179789
2013-04-18 20:13:04 +00:00
Anat Shemer
ca5036302e In the function InstCombiner::visitExtractElementInst() removed the limitation that extract is promoted over a cast only if the cast has only one use.
llvm-svn: 179786
2013-04-18 19:56:44 +00:00
Tom Stellard
2ca5189b2e C API: Fix coding style
llvm-svn: 179785
2013-04-18 19:50:53 +00:00
Anat Shemer
2d789b4b53 Added a function scalarizePHI() that sclarizes a vector phi instruction if it has only 2 uses: one to promote the vector phi in a loop and the other use is an extract operation of one element at a constant location.
llvm-svn: 179783
2013-04-18 19:35:39 +00:00
Bill Wendling
3eb45127a1 Fix comment. Patch by Stephen Lin.
llvm-svn: 179780
2013-04-18 18:30:16 +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
Chris Lattner
a5d4b30d60 Fix a comment, PR15777.
llvm-svn: 179775
2013-04-18 17:42:14 +00:00
Derek Schuff
c55a3d43a9 Allow misaligned stores in x86 fast-isel.
In X86FastISel::X86SelectStore(), improperly aligned stores are rejected and
handled by the DAG-based ISel.  However, X86FastISel::X86SelectLoad() makes
no such requirement.  There doesn't appear to be an x86 architectural
correctness issue with allowing potentially unaligned store instructions.
This patch removes this restriction.

Patch by Jim Stichnot.

llvm-svn: 179774
2013-04-18 17:41:08 +00:00
Arnold Schwaighofer
acd551152c LoopVectorizer: Recognize min/max reductions
A min/max operation is represented by a select(cmp(lt/le/gt/ge, X, Y), X, Y)
sequence in LLVM. If we see such a sequence we can treat it just as any other
commutative binary instruction and reduce it.

This appears to help bzip2 by about 1.5% on an imac12,2.

radar://12960601

llvm-svn: 179773
2013-04-18 17:22:34 +00:00
Eli Bendersky
a2db9bb211 Fix grammar in LLVMBuild.rst
llvm-svn: 179768
2013-04-18 16:39:32 +00:00
Chad Rosier
da17fa9b38 [ms-inline asm] Simplify some logic and add a FIXME for unhandled unary minus.
llvm-svn: 179765
2013-04-18 16:28:19 +00:00
Chad Rosier
5dffee4c99 Make this private method.
llvm-svn: 179764
2013-04-18 16:13:18 +00:00
Eli Bendersky
3aded24ad4 Fixes to LangRef.rst: incorrect attributes syntax and misplaced 'nobuiltin'
Patch by Stephen Lin

llvm-svn: 179763
2013-04-18 16:11:44 +00:00
Chad Rosier
3db77b6309 Fix comment spacing.
llvm-svn: 179761
2013-04-18 15:19:45 +00:00
Benjamin Kramer
18f31a4d5e LoopVectorize: Use a set to avoid longer cycles in the reduction chain too.
Fixes PR15748.

llvm-svn: 179757
2013-04-18 14:29:13 +00:00
Hao Liu
ca09ec237c Fix for PR14824, An ARM Load/Store Optimization bug
llvm-svn: 179751
2013-04-18 09:11:08 +00:00
David Majnemer
72034bc02f Revert "Combine bit test + conditional or into simple math"
It is causing stage2 builds to fail, let's get them running again.

llvm-svn: 179750
2013-04-18 08:42:33 +00:00
David Majnemer
7dd2b94d65 Combine bit test + conditional or into simple math
Simplify:
(select (icmp eq (and X, C1), 0), Y, (or Y, C2))

Into:
(or (shl (and X, C1), C3), y)

Where:
C3 = Log(C2) - Log(C1)

If:
C1 and C2 are both powers of two

llvm-svn: 179748
2013-04-18 07:30:07 +00:00
Michael Gottesman
41ef390b2d [objc-arc] Do not mismatch up retains inside a for loop with releases outside said for loop in the presense of differing provenance caused by escaping blocks.
This occurs due to an alloca representing a separate ownership from the
original pointer. Thus consider the following pseudo-IR:

  objc_retain(%a)
  for (...) {
    objc_retain(%a)
    %block <- %a
    F(%block)
    objc_release(%block)
  }
  objc_release(%a)

From the perspective of the optimizer, the %block is a separate
provenance from the original %a. Thus the optimizer pairs up the inner
retain for %a and the outer release from %a, resulting in segfaults.

This is fixed by noting that the signature of a mismatch of
retain/releases inside the for loop is a Use/CanRelease top down with an
None bottom up (since bottom up the Retain-CanRelease-Use-Release
sequence is completed by the inner objc_retain, but top down due to the
differing provenance from the objc_release said sequence is not
completed). In said case in CheckForCFGHazards, we now clear the state
of %a implying that no pairing will occur.

Additionally a test case is included.

rdar://12969722

llvm-svn: 179747
2013-04-18 05:39:45 +00:00
Michael Gottesman
959ebfb681 Removed trailing whitespace.
llvm-svn: 179746
2013-04-18 04:34:11 +00:00
Michael Gottesman
475607a0fa Streamline arc-annotation test (removing some cases which do not add any extra coverage) and set it up to use FileCheck variables to make the test more robust.
llvm-svn: 179745
2013-04-18 04:34:06 +00:00
Akira Hatanaka
111892c653 [mips] Rename function.
llvm-svn: 179741
2013-04-18 01:00:46 +00:00
Akira Hatanaka
ae4353c654 [mips] DSP-ASE move from HI/LO register instructions.
llvm-svn: 179739
2013-04-18 00:52:44 +00:00
Jack Carter
b9f4cdf48c Mips assembler: formatting and comment changes.
This patch should not have any functional changes. 

llvm-svn: 179737
2013-04-18 00:41:53 +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
Michael Gottesman
5841ceeb4b [objc-arc] Added annotation option to only emit annotations for a specific ssa identifier.
llvm-svn: 179729
2013-04-17 21:59:41 +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
Chad Rosier
1cb3175415 [ms-inline asm] These should be int64_t, not uint64_t.
llvm-svn: 179724
2013-04-17 21:14:38 +00:00
Michael Gottesman
d548caaf4b Fixed typo.
llvm-svn: 179721
2013-04-17 21:03:53 +00:00
Chad Rosier
1efbeb717f [ms-inline asm] Add support for the minus unary operator. Previously, we were
unable to handle cases such as __asm mov eax, 8*-8.

This patch also attempts to simplify the state machine.  Further, the error
reporting has been improved.  Test cases included, but more will be added to
the clang side shortly.
rdar://13668445

llvm-svn: 179719
2013-04-17 21:01:45 +00:00
Michael Gottesman
513c6b5304 [objc-arc] Added descriptions for EnableARCAnnotations, EnableCheckForCFGHazards, EnableARCOptimizations.
llvm-svn: 179718
2013-04-17 20:48:03 +00:00
Michael Gottesman
70dfe34acf [objc-arc] Added an option to arc-annotations for turning off CheckForCFGHazard.
llvm-svn: 179717
2013-04-17 20:48:01 +00:00
Eli Bendersky
08cbb46b88 More consistent formatting and tidying-up
llvm-svn: 179716
2013-04-17 20:17:08 +00:00