Commit Graph

100768 Commits

Author SHA1 Message Date
Richard Sandiford 28c111ec8a [SystemZ] Use "for (auto" a bit
Just the simple cases for now.  There were a few knock-on changes of
MachineBasicBlock *s to MachineBasicBlock &s.  No functional change intended.

llvm-svn: 203105
2014-03-06 11:00:15 +00:00
Richard Sandiford c231269ff9 [SystemZ] Update namespace formatting to match current guidelines
No functional change intended.

llvm-svn: 203103
2014-03-06 10:38:30 +00:00
Elena Demikhovsky f7c1b16591 AVX-512: Added rrk, rrkz, rmk, rmkz, rmbk, rmbkz versions of AVX512 FP packed instructions, added encoding tests for them.
By Robert Khazanov.

llvm-svn: 203098
2014-03-06 08:45:30 +00:00
Elena Demikhovsky 8fae565f08 AVX-512: fixed comressed displacement - by Robert Khazanov
llvm-svn: 203096
2014-03-06 08:15:35 +00:00
Yaron Keren cf96c257f4 Cleaning up two more pre-Visual C++ 2012 build hacks.
llvm-svn: 203093
2014-03-06 08:05:43 +00:00
Ahmed Charles de14dcc24f Fix warnings about an variable only used in asserts.
llvm-svn: 203089
2014-03-06 06:35:46 +00:00
Ahmed Charles f6863f1aab Add <cstddef> for use of std::ptrdiff_t.
llvm-svn: 203086
2014-03-06 06:13:54 +00:00
Ahmed Charles 0a685a9a52 Fix break by qualifying ptrdiff_t with std::.
llvm-svn: 203084
2014-03-06 06:05:26 +00:00
Ahmed Charles 56440fd820 Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083
2014-03-06 05:51:42 +00:00
David Blaikie 47c254beb7 DebugInfo: Tag units as having been indexed in GNU pubnames by using a DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections
This is consistent with GDB ToT and reduces the number of relocations in
(type and compile) units, substantially reducing relocations and debug
size in fission + type units builds.

llvm-svn: 203082
2014-03-06 05:47:39 +00:00
Karthik Bhat daa8cd10d9 Allow constant folding of copysign
llvm-svn: 203076
2014-03-06 05:32:52 +00:00
Chandler Carruth 3c57aa4111 [Modules] Fix a layering issue that is actually impacting the modules
selfhost.

The 'Core.h' C-API header is part of the IR LLVM library. (One might
even argue it should be called IR.h, but that's a separate point.) We
can't include it into a Support header without violating the layering,
and in a way that breaks modules. MemoryBuffer's opaque C type was being
defined in the Core.h C-API header despite being in the Support library,
and thus we ended up with this weird issue.

It turns out that there were other constructs from the Support library
in the Core.h header. This patch lifts all of them into Support.h and
then includes that into Core.h.

The only possible fallout is if someone was including Support.h and
relying on Core.h to be visible for their own uses. Considering the
narrow interface actually provided by the C-API for the Support library,
this seems a very, very unlikely mistake.

llvm-svn: 203071
2014-03-06 04:13:12 +00:00
Chandler Carruth d1163aa59e [Layering] Move GVMaterializer.h into the IR library where its
implementation already lived.

After this commit, the only IR-library headers in include/llvm/* are
ones related to the legacy pass infrastructure that I'm planning to
leave there until the new one is farther along.

The only other headers at the top level are linking and initialization
aids that aren't really libraries but just headers.

llvm-svn: 203069
2014-03-06 03:50:29 +00:00
Chandler Carruth 8a71625ad1 [cleanup] Re-sort the standard library include lines.
llvm-svn: 203066
2014-03-06 03:43:04 +00:00
Chandler Carruth 6cc07df4ec [Layering] Sink Linker.h into a Linker subdirectory to make it
consistent with every other sub-library header in LLVM.

llvm-svn: 203065
2014-03-06 03:42:23 +00:00
Chandler Carruth 7da14f1ab9 [Layering] Move InstVisitor.h into the IR library as it is pretty
obviously coupled to the IR.

llvm-svn: 203064
2014-03-06 03:23:41 +00:00
Owen Anderson bc46f3c15d Change the tag on this iterator to bidir and implement enough operators to make it true.
It ought to be possible to make this truly random access if anyone cares enough.

llvm-svn: 203060
2014-03-06 02:02:43 +00:00
Owen Anderson cab4afd7c6 Fix issues in the NamedMDNode operand iterator, including those pointed out by
Chandler in review.

llvm-svn: 203058
2014-03-06 01:51:01 +00:00
David Blaikie c3d9e9e55f DebugInfo: Shrink pubnames/pubtypes in the presence of type units by only emitting pub sections for compile units
llvm-svn: 203057
2014-03-06 01:42:00 +00:00
Eric Christopher 6bb07f6024 Add some helpful comments on DIEValue types that we expect to hash.
llvm-svn: 203055
2014-03-06 01:32:56 +00:00
Hal Finkel 6daf2aa140 The PPC global base register cannot be r0
The global base register cannot be r0 because it might end up as the first
argument to addi or addis. Fixes PR18316.

I don't have a small stable test case.

llvm-svn: 203054
2014-03-06 01:28:23 +00:00
Owen Anderson 9a6f50f61c Add a iterator and interator_range interface to the operands of a NamedMDNode.
The iterator is a little complex because we don't want to expose the implementation
details (TrackingVH) of the operand vector to clients.

llvm-svn: 203053
2014-03-06 01:12:56 +00:00
Chandler Carruth 9a4c9e597b [Layering] Move DebugInfo.h into the IR library where its implementation
already lives.

llvm-svn: 203046
2014-03-06 00:46:21 +00:00
Hal Finkel 7f908e8ef4 Fixup PPC Darwin i1 argument handling
Like on other targets, we need to zero_extend/truncate i1 args before copying
them to GPRs.

llvm-svn: 203045
2014-03-06 00:45:19 +00:00
Eric Christopher 193084979f Rewrite the attribute hashing algorithm to use the type of the value
pointed to by the attribute, rather than the form as a first
step to determining how to hash the values. No functional change
intended.

llvm-svn: 203044
2014-03-06 00:38:32 +00:00
Hal Finkel 2a9d318e4a When using CR bit registers on PPC32, handle the i1 vaarg case
When copying an i1 value into a GPR for a vaarg call, we need to explicitly
zero-extend the i1 value (otherwise an invalid CRBIT -> GPR copy will be
generated).

llvm-svn: 203041
2014-03-06 00:23:33 +00:00
Chandler Carruth 12664a0b17 [Layering] Move DIBuilder.h into the IR library where its implementation
already lives.

llvm-svn: 203038
2014-03-06 00:22:06 +00:00
Raul E. Silvera b741b945c5 Change math intrinsic attributes from readonly to readnone. These
are operations that do not access memory but may be sensitive
to floating-point environment changes. LLVM does not attempt
to model FP environment changes, so this was unnecessarily conservative
and was getting on the way of some optimizations, in particular
SLP vectorization.

llvm-svn: 203037
2014-03-06 00:18:15 +00:00
Eric Christopher dd508382cc Remove the last of the special case code for emitting attributes.
This works by moving the existing code into the DIEValue hierarchy
and using the DwarfDebug pointer off of the AsmPrinter to access
any global information we need.

llvm-svn: 203033
2014-03-06 00:00:56 +00:00
Eric Christopher 411bd590d1 constify a few accessors.
llvm-svn: 203032
2014-03-06 00:00:53 +00:00
Eric Christopher 13a1bb3720 Remove special case in the DIEValue printing since it only existed
for verbose asm.

llvm-svn: 203031
2014-03-06 00:00:49 +00:00
Rui Ueyama ad807658ea Attempt to unbreak little-endian buildbots.
llvm-svn: 203023
2014-03-05 23:03:37 +00:00
Jack Carter 6b9cf961bd [Mips] Testcase typo fix. No functionality change.
llvm-svn: 203020
2014-03-05 22:54:56 +00:00
Rafael Espindola 9251c42f72 Now that we don't use libtool, we don't need to upgrade it :-)
Thanks to Patrik Hägglund H for noticing it!

llvm-svn: 203019
2014-03-05 22:45:14 +00:00
Eric Christopher a27220fb8c Add a DIELocList class to handle pointers into the location list.
This enables us to figure out where in the debug_loc section our
locations are so that we can eventually hash them. It also helps
remove some special case code in emission. No functional change.

llvm-svn: 203018
2014-03-05 22:41:20 +00:00
Hal Finkel 6a56b21729 With PPC CR bit registers, handle int_to_fp on older cores
On cores without fpcvt support, we cannot promote int_to_fp i1 operations,
because there is nothing to promote them to. The most straightforward
implementation of this uses a select to choose between the two possible
resulting floating-point values (and that's what is done here).

llvm-svn: 203015
2014-03-05 22:14:00 +00:00
Matt Arsenault ca6dcfcf59 Fix typo
llvm-svn: 203013
2014-03-05 21:47:22 +00:00
JF Bastien d44807ca67 Fix datalayout test that I broke with my previous LinkModules warning improvement.
llvm-svn: 203011
2014-03-05 21:37:08 +00:00
JF Bastien 026fc5f6ab Improve LinkModules warnings
Provide triple and data layout as well as module names (or empty string) when there's a mismatch.

Differential Revision: http://llvm-reviews.chandlerc.com/D2971

llvm-svn: 203009
2014-03-05 21:26:42 +00:00
Arnold Schwaighofer ab12363c02 LoopVectorizer: Preserve fast-math flags
Fixes PR19045.

llvm-svn: 203008
2014-03-05 21:10:47 +00:00
Rafael Espindola 8377085657 Always print the implicit .text at the start of an asm file.
Before llvm-mc would print it, but llc was assuming that it would produce
another section changing directive before one was needed. That assumption is
false with inline asm.

Fixes PR19049.

Another option would be to always create the section, but in the asm printer
avoid printing sections changes during initialization. That would work, but
* We do use the fact that llvm-mc prints it in testing. The tests can be changed
  if needed.
* A quick poll on IRC suggest that most developers prefer the implicit .text to
  be printed.

llvm-svn: 203001
2014-03-05 20:09:15 +00:00
Ben Langmuir 8d11639612 Fix an inconsistency in treatment of trailing / in path::const_iterator
When using a //net/ path, we were transforming the trailing / into a '.'
when the path was just the root path and we were iterating backwards.
Forwards iteration and other kinds of root path (C:\, /) were already
correct.

llvm-svn: 202999
2014-03-05 19:56:30 +00:00
Benjamin Kramer 061d147f74 ConstantFolding: Also fold the vector overloads of our math intrinsics.
llvm-svn: 202997
2014-03-05 19:41:48 +00:00
Cameron McInally 791ae9927c Lower AVX v4i64->v4i32 truncate to one shuffle.
llvm-svn: 202996
2014-03-05 19:41:16 +00:00
David Blaikie 7f4a52eaee Fix clang -Werror build break due to mismatched sign comparison.
Originally committed in r202985.

llvm-svn: 202992
2014-03-05 18:53:36 +00:00
Hans Wennborg 928fb264a5 Work around MSVC bug in IntrusiveRefCntPtr.h
The build was failing with:

  error C2664: 'std::atomic_int::atomic_int(const std::atomic_int &)' : cannot convert argument 1 from 'int' to 'const std::atomic_int &'

Apparently "std::atomic_int x(0)" doesn't work, but "std::atomic<int> x(0)"
does.

llvm-svn: 202988
2014-03-05 16:26:04 +00:00
Oliver Stannard d55e115b58 ARM: Correctly align arguments after a byval struct is passed on the stack
llvm-svn: 202985
2014-03-05 15:25:27 +00:00
Ben Langmuir 7590be3cfa Add a ThreadSafeRefCountedBase
A version of RefCountedBase that uses std::atomic_int to store its
reference count.

llvm-svn: 202984
2014-03-05 15:24:33 +00:00
Tobias Grosser fbe95dcfd2 [LangRef] Improve llvm.mem.parallel_loop_access example
The following changes have been applied:

  - Removed 'align 4'. We can simplify this away, as it does not provide useful
    information in the example.
  - Use named instructions instead of '%0'. This is nicer, but more importantly
    this makes the IR valid. Before we had two assignments to %0 in a single
    example.
  - Add a missing branch instruction to make the loop structure clear.
  - Move one access into outer.for.body to make it not look that empty.
  - The statments that are only in the outer loop body should not reference the
    inner loop metadata, but only the outer loop. Only statements in both loops
    should reference both surrounding loops.
  - Rename the array indexes to make them all independent. Before there were
    identical array indexes in the inner and the outer loop. We want to
    avoid this special case as it may lead to confusion.

llvm-svn: 202973
2014-03-05 13:36:04 +00:00
Joerg Sonnenberger cce644a633 Enable integrated assembler on OpenBSD/PPC32 by default, too.
From Brad Smith.

llvm-svn: 202967
2014-03-05 11:37:04 +00:00