1
0
mirror of https://github.com/RPCS3/llvm.git synced 2024-12-17 17:06:59 +00:00
Commit Graph

120323 Commits

Author SHA1 Message Date
Frederic Riss
7a4257861d [dsymutil] Implement support for handling mach-o universal binaries as main input/output.
The DWARF linker isn't touched by this, the implementation links
individual files and merges them together into a fat binary by
calling out to the 'lipo' utility.

The main change is that the MachODebugMapParser can now return
multiple debug maps for a single binary.

The test just verifies that lipo would be invoked correctly, but
doesn't actually generate a binary. This mimics the way clang
tests its external iplatform tools integration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244087 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:27:44 +00:00
Frederic Riss
d2fb7bd3d5 [dsymutil] Introduce exit helper. NFC.
llvm-dsymutil will start creating temporary files in a followup
commit. To ease the correct cleanup of this files, introduce a
helper called to exit dsymutil.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244086 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:27:38 +00:00
Frederic Riss
cca89d34ba [dsymutil] Split some logic into a helper function. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244085 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:27:34 +00:00
Kostya Serebryany
d2f9ac2486 [libFuzzer] use data-flow feedback from strcmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244084 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:23:01 +00:00
Alex Lorenz
0f3be315d6 MIR Parser: Report an error when parsing duplicate register flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244081 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:09:03 +00:00
Chandler Carruth
da49414c4b [TTI] Make the cost APIs in TargetTransformInfo consistently use 'int'
rather than 'unsigned' for their costs.

For something like costs in particular there is a natural "negative"
value, that of savings or saved cost. As a consequence, there is a lot
of code that subtracts or creates negative values based on cost, all of
which is prone to awkwardness or bugs when dealing with an unsigned
type. Similarly, we *never* want these values to wrap, as that would
cause Very Bad code generation (likely percieved as an infinite loop as
we try to emit over 2^32 instructions or some such insanity).

All around 'int' seems a much better fit for these basic metrics. I've
added asserts to ensure that at least the TTI interface never returns
negative numbers here. If we ever have a use case for negative numbers,
we can remove this, but this way a bug where someone used '-1' to
produce a 'very large' cost will be caught by the assert.

This passes all tests, and is also UBSan clean.

No functional change intended.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244080 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:08:10 +00:00
Chandler Carruth
bdf5dc7056 [GMR] Teach the conservative path of GMR to catch even more easy cases.
In PR24288 it was pointed out that the easy case of a non-escaping
global and something that *obviously* required an escape sometimes is
hidden behind PHIs (or selects in theory). Because we have this binary
test, we can easily just check that all possible input values satisfy
the requirement. This is done with a (very small) recursion through PHIs
and selects. With this, the specific example from the PR is correctly
folded by GVN.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244078 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 17:58:30 +00:00
Alex Lorenz
e40350d020 MIR Serialization: Serialize the 'early-clobber' register operand flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244075 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 17:49:03 +00:00
Pete Cooper
baa8ef1276 Move BB succ_iterator to be inside TerminatorInst. NFC.
To get the successors of a BB we currently do successors(BB) which
ultimately walks the successors of the BB's terminator.

This moves the iterator to TerminatorInst as thats what we're actually
using to do the iteration, and adds a member function to TerminatorInst
to allow us to iterate directly over successors given an instruction.

For example, we can now do

  for (auto *Succ : BI->successors())

instead of

  for (unsigned i = 0, e = BI->getNumSuccessors(); i != e; ++i)

Reviewed by Tobias Grosser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244074 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 17:43:01 +00:00
Alex Lorenz
13fa799e5f MIR Serialization: Serialize the 'debug-use' register operand flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244071 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 17:41:17 +00:00
Alex Lorenz
1613aa08d6 MIR Parser: Simplify the handling of quoted tokens. NFC.
The machine instructions lexer should not expose the difference between quoted
and unquoted tokens to the parser.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244068 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 17:35:55 +00:00
Chad Rosier
8e1615ce40 [AArch64] Register AArch64DeadRegisterDefinition pass with LLVM pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244067 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 17:35:34 +00:00
James Y Knight
7ce592543d [Sparc] Fix disassembly of popc instruction.
And add tests.

Patch by David Wiberg!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244064 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 17:00:30 +00:00
Matt Arsenault
e601cbe15d AMDGPU/SI: Remove EXECReg
For the same reasons as the other physical registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244062 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 16:42:57 +00:00
Matt Arsenault
de67abf186 AMDGPU: Remove SCCReg.
These should be handled as a physical register rather
than a virtual register class with one member.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244061 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 16:42:54 +00:00
Chad Rosier
22c5f2a36e [AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244060 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 16:12:10 +00:00
Steven Wu
6277e1f662 Force the MachO generated for Darwin to have VERSION_MIN load command
On Darwin, it is required to stamp the object file with VERSION_MIN load
command. This commit will provide a VERSRION_MIN load command to the
MachO file that doesn't specify the version itself by inferring from
Target Triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244059 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 15:36:38 +00:00
Hans Wennborg
9ef4c12777 test-release.sh: Fix naming of OpenMP runtime tarball
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244058 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 15:36:07 +00:00
Chad Rosier
f9bc05ce57 [AArch64] Make the naming of the Address Type Promotion pass consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244057 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 15:32:23 +00:00
Chad Rosier
085e440316 [AArch64] Register (existing) AArch64AdvSIMDScalar pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

IIRC, this pass is off by default, but it's still helpful when debugging.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244056 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 15:18:58 +00:00
Sanjay Patel
3e95f49778 revert r243687: enable fast-math-flag propagation to DAG nodes
We can't propagate FMF partially without breaking DAG-level CSE. We either need to
relax CSE to account for mismatched FMF as a temporary work-around or fully propagate
FMF throughout the DAG.

Surprisingly, there are no existing regression tests for this, but here's an example:

  define float @fmf(float %a, float %b) {
    %mul1 = fmul fast float %a, %b
    %nega = fsub fast float 0.0, %a
    %mul2 = fmul fast float %nega, %b
    %abx2 = fsub fast float %mul1, %mul2
    ret float %abx2
  }


$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=0
...
    vmulss    %xmm1, %xmm0, %xmm0
    vaddss    %xmm0, %xmm0, %xmm0
    retq

$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=1
...
    vmulss    %xmm1, %xmm0, %xmm2
    vfmadd213ss    %xmm2, %xmm1, %xmm0  <--- failed to recognize that (a * b) was already calculated
    retq



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244053 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 15:12:03 +00:00
Chad Rosier
7e16546ad8 Make this less error prone by using a #define. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244048 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 14:48:44 +00:00
Chad Rosier
1778d2b6ac [AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244046 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 14:22:53 +00:00
Benjamin Kramer
1ef7132e82 [AA] Use CallSite cast idiom. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244045 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 14:16:44 +00:00
Benjamin Kramer
37545e0b0b [YAMLTraits] Use StringRef::copy. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244044 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 14:16:38 +00:00
Benjamin Kramer
1678794d10 [IR] Simplify code with ArrayRef::copy. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244043 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 14:16:28 +00:00
Chad Rosier
b8d7701cce [AArch64] Register (existing) AArch64LoadStoreOpt pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.

This is the AArch64 version of r243052.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244041 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 13:44:51 +00:00
Chad Rosier
9934920086 Update comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244038 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 12:40:13 +00:00
Rafael Espindola
f1595fb549 Drop unnecessary static_cast.
ELFT::TargetEndianness already has the correct type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244032 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 11:53:59 +00:00
Artyom Skrobov
7cadb8f32b ARMISelDAGToDAG.cpp had this self-contradictory code:
return StringSwitch<int>(Flags)
          .Case("g", 0x1)
          .Case("nzcvq", 0x2)
          .Case("nzcvqg", 0x3)
          .Default(-1);
...

  // The _g and _nzcvqg versions are only valid if the DSP extension is
  // available.
  if (!Subtarget->hasThumb2DSP() && (Mask & 0x2))
    return -1;

ARMARM confirms that the comment is right, and the code was wrong.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244029 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 11:02:14 +00:00
Benjamin Kramer
e0fdface49 [ArrayRefTest] Work around a GCC 4.8 internal compiler error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244023 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 09:39:41 +00:00
Simon Pilgrim
d819a2ced7 [InstCombine] Added more specific SSE2/AVX2 vector shift tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244022 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 08:21:38 +00:00
Simon Pilgrim
0ba30b8745 Fixed line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244021 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 08:18:00 +00:00
Hal Finkel
7b3dad09cd [MachineCombiner] Don't use the opcode-only form of computeInstrLatency
In r242277, I updated the MachineCombiner to work with itineraries, but I
missed a call that is scheduling-model-only (the opcode-only form of
computeInstrLatency). Using the form that takes an MI* allows this to work with
itineraries (and should be NFC for subtargets with scheduling models).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244020 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 07:45:28 +00:00
Davide Italiano
281c1b093e [llvm-objdump] Call exit(1) on error, i.e. fail early.
Previously we kept going on partly corrupted input, which might result
in garbage being printed, or even worse, random crashes.
Rafael mentioned that this is the GNU behavior as well, but after some
discussion we both agreed it's probably better to emit a reasonable
error message and exit. As a side-effect of this commit, now we don't
rely on global state for error codes anymore. objdump was the last tool
in the toolchain which needed to be converted. Hopefully the old behavior
won't sneak into the tree again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244019 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 07:18:31 +00:00
NAKAMURA Takumi
bf1c3155a4 unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.
For example of mingw-w64-g++-4.8.1,

  llvm/unittests/ADT/ArrayRefTest.cpp: In member function 'virtual void {anonymous}::ArrayRefTest_AllocatorCopy_Test::TestBody()':
  llvm/unittests/ADT/ArrayRefTest.cpp:56:40: internal compiler error: in count_type_elements, at expr.c:5523
     } Array3Src[] = {{"hello"}, {"world"}};
                                          ^
  Please submit a full bug report,
  with preprocessed source if appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244017 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 06:11:23 +00:00
NAKAMURA Takumi
68765af149 Windows/COM.inc: Fix emacs mode in the first line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244016 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 06:11:08 +00:00
Eric Christopher
5aed14945c Temporarily revert r244012 while we see if it's really necessary.
Add a comment explaining the current theory as to why we'd need
the -lole32 on the link line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244015 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 05:32:22 +00:00
Eric Christopher
6624be6911 Remove autoconf checks for sigsetjmp and siglongjmp as they appear to
be unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244014 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 04:50:46 +00:00
Eric Christopher
5420525438 Remove the apparently unused rand48 configure checks and associated m4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244013 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 04:50:43 +00:00
Eric Christopher
0443765649 Remove obsolete configure check for libole32 as we don't appear to use
it anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244012 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 04:50:40 +00:00
Eric Christopher
54e7362f18 Remove the unused header check for utime.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244011 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 04:50:37 +00:00
Tanya Lattner
377a98477d Rename all references to old mailing lists to new lists.llvm.org address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243999 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 03:51:17 +00:00
Yaron Keren
a639e155a2 Avoid passing nullptr to std::equal.
As documented in the LLVM Coding Standards, indeed MSVC incorrectly asserts 
on this in Debug mode. This happens when building clang with Visual C++ and
-triple i686-pc-windows-gnu on these clang regression tests:

 clang/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c
 clang/test/CodeGen/empty-union-init.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243996 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-04 15:57:04 +00:00
Benjamin Kramer
0d2030d07e [ArrayRef] Make copy use std::uninitialized_copy.
std::copy does not work for non-trivially copyable classes when we're
copying into uninitialized memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243995 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-04 15:52:56 +00:00
Sanjay Patel
f360983642 wrap OptSize and MinSize attributes for easier and consistent access (NFCI)
Create wrapper methods in the Function class for the OptimizeForSize and MinSize
attributes. We want to hide the logic of "or'ing" them together when optimizing
just for size (-Os).

Currently, we are not consistent about this and rely on a front-end to always set
OptimizeForSize (-Os) if MinSize (-Oz) is on. Thus, there are 18 FIXME changes here
that should be added as follow-on patches with regression tests.

This patch is NFC-intended: it just replaces existing direct accesses of the attributes
by the equivalent wrapper call.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243994 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-04 15:49:57 +00:00
Hal Finkel
2cbb48f2e3 [RuntimeDyld] Adapt PPC64 relocations to PPC32
Begin adapting some of the implemented PPC64 relocations for PPC32 (with a
test case).

Patch by Pierre-Andre Saulais!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243991 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-04 15:29:00 +00:00
Sanjay Patel
91add497c6 [x86] machine combiner reassociation: mark EFLAGS operand as 'dead'
In the commentary for D11660, I wasn't sure if it was alright to create new
integer machine instructions without also creating the implicit EFLAGS operand. 
From what I can see, the implicit operand is always created by the MachineInstrBuilder
based on the instruction type, so we don't have to do that explicitly. However, in
reviewing the debug output, I noticed that the operand was not marked as 'dead'. 
The machine combiner should do that to preserve future optimization opportunities 
that may be checking for that dead EFLAGS operand themselves.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243990 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-04 15:21:56 +00:00
Vasileios Kalintiris
ec5601a7f6 [mips][FastISel] Disable code generation for unsupported targets through FastISel.
Summary:
Previously, we would check whether the target is supported or not, only in
fastSelectInstruction(). This means that 64-bit targets could use FastISel too.
We fix this by checking every overridden method of the FastISel class and
by falling back to SelectionDAG if the target isn't supported. This change
should have been committed along with r243638, but somehow I missed it.

Reviewers: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243986 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-04 14:35:50 +00:00
Vasileios Kalintiris
edcaae782e Revert r229675 - [mips] Avoid redundant sign extension of the result of binary bitwise instructions.
It introduced two regressions on 64-bit big-endian targets running under N32
(MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4, and
MultiSource/Applications/kimwitu++/kc) The issue is that on 64-bit targets
comparisons such as BEQ compare the whole GPR64 but incorrectly tell the
instruction selector that they operate on GPR32's. This leads to the
elimination of i32->i64 extensions that are actually required by
comparisons to work correctly.

There's currently a patch under review that fixes this problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243984 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-04 14:26:35 +00:00