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

92292 Commits

Author SHA1 Message Date
Bill Wendling
e5fb3dbcbb Don't reach into the middle of TargetMachine and cache one of its ivars.
Not only does this break encapsulation, it's gross.

llvm-svn: 182876
2013-05-29 20:37:19 +00:00
Tim Northover
db2d7a34b2 Teach ReMaterialization to be more cunning about subregisters
This allows rematerialization during register coalescing to handle
more cases involving operations like SUBREG_TO_REG which might need to
be rematerialized using sub-register indices.

For example, code like:
    v1(GPR64):sub_32 = MOVZ something
    v2(GPR64) = COPY v1(GPR64)
should be convertable to:
    v2(GPR64):sub_32 = MOVZ something

but previously we just gave up in places like this

llvm-svn: 182872
2013-05-29 19:32:06 +00:00
Adrian Prantl
b6dada0e6e Simplify logic by using the appropriate functions.
llvm-svn: 182869
2013-05-29 17:33:31 +00:00
Manman Ren
7ef1e78101 LTO+Debug Info: revert r182791.
Since the testing case uses ref_addr, which requires version 3+ to work,
we will solve the dwarf version issue first.

This patch also causes failures in one of the bots. I will update the patch
accordingly in my next attempt.

rdar://13926659

llvm-svn: 182867
2013-05-29 17:16:59 +00:00
JF Bastien
1b5e07e947 Tidy some register classes for ARM and Thumb
Tidy up three places where the register class for ARM and Thumb wasn't
restrictive enough:
 - No PC dest for reg-reg add/orr/sub.
 - No PC dest for shifts.
 - No PC or SP for Thumb2 reg-imm add.

I encountered this while combining FastISel with
-verify-machineinstrs. These instructions defined registers whose
classes weren't restrictive enough, and the uses failed
verification. They're also undefined in the ISA, or would produce code
that FastISel wouldn't want. This doesn't fix the register class
narrowing issue (where uses should restrict definitions), and isn't
thorough, but it's a small step in the right direction.

llvm-svn: 182863
2013-05-29 15:45:47 +00:00
NAKAMURA Takumi
6eb30bda4d SparcFrameLowering.cpp: Mark verifyLeafProcRegUse() as UNUSED. [-Wunused-function]
llvm-svn: 182850
2013-05-29 12:10:42 +00:00
Richard Sandiford
b70371b744 [SystemZ] Two tests missing from previous commit
llvm-svn: 182847
2013-05-29 11:59:26 +00:00
Richard Sandiford
b62e20c071 [SystemZ] Immediate compare-and-branch support
This patch adds support for the CIJ and CGIJ instructions.

llvm-svn: 182846
2013-05-29 11:58:52 +00:00
Benjamin Kramer
c544c1401e Move test that depends on the X86 backend into the right subdirectory.
llvm-svn: 182834
2013-05-29 08:40:49 +00:00
Patrik Hagglund
5402d55791 Temporary fix to get rid of gcc warning.
llvm-svn: 182832
2013-05-29 07:32:08 +00:00
Evgeniy Stepanov
2371db6322 Allow overriding the location of C/C++ compilers in Android CMake build.
Patch by Greg Fitzgerald.

llvm-svn: 182831
2013-05-29 07:23:20 +00:00
Venkatraman Govindaraju
cb40ce1f29 [Sparc] Add support for leaf functions in sparc backend.
llvm-svn: 182822
2013-05-29 04:46:31 +00:00
NAKAMURA Takumi
0271817249 LoopVectorize.cpp: Fix abuse of StringRef on Twine. Twine captures the pointer of StringRef.
llvm-svn: 182820
2013-05-29 03:13:47 +00:00
NAKAMURA Takumi
4514caf74f Whitespace.
llvm-svn: 182819
2013-05-29 03:13:41 +00:00
David Blaikie
d72977d2e7 Debug Info: Update documentation to match recent (& not so recent) schema changes
This updates the debug info metadata schema documentation for various
schema changes made recently surrounding filename information for
scopes and the representation of imported entities.

llvm-svn: 182817
2013-05-29 02:05:13 +00:00
David Blaikie
9f5c0b787b Debug Info: Reorder accessor to match field order.
llvm-svn: 182816
2013-05-29 02:05:07 +00:00
Jack Carter
81964ccca4 Mips assembler: Improve set register alias handling
This patch solves the problem of numeric register values not being accepted:

../set_alias.s:1:11: error: expected valid expression after comma
        .set    r4,$4
                    ^
The parsing of .set directive is changed and handling of symbols in code 
as well to enable this feature. 

The test example is added.

Patch by Vladimir Medic

llvm-svn: 182807
2013-05-28 22:21:05 +00:00
Tim Northover
78a82b8589 AArch64: clarify -help message
llvm-svn: 182804
2013-05-28 21:09:39 +00:00
Simon Atanasyan
dd2b2c12e5 [Mips] Add Mips specific dynamic table entry tags.
llvm-svn: 182803
2013-05-28 20:48:56 +00:00
Paul Redmond
0eb4837b24 Add support for llvm.vectorizer metadata
- llvm.loop.parallel metadata has been renamed to llvm.loop to be more generic
  by making the root of additional loop metadata.
  - Loop::isAnnotatedParallel now looks for llvm.loop and associated
    llvm.mem.parallel_loop_access
  - document llvm.loop and update llvm.mem.parallel_loop_access
- add support for llvm.vectorizer.width and llvm.vectorizer.unroll
  - document llvm.vectorizer.* metadata
  - add utility class LoopVectorizerHints for getting/setting loop metadata
  - use llvm.vectorizer.width=1 to indicate already vectorized instead of
    already_vectorized
- update existing tests that used llvm.loop.parallel and
  llvm.vectorizer.already_vectorized

Reviewed by: Nadav Rotem

llvm-svn: 182802
2013-05-28 20:00:34 +00:00
Michael Gottesman
2a51955f08 [APInt] Implement tcDecrement as a counterpart to tcIncrement. This is for use in APFloat IEEE-754R 2008 nextUp/nextDown function.
rdar://13852078

llvm-svn: 182801
2013-05-28 19:50:20 +00:00
Tim Northover
a73f012df4 ARM: use pristine object file while processing relocations
Previously we would read-modify-write the target bits when processing
relocations for the MCJIT. This had the problem that when relocations
were processed multiple times for the same object file (as they can
be), the result is not idempotent and the values became corrupted.

The solution to this is to take any bits used in the destination from
the pristine object file as LLVM emitted it.

This should fix PR16013 and remote MCJIT on ARM ELF targets.

llvm-svn: 182800
2013-05-28 19:48:19 +00:00
Manman Ren
f51e67e9a2 LTO+Debug Info: correctly emit inlined_subroutine when the inlined callee is
from a different CU.

We used to print out an error message and fail to generate inlined_subroutine.

If we use ref_addr in the generated DWARF, the DWARF version should be 3 or
above.
rdar://13926659

llvm-svn: 182791
2013-05-28 19:01:58 +00:00
Jyotsna Verma
7186c9ae73 Hexagon: Typo fix.
llvm-svn: 182790
2013-05-28 19:01:45 +00:00
Chad Rosier
40d29a8a9d Remove the MCRegAliasIterator tables and compute the aliases dynamically.
The size reduction in the RegDiffLists are rather dramatic.  Here are a few
size differences for MCTargetDesc.o files (before and after) in bytes:
R600 - 36160B - 11184B - 69% reduction
ARM - 28480B - 8368B - 71% reduction
Mips - 816B - 576B - 29% reduction

One side effect of dynamically computing the aliases is that the iterator does
not guarantee that the entries are ordered or that duplicates have been removed.
The documentation implies this is a safe assumption and I found no clients that
requires these attributes (i.e., strict ordering and uniqueness).

My local LNT tester results showed no execution-time failures or significant
compile-time regressions (i.e., beyond what I would consider noise) for -O0g,
-O2 and -O3 runs on x86_64 and i386 configurations.
rdar://12906217

llvm-svn: 182783
2013-05-28 18:08:48 +00:00
Benjamin Kramer
b58618a1e9 Simplify code. No functionality change.
llvm-svn: 182779
2013-05-28 16:39:36 +00:00
Benjamin Kramer
5d949d03e9 Remove double semicolons.
llvm-svn: 182778
2013-05-28 16:31:26 +00:00
James Molloy
5ba1094838 Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer.
Extend LinkModules to pass a ValueMaterializer to RemapInstruction and friends to lazily create Functions for lazily linked globals. This is a big win when linking small modules with large (mostly unused) library modules.

llvm-svn: 182776
2013-05-28 15:17:05 +00:00
Evgeniy Stepanov
6a8093b320 [msan] Fix argument shadow alignment.
llvm-svn: 182771
2013-05-28 13:07:43 +00:00
Renato Golin
3dec360d28 Typo
llvm-svn: 182766
2013-05-28 11:28:37 +00:00
Richard Sandiford
4b6cfd7cec [SystemZ] Register compare-and-branch support
This patch adds support for the CRJ and CGRJ instructions.  Support for
the immediate forms will be a separate patch.

The architecture has a large number of comparison instructions.  I think
it's generally better to concentrate on using the "best" comparison
instruction first and foremost, then only use something like CRJ if
CR really was the natual choice of comparison instruction.  The patch
therefore opportunistically converts separate CR and BRC instructions
into a single CRJ while emitting instructions in ISelLowering.

llvm-svn: 182764
2013-05-28 10:41:11 +00:00
Renato Golin
efa59a9588 Linking ReleaseProcess doc with the world
llvm-svn: 182763
2013-05-28 10:32:55 +00:00
Richard Sandiford
3b643954e8 [SystemZ] Tweak SystemZInstrInfo::isBranch() interface
This is needed for the upcoming compare-and-branch patch.  No functional
change intended.

llvm-svn: 182762
2013-05-28 10:13:54 +00:00
Alexey Samsonov
bf54199f68 Revert r182715 and r182758
llvm-svn: 182761
2013-05-28 10:08:08 +00:00
Renato Golin
88cda6435f Adding ReleaseProcess doc
llvm-svn: 182759
2013-05-28 09:48:52 +00:00
Alexey Samsonov
6dea9bd10d Fixup for r182715: provide correct arg to --gtest-filter
llvm-svn: 182758
2013-05-28 09:40:42 +00:00
Michael Kuperstein
ad5bd9ce5a Make BasicAliasAnalysis recognize the fact a noalias argument cannot alias another argument, even if the other argument is not itself marked noalias.
llvm-svn: 182755
2013-05-28 08:17:48 +00:00
Rafael Espindola
0838ba10ee Make it explicit that GlobalAlias are ok in llvm.used.
No functionality change.

llvm-svn: 182747
2013-05-27 22:47:09 +00:00
Rafael Espindola
18790cef3b Make helper functions static.
And remove header and cpp file that are empty after that.

llvm-svn: 182746
2013-05-27 22:34:59 +00:00
Preston Gurd
8be7e42cc2 Convert sqrt functions into sqrt instructions when -ffast-math is in effect.
When -ffast-math is in effect (on Linux, at least), clang defines
__FINITE_MATH_ONLY__ > 0 when including <math.h>. This causes the
preprocessor to include <bits/math-finite.h>, which renames the sqrt functions.
For instance, "sqrt" is renamed as "__sqrt_finite". 

This patch adds the 3 new names in such a way that they will be treated
as equivalent to their respective original names.

llvm-svn: 182739
2013-05-27 15:44:35 +00:00
Rafael Espindola
bf27725489 Add a cpu to try to bring back the atom bots.
llvm-svn: 182734
2013-05-27 13:22:52 +00:00
Hal Finkel
c0a7984c5b PPC: Add a isConsecutiveLS utility function
isConsecutiveLS is a slightly more general form of
SelectionDAG::isConsecutiveLoad. Aside from also handling stores, it also does
not assume equality of the chain operands is necessary. In the case of the PPC
backend, this chain condition is checked in a more general way by the
surrounding code.

Mostly, this part of the refactoring in preparation for supporting optimized
unaligned stores.

llvm-svn: 182723
2013-05-27 02:06:39 +00:00
NAKAMURA Takumi
f9fd8805ba llvm-objdump.cpp: Appease MSC16 x64. utostr(n++) causes internal compiler error.
llvm-svn: 182722
2013-05-27 00:02:48 +00:00
Hal Finkel
1f5ee2fefe Prefer to duplicate PPC Altivec loads when expanding unaligned loads
When expanding unaligned Altivec loads, we use the decremented offset trick to
prevent page faults. Unfortunately, if we have a sequence of consecutive
unaligned loads, this leads to suboptimal code generation because the 'extra'
load from the first unaligned load can be combined with the base load from the
second (but only if the decremented offset trick is not used for the first).
Search up and down the chain, through loads and token factors, looking for
consecutive loads, and if one is found, don't use the offset reduction trick.
These duplicate loads are later combined to yield the desired sequence (in the
future, we might want a more-powerful chain search, but that will require some
changes to allow the combiner routines to access the AA object).

This should complete the initial implementation of the optimized unaligned
Altivec load expansion. There is some refactoring that should be done, but
that will happen when the unaligned store expansion is added.

llvm-svn: 182719
2013-05-26 18:08:30 +00:00
Kai Nacke
2a7d5edd65 Add LDC compiler to list of external OS projects using LLVM 3.3
llvm-svn: 182718
2013-05-26 17:37:43 +00:00
Andrew Trick
c92ce8a4f2 Fix PR16143: Insert DEBUG_VALUE before terminator.
llvm-svn: 182717
2013-05-26 08:58:50 +00:00
Galina Kistanova
ff1dc4afcc Fixed bug when tests in executable partially used absolute paths.
llvm-svn: 182715
2013-05-26 03:58:41 +00:00
Chris Lattner
65e3f520d4 Disable the StringMapEntry copy constructor, to make sure we
reject things like: "for (auto Entry : SomeStringMap)".  Previously
this would copy the value but not the tail allocated string data
(the key).

llvm-svn: 182713
2013-05-25 22:28:22 +00:00
Cameron Zwarich
fe498a1e92 Add support for DWARF line number table entries for values in the instruction
stream.

llvm-svn: 182712
2013-05-25 21:56:53 +00:00
Eric Christopher
d9794c735b Add some comments to the stringify function.
llvm-svn: 182710
2013-05-25 05:13:17 +00:00