oota-llvm.git
10 years ago80-column fixups.
Eric Christopher [Fri, 7 Mar 2014 01:44:12 +0000 (01:44 +0000)]
80-column fixups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203190 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Emit DW_TAG_subprogram's DW_AT_high_pc as an offset from the low_pc
David Blaikie [Fri, 7 Mar 2014 01:30:55 +0000 (01:30 +0000)]
DebugInfo: Emit DW_TAG_subprogram's DW_AT_high_pc as an offset from the low_pc

This removes a relocation from each subprogram, reducing link times,
etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203187 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Refactor test to not rely on fixed DIE offsets
David Blaikie [Fri, 7 Mar 2014 01:19:31 +0000 (01:19 +0000)]
DebugInfo: Refactor test to not rely on fixed DIE offsets

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203186 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Improve test to not depend on the specific naming of temporary symbols
David Blaikie [Fri, 7 Mar 2014 00:23:38 +0000 (00:23 +0000)]
DebugInfo: Improve test to not depend on the specific naming of temporary symbols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203184 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd iterator_range support for MachineInstr's operand and memoperand iterators.
Owen Anderson [Fri, 7 Mar 2014 00:08:57 +0000 (00:08 +0000)]
Add iterator_range support for MachineInstr's operand and memoperand iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203181 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReapply "MC: simplify object file selection for Windows"
Saleem Abdulrasool [Thu, 6 Mar 2014 23:02:15 +0000 (23:02 +0000)]
Reapply "MC: simplify object file selection for Windows"

That was overly aggressive in assuming that we could always assume COFF.  Some
of the tests assume that they will get ELF rather than COFF even on Windows
where the default is COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203176 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove shouldEmitUsedDirectiveFor.
Rafael Espindola [Thu, 6 Mar 2014 22:47:08 +0000 (22:47 +0000)]
Remove shouldEmitUsedDirectiveFor.

Clang now uses llvm.compiler.used for these cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203174 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConvert test to FileCheck.
Rafael Espindola [Thu, 6 Mar 2014 22:21:43 +0000 (22:21 +0000)]
Convert test to FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203173 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove unreachable 'return true' always dominated by 'return Error' or 'return false'.
Ted Kremenek [Thu, 6 Mar 2014 22:13:17 +0000 (22:13 +0000)]
Remove unreachable 'return true' always dominated by 'return Error' or 'return false'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203171 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Support/LockFileManager] Re-apply r203137 and r203138 but use symbolic links only...
Argyrios Kyrtzidis [Thu, 6 Mar 2014 20:53:58 +0000 (20:53 +0000)]
[Support/LockFileManager] Re-apply r203137 and r203138 but use symbolic links only on unix.

Reid Kleckner pointed out that we can't use symbolic links on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203162 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: split object format out of environment
Saleem Abdulrasool [Thu, 6 Mar 2014 20:47:11 +0000 (20:47 +0000)]
Support: split object format out of environment

This is a preliminary setup change to support a renaming of Windows target
triples.  Split the object file format information out of the environment into a
separate entity.  Unfortunately, file format was previously treated as an
environment with an unknown OS.  This is most obvious in the ARM subtarget where
the handling for macho on an arbitrary platform switches to AAPCS rather than
APCS (as per Apple's needs).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203160 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMC: simplify object file selection for Windows
Saleem Abdulrasool [Thu, 6 Mar 2014 20:47:03 +0000 (20:47 +0000)]
MC: simplify object file selection for Windows

Windows always uses COFF unless Windows ELF is in use.  Rather than checking if
Windows, MinGW, or Cygwin is being targeted, just check if the target OS is
windows and that it is not an ELF environment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203159 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes.
Andrea Di Biagio [Thu, 6 Mar 2014 20:19:52 +0000 (20:19 +0000)]
[X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes.

This patch teaches the DAGCombiner how to fold a binary OR between two
shufflevector into a single shuffle vector when possible.

The rules are:
  1. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask1)
  2. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf B, A, Mask2)

The DAGCombiner can take advantage of the fact that OR is commutative and
compute two possible shuffle masks (Mask1 and Mask2) for the resulting
shuffle node.

Before folding a dag according to either rule 1 or 2, DAGCombiner verifies
that the resulting shuffle mask is legal for the target.
DAGCombiner would firstly try to fold according to 1.; If not possible
then it will try to fold according to 2.
If both Mask1 and Mask2 are illegal then we conservatively don't fold
the OR instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203156 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix warning about mismatched signs in comparison.
Rafael Espindola [Thu, 6 Mar 2014 20:16:24 +0000 (20:16 +0000)]
Fix warning about mismatched signs in comparison.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203155 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the printing of n_type.
Rafael Espindola [Thu, 6 Mar 2014 20:13:41 +0000 (20:13 +0000)]
Fix the printing of n_type.

Despite the name, n_type contains the type of the symbol, but also if it is
extern or private extern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203154 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse the existing N_STAB from the MachO namespace.
Rafael Espindola [Thu, 6 Mar 2014 19:58:56 +0000 (19:58 +0000)]
Use the existing N_STAB from the MachO namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203152 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConstify a few things with DotDebugLocEntry.
Eric Christopher [Thu, 6 Mar 2014 19:51:16 +0000 (19:51 +0000)]
Constify a few things with DotDebugLocEntry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203150 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMS asm: The initial dot in struct access is optional
Reid Kleckner [Thu, 6 Mar 2014 19:19:12 +0000 (19:19 +0000)]
MS asm: The initial dot in struct access is optional

Fixes PR18994.

Tests, once again, in that other repository.  =P

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203146 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert create_symbolic_link and both depending changes
Reid Kleckner [Thu, 6 Mar 2014 19:07:35 +0000 (19:07 +0000)]
Revert create_symbolic_link and both depending changes

This reverts commits r203136, r203137, and r203138.

This code doesn't build on Windows.  Even on Vista+, Windows requires
elevated privileges to create a symlink.  Therefore we can't use
symlinks in the compiler.  We'll have to find another approach.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203143 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove DIEEntry handling inside the main switch statement.
Eric Christopher [Thu, 6 Mar 2014 18:59:42 +0000 (18:59 +0000)]
Move DIEEntry handling inside the main switch statement.
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203142 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Support/LockFileManager] Make the LockFileManager more robust against races.
Argyrios Kyrtzidis [Thu, 6 Mar 2014 17:37:10 +0000 (17:37 +0000)]
[Support/LockFileManager] Make the LockFileManager more robust against races.

There was a race where:
- The LockFileManager tries to own the lock file and fails.
- The other owner then releases and removes the lock file.
- The LockFileManager tries to read the owner info from the lock file but fails now.

In such a case have LockFileManager try to get ownership again, instead of error'ing out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203138 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Support/LockFileManager] Use symbolic link for the lock file.
Argyrios Kyrtzidis [Thu, 6 Mar 2014 17:37:04 +0000 (17:37 +0000)]
[Support/LockFileManager] Use symbolic link for the lock file.

Hard links do not work on SMB network directories, and it causes us to fail
to build clang module files if the module cache is in such a directory.
rdar://15944959

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203137 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Support/FileSystem] Introduce llvm::sys::fs::create_symbolic_link().
Argyrios Kyrtzidis [Thu, 6 Mar 2014 17:36:46 +0000 (17:36 +0000)]
[Support/FileSystem] Introduce llvm::sys::fs::create_symbolic_link().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203136 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Fix extloads from i8 / i16 to i64.
Matt Arsenault [Thu, 6 Mar 2014 17:34:12 +0000 (17:34 +0000)]
R600: Fix extloads from i8 / i16 to i64.

This appears to only be working for global loads. Private
and local break for other reasons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203135 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Expand selects on vectors.
Matt Arsenault [Thu, 6 Mar 2014 17:34:03 +0000 (17:34 +0000)]
R600/SI: Expand selects on vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203134 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix missing C++ mode comment
Matt Arsenault [Thu, 6 Mar 2014 17:33:58 +0000 (17:33 +0000)]
Fix missing C++ mode comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203133 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTeach lint about address spaces
Matt Arsenault [Thu, 6 Mar 2014 17:33:55 +0000 (17:33 +0000)]
Teach lint about address spaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203132 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[XCore] Add support for the "m" inline asm constraint.
Richard Osborne [Thu, 6 Mar 2014 16:37:48 +0000 (16:37 +0000)]
[XCore] Add support for the "m" inline asm constraint.

Summary:
This provides support for CP and DP relative global accesses in inline
asm.

Reviewers: robertlytton

Reviewed By: robertlytton

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203129 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMicro optimization: this code only needs to look at eh labels.
Rafael Espindola [Thu, 6 Mar 2014 16:31:40 +0000 (16:31 +0000)]
Micro optimization: this code only needs to look at eh labels.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203127 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[AArch64] This is a work in progress to provide a machine description
Chad Rosier [Thu, 6 Mar 2014 16:04:00 +0000 (16:04 +0000)]
[AArch64] This is a work in progress to provide a machine description
for the Cortex-A53 subtarget in the AArch64 backend.

This patch lays the ground work to annotate each AArch64 instruction
(no NEON yet) with a list of SchedReadWrite types. The patch also
provides the Cortex-A53 processor resources, maps those the the default
SchedReadWrites, and provides basic latency. NEON support will be added
in a subsequent patch with proper forwarding logic.

Verification was done by setting the pre-RA scheduler to linearize to
better gauge the effect of the MIScheduler. Even without modeling the
forward logic, the results show a modest improvement for Cortex-A53.

Reviewers: apazos, mcrosier, atrick
Patch by Dave Estes <cestes@codeaurora.org>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203125 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SystemZ] Remove "virtual" from override methods
Richard Sandiford [Thu, 6 Mar 2014 12:03:36 +0000 (12:03 +0000)]
[SystemZ] Remove "virtual" from override methods

Also fix a couple of cases where "override" was missing.  No behavioural
change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203110 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SystemZ] Use "auto" for cast results
Richard Sandiford [Thu, 6 Mar 2014 11:22:58 +0000 (11:22 +0000)]
[SystemZ] Use "auto" for cast results

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203106 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SystemZ] Use "for (auto" a bit
Richard Sandiford [Thu, 6 Mar 2014 11:00:15 +0000 (11:00 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203105 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[SystemZ] Update namespace formatting to match current guidelines
Richard Sandiford [Thu, 6 Mar 2014 10:38:30 +0000 (10:38 +0000)]
[SystemZ] Update namespace formatting to match current guidelines

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203103 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAVX-512: Added rrk, rrkz, rmk, rmkz, rmbk, rmbkz versions of AVX512 FP packed instruc...
Elena Demikhovsky [Thu, 6 Mar 2014 08:45:30 +0000 (08:45 +0000)]
AVX-512: Added rrk, rrkz, rmk, rmkz, rmbk, rmbkz versions of AVX512 FP packed instructions, added encoding tests for them.
By Robert Khazanov.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203098 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAVX-512: fixed comressed displacement - by Robert Khazanov
Elena Demikhovsky [Thu, 6 Mar 2014 08:15:35 +0000 (08:15 +0000)]
AVX-512: fixed comressed displacement - by Robert Khazanov

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203096 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCleaning up two more pre-Visual C++ 2012 build hacks.
Yaron Keren [Thu, 6 Mar 2014 08:05:43 +0000 (08:05 +0000)]
Cleaning up two more pre-Visual C++ 2012 build hacks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203093 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix warnings about an variable only used in asserts.
Ahmed Charles [Thu, 6 Mar 2014 06:35:46 +0000 (06:35 +0000)]
Fix warnings about an variable only used in asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203089 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd <cstddef> for use of std::ptrdiff_t.
Ahmed Charles [Thu, 6 Mar 2014 06:13:54 +0000 (06:13 +0000)]
Add <cstddef> for use of std::ptrdiff_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203086 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix break by qualifying ptrdiff_t with std::.
Ahmed Charles [Thu, 6 Mar 2014 06:05:26 +0000 (06:05 +0000)]
Fix break by qualifying ptrdiff_t with std::.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203084 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReplace OwningPtr<T> with std::unique_ptr<T>.
Ahmed Charles [Thu, 6 Mar 2014 05:51:42 +0000 (05:51 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203083 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Tag units as having been indexed in GNU pubnames by using a DW_AT_GNU_pubn...
David Blaikie [Thu, 6 Mar 2014 05:47:39 +0000 (05:47 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203082 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAllow constant folding of copysign
Karthik Bhat [Thu, 6 Mar 2014 05:32:52 +0000 (05:32 +0000)]
Allow constant folding of copysign

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203076 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Modules] Fix a layering issue that is actually impacting the modules
Chandler Carruth [Thu, 6 Mar 2014 04:13:12 +0000 (04:13 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203071 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Layering] Move GVMaterializer.h into the IR library where its
Chandler Carruth [Thu, 6 Mar 2014 03:50:29 +0000 (03:50 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203069 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[cleanup] Re-sort the standard library include lines.
Chandler Carruth [Thu, 6 Mar 2014 03:43:04 +0000 (03:43 +0000)]
[cleanup] Re-sort the standard library include lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203066 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Layering] Sink Linker.h into a Linker subdirectory to make it
Chandler Carruth [Thu, 6 Mar 2014 03:42:23 +0000 (03:42 +0000)]
[Layering] Sink Linker.h into a Linker subdirectory to make it
consistent with every other sub-library header in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203065 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Layering] Move InstVisitor.h into the IR library as it is pretty
Chandler Carruth [Thu, 6 Mar 2014 03:23:41 +0000 (03:23 +0000)]
[Layering] Move InstVisitor.h into the IR library as it is pretty
obviously coupled to the IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203064 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoChange the tag on this iterator to bidir and implement enough operators to make it...
Owen Anderson [Thu, 6 Mar 2014 02:02:43 +0000 (02:02 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203060 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix issues in the NamedMDNode operand iterator, including those pointed out by
Owen Anderson [Thu, 6 Mar 2014 01:51:01 +0000 (01:51 +0000)]
Fix issues in the NamedMDNode operand iterator, including those pointed out by
Chandler in review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203058 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Shrink pubnames/pubtypes in the presence of type units by only emitting...
David Blaikie [Thu, 6 Mar 2014 01:42:00 +0000 (01:42 +0000)]
DebugInfo: Shrink pubnames/pubtypes in the presence of type units by only emitting pub sections for compile units

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203057 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd some helpful comments on DIEValue types that we expect to hash.
Eric Christopher [Thu, 6 Mar 2014 01:32:56 +0000 (01:32 +0000)]
Add some helpful comments on DIEValue types that we expect to hash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203055 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThe PPC global base register cannot be r0
Hal Finkel [Thu, 6 Mar 2014 01:28:23 +0000 (01:28 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203054 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a iterator and interator_range interface to the operands of a NamedMDNode.
Owen Anderson [Thu, 6 Mar 2014 01:12:56 +0000 (01:12 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203053 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Layering] Move DebugInfo.h into the IR library where its implementation
Chandler Carruth [Thu, 6 Mar 2014 00:46:21 +0000 (00:46 +0000)]
[Layering] Move DebugInfo.h into the IR library where its implementation
already lives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203046 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFixup PPC Darwin i1 argument handling
Hal Finkel [Thu, 6 Mar 2014 00:45:19 +0000 (00:45 +0000)]
Fixup PPC Darwin i1 argument handling

Like on other targets, we need to zero_extend/truncate i1 args before copying
them to GPRs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203045 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRewrite the attribute hashing algorithm to use the type of the value
Eric Christopher [Thu, 6 Mar 2014 00:38:32 +0000 (00:38 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203044 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWhen using CR bit registers on PPC32, handle the i1 vaarg case
Hal Finkel [Thu, 6 Mar 2014 00:23:33 +0000 (00:23 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203041 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Layering] Move DIBuilder.h into the IR library where its implementation
Chandler Carruth [Thu, 6 Mar 2014 00:22:06 +0000 (00:22 +0000)]
[Layering] Move DIBuilder.h into the IR library where its implementation
already lives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203038 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoChange math intrinsic attributes from readonly to readnone. These
Raul E. Silvera [Thu, 6 Mar 2014 00:18:15 +0000 (00:18 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203037 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove the last of the special case code for emitting attributes.
Eric Christopher [Thu, 6 Mar 2014 00:00:56 +0000 (00:00 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203033 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoconstify a few accessors.
Eric Christopher [Thu, 6 Mar 2014 00:00:53 +0000 (00:00 +0000)]
constify a few accessors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203032 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove special case in the DIEValue printing since it only existed
Eric Christopher [Thu, 6 Mar 2014 00:00:49 +0000 (00:00 +0000)]
Remove special case in the DIEValue printing since it only existed
for verbose asm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203031 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAttempt to unbreak little-endian buildbots.
Rui Ueyama [Wed, 5 Mar 2014 23:03:37 +0000 (23:03 +0000)]
Attempt to unbreak little-endian buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203023 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Mips] Testcase typo fix. No functionality change.
Jack Carter [Wed, 5 Mar 2014 22:54:56 +0000 (22:54 +0000)]
[Mips] Testcase typo fix. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203020 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoNow that we don't use libtool, we don't need to upgrade it :-)
Rafael Espindola [Wed, 5 Mar 2014 22:45:14 +0000 (22:45 +0000)]
Now that we don't use libtool, we don't need to upgrade it :-)

Thanks to Patrik Hägglund H for noticing it!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203019 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a DIELocList class to handle pointers into the location list.
Eric Christopher [Wed, 5 Mar 2014 22:41:20 +0000 (22:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203018 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWith PPC CR bit registers, handle int_to_fp on older cores
Hal Finkel [Wed, 5 Mar 2014 22:14:00 +0000 (22:14 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203015 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix typo
Matt Arsenault [Wed, 5 Mar 2014 21:47:22 +0000 (21:47 +0000)]
Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203013 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix datalayout test that I broke with my previous LinkModules warning improvement.
JF Bastien [Wed, 5 Mar 2014 21:37:08 +0000 (21:37 +0000)]
Fix datalayout test that I broke with my previous LinkModules warning improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203011 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoImprove LinkModules warnings
JF Bastien [Wed, 5 Mar 2014 21:26:42 +0000 (21:26 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203009 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLoopVectorizer: Preserve fast-math flags
Arnold Schwaighofer [Wed, 5 Mar 2014 21:10:47 +0000 (21:10 +0000)]
LoopVectorizer: Preserve fast-math flags

Fixes PR19045.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203008 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAlways print the implicit .text at the start of an asm file.
Rafael Espindola [Wed, 5 Mar 2014 20:09:15 +0000 (20:09 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203001 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix an inconsistency in treatment of trailing / in path::const_iterator
Ben Langmuir [Wed, 5 Mar 2014 19:56:30 +0000 (19:56 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202999 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConstantFolding: Also fold the vector overloads of our math intrinsics.
Benjamin Kramer [Wed, 5 Mar 2014 19:41:48 +0000 (19:41 +0000)]
ConstantFolding: Also fold the vector overloads of our math intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202997 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLower AVX v4i64->v4i32 truncate to one shuffle.
Cameron McInally [Wed, 5 Mar 2014 19:41:16 +0000 (19:41 +0000)]
Lower AVX v4i64->v4i32 truncate to one shuffle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202996 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix clang -Werror build break due to mismatched sign comparison.
David Blaikie [Wed, 5 Mar 2014 18:53:36 +0000 (18:53 +0000)]
Fix clang -Werror build break due to mismatched sign comparison.

Originally committed in r202985.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202992 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWork around MSVC bug in IntrusiveRefCntPtr.h
Hans Wennborg [Wed, 5 Mar 2014 16:26:04 +0000 (16:26 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202988 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: Correctly align arguments after a byval struct is passed on the stack
Oliver Stannard [Wed, 5 Mar 2014 15:25:27 +0000 (15:25 +0000)]
ARM: Correctly align arguments after a byval struct is passed on the stack

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202985 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a ThreadSafeRefCountedBase
Ben Langmuir [Wed, 5 Mar 2014 15:24:33 +0000 (15:24 +0000)]
Add a ThreadSafeRefCountedBase

A version of RefCountedBase that uses std::atomic_int to store its
reference count.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202984 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LangRef] Improve llvm.mem.parallel_loop_access example
Tobias Grosser [Wed, 5 Mar 2014 13:36:04 +0000 (13:36 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202973 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoEnable integrated assembler on OpenBSD/PPC32 by default, too.
Joerg Sonnenberger [Wed, 5 Mar 2014 11:37:04 +0000 (11:37 +0000)]
Enable integrated assembler on OpenBSD/PPC32 by default, too.
From Brad Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202967 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThis patch implements .set dsp directive and sets appropriate feature bits.This direc...
Vladimir Medic [Wed, 5 Mar 2014 11:05:09 +0000 (11:05 +0000)]
This patch implements .set dsp directive and sets appropriate feature bits.This directive is a counterpart of -mattr=dsp command line option with the exception that it does not influence elf header flags. The usage example is gives in test file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202966 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd missing parenthesis in SCEV comment
Tobias Grosser [Wed, 5 Mar 2014 10:37:17 +0000 (10:37 +0000)]
Add missing parenthesis in SCEV comment

Contributed-by: Michael Zolutukin <mzolotukhin@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202963 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Layering] Move AutoUpgrade.h into the IR library where its
Chandler Carruth [Wed, 5 Mar 2014 10:34:14 +0000 (10:34 +0000)]
[Layering] Move AutoUpgrade.h into the IR library where its
implementation already lives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202961 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Layering] Move DebugLoc.h into the IR library. The implementation
Chandler Carruth [Wed, 5 Mar 2014 10:30:38 +0000 (10:30 +0000)]
[Layering] Move DebugLoc.h into the IR library. The implementation
already lived there and it is where it belongs -- this is the in-memory
debug location representation.

This is just cleanup -- Modules can actually cope with this, but that
doesn't make it right. After chatting with folks that have out-of-tree
stuff, going ahead and moving the rest of the headers seems preferable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202960 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Add overloads for externally used OwningPtr functions.
Ahmed Charles [Wed, 5 Mar 2014 10:27:34 +0000 (10:27 +0000)]
[C++11] Add overloads for externally used OwningPtr functions.

This will allow external callers of these functions to switch over time
rather than forcing a breaking change all a once. These particular
functions were determined by building clang/lld/lldb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202959 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Make this interface accept const Use pointers and use override
Chandler Carruth [Wed, 5 Mar 2014 10:21:48 +0000 (10:21 +0000)]
[C++11] Make this interface accept const Use pointers and use override
to ensure we don't mess up any of the overrides. Necessary for cleaning
up the Value use iterators and enabling range-based traversing of use
lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202958 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Replace OwningPtr::take() with OwningPtr::release().
Ahmed Charles [Wed, 5 Mar 2014 10:19:29 +0000 (10:19 +0000)]
[C++11] Replace OwningPtr::take() with OwningPtr::release().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202957 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 5 Mar 2014 09:10:37 +0000 (09:10 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202953 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Add release() to OwningPtr.
Ahmed Charles [Wed, 5 Mar 2014 08:25:08 +0000 (08:25 +0000)]
[C++11] Add release() to OwningPtr.

This will make the transition to unique_ptr easier by allowing more
incremental changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202949 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 5 Mar 2014 07:52:44 +0000 (07:52 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202946 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 5 Mar 2014 07:30:04 +0000 (07:30 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202945 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake stackmap machineinstrs clobber the scratch regs too.
Andrew Trick [Wed, 5 Mar 2014 07:08:16 +0000 (07:08 +0000)]
Make stackmap machineinstrs clobber the scratch regs too.

Patchpoints already did this. Doing it for stackmaps is a convenience
for the runtime in the event that it needs to scratch register to
patch or perform a runtime call thunk.

Unlike patchpoints, we just assume the AnyRegCC calling
convention. This is the only language and target independent calling
convention specific to stackmaps so makes sense.  Although the calling
convention is not currently used to select the scratch registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202943 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Add 'override' keyword to IR library.
Craig Topper [Wed, 5 Mar 2014 06:35:38 +0000 (06:35 +0000)]
[C++11] Add 'override' keyword to IR library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202939 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Add 'override' keywords to tablegen code.
Craig Topper [Wed, 5 Mar 2014 05:17:42 +0000 (05:17 +0000)]
[C++11] Add 'override' keywords to tablegen code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202937 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C API] Implement LLVM{Get,Set}Alignment for AllocaInst.
Peter Zotov [Wed, 5 Mar 2014 05:05:34 +0000 (05:05 +0000)]
[C API] Implement LLVM{Get,Set}Alignment for AllocaInst.

Patch by Manuel Jacob.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202936 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove unnecessary variables.
Ahmed Charles [Wed, 5 Mar 2014 05:04:00 +0000 (05:04 +0000)]
Remove unnecessary variables.

Found self-hosting clang-cl on windows. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202935 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix unused variable in FunctionLoweringInfo.cpp
Hans Wennborg [Wed, 5 Mar 2014 03:21:23 +0000 (03:21 +0000)]
Fix unused variable in FunctionLoweringInfo.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202932 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCheck for dynamic allocas and inline asm that clobbers sp before building
Hans Wennborg [Wed, 5 Mar 2014 02:43:26 +0000 (02:43 +0000)]
Check for dynamic allocas and inline asm that clobbers sp before building
selection dag (PR19012)

In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
to make sure that ESI isn't used as a base pointer register before we choose to
emit rep movs (which clobbers esi).

The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
inline asm that clobbers the stack pointer until SelectionDAGBuilder has
encountered them.

This patch fixes the problem by checking for such things when building the
FunctionLoweringInfo.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202930 91177308-0d34-0410-b5e6-96231b3b80d8