Commit Graph

120346 Commits

Author SHA1 Message Date
David Blaikie
e9d6ca111d Drop the defaulted CallGraph move ctor, since it's unused and MSVC doesn't support defaulted move ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244135 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 21:16:46 +00:00
Nick Lewycky
3987976693 Replace &vector[0] with vector.data() to avoid invalid dereference caught by debug STL. Also move a '*' for consistency and fix an 80-col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244134 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 21:16:02 +00:00
David Blaikie
cea26c272b -Wdeprecated: Remove some dead code that was relying on a questionable (rule-of-3-violating) copy ctor in MCInstPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244133 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 21:15:48 +00:00
Chen Li
452b1451b3 [LoopUnswitch] Preserve make.implicit metadata for unswitched conditions
Summary: This patch adds support to preserve make.implicit metadata for unswitched conditions in loop pre-header.

Reviewers: sanjoy, weimingz

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244132 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 21:13:26 +00:00
Krzysztof Parzyszek
a588f3f3d1 [Hexagon] Edit a comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244130 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 21:08:26 +00:00
David Blaikie
0caff999ff -Wdeprecated clean by making LogBuilder move constructible so it can be returned by value (in DifferenceEngine::logf)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244129 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 21:06:50 +00:00
JF Bastien
8cfa23f93a x86 atomic: optimize a.store(reg op a.load(acquire), release)
Summary: PR24191 finds that the expected memory-register operations aren't generated when relaxed { load ; modify ; store } is used. This is similar to PR17281 which was addressed in D4796, but only for memory-immediate operations (and for memory orderings up to acquire and release). This patch also handles some floating-point operations.

Reviewers: reames, kcc, dvyukov, nadav, morisset, chandlerc, t.p.northover, pete

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244128 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 21:04:59 +00:00
Chandler Carruth
bd4b424c12 [PM] Remove a failed attempt to port the CallGraph analysis to the new
pass manager.

This never worked, and won't ever work. It was actually why I ended up
building the LazyCallGraph set of code which is more more effectively
wired up to the new pass manager. This accidentally got committed when
I was trying to land a cleanup of the code organization in the other
parts of this file. =[ My bad, but fortunately Dave was keen eyed enough
to spot that this code couldn't possibly work. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244127 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 21:04:31 +00:00
Pete Cooper
a1cdcbb384 Update GettingStarted docs list of LLVM_TARGETS_TO_BUILD to match cmake.
Since the docs were written, we've added the BPF backend to the list.
Updating the docs to take this in to account.  Also sorted them to
match cmake while I was changing these lines.

Reviewed by Chris B.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244123 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 20:55:53 +00:00
David Blaikie
75e2b5ab1a -Wdeprecated cleanup: Make CallGraph movable by default by using unique_ptr members rather than raw pointers.
The only place that tries to return a CallGraph by value
(CallGraphAnalysis::run) doesn't seem to be used right now, but it's a
reasonable bit of cleanup anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244122 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 20:55:50 +00:00
JF Bastien
3e8a65d346 Revert "Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk."
I mistakenly committed the patch for D6629, and was trying to commit another. Reverting until it gets proper signoff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244121 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 20:53:56 +00:00
JF Bastien
a41cc3c3b8 Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244120 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 20:49:46 +00:00
David Blaikie
deae476f2c -Wdeprecated-clean: Remove uses of throw() in favor of noexcept
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244115 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 20:38:57 +00:00
Cong Hou
f7e51b209e NFC.
Convert comments in MachineBasicBlock.h into new style.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 20:30:11 +00:00
David Blaikie
3252585770 -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
LoadedObjectInfo was depending on the implicit copy ctor in the presence
of a user-declared dtor. Default (and protect) it in the base class and
make the devired classes final to avoid any risk of a public API that
would enable slicing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244112 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 20:20:29 +00:00
Richard Diamond
50f5c7d1cd Revert "Fix llvm-config to emit the linker flag for the combined shared object built by autoconfig/make instead of the individual components."
It seems I was wrong thinking `autoconf`/`make` only installed shared libraries if configured with `--enable-shared`, even if `--disable-static` is present. I'll re-address with a followup patch.

This reverts commit r243297 for causing PR#24154.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244108 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 20:03:26 +00:00
Richard Diamond
8e501923ae Write access test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244103 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 19:40:39 +00:00
Alex Lorenz
97214282e0 MIR Parser: Report an error when parsing large immediate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244100 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 19:03:42 +00:00
Alex Lorenz
c2b7a3917e MIR Serialization: Serialize the typed immediate integer machine operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244098 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:52:21 +00:00
Chandler Carruth
8a88fc9a2b [Unroll] Switch to using 'int' cost types in preparation for a somewhat
more involved change to the cost computation pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244095 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:46:21 +00:00
Frederic Riss
edcd9600c0 [dsymutil] Fix test patterns.
Depending on the filesystem paths, the YAML dump might quote paths.
Account for that in the regex patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244094 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:45:13 +00:00
Alex Lorenz
bed9b2f749 MIR Parser: Extract the IR constant parsing code into a new method. NFC.
This commit extracts the code that parses the IR constant values into a new
method named 'parseIRConstant' in the 'MIParser' class. The new method will
be reused by the code that parses the typed integer immediate machine operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244093 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:44:00 +00:00
Krzysztof Parzyszek
cebdc2689e [Hexagon] Implement TargetTransformInfo for Hexagon
Author: Brendon Cahoon <bcahoon@codeaurora.org>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244089 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 18:35:37 +00:00
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