oota-llvm.git
10 years agoA memcpy out of an fresh alloca is a no-op, delete it. Patch by Patrick Walton!
Nick Lewycky [Thu, 6 Feb 2014 06:29:19 +0000 (06:29 +0000)]
A memcpy out of an fresh alloca is a no-op, delete it. Patch by Patrick Walton!

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

10 years agoDelete all of the CodeGenInstructions from CodeGenTarget destructor.
Craig Topper [Thu, 6 Feb 2014 06:27:59 +0000 (06:27 +0000)]
Delete all of the CodeGenInstructions from CodeGenTarget destructor.

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

10 years ago[PM] Fix horrible typos that somehow didn't cause a failure in a C++11
Chandler Carruth [Thu, 6 Feb 2014 05:17:02 +0000 (05:17 +0000)]
[PM] Fix horrible typos that somehow didn't cause a failure in a C++11
build but spectacularly changed behavior of the C++98 build. =]

This shows my one problem with not having unittests -- basic API
expectations aren't well exercised by the integration tests because they
*happen* to not come up, even though they might later. I'll probably add
a basic unittest to complement the integration testing later, but
I wanted to revive the bots.

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

10 years ago[PM] Add a new "lazy" call graph analysis pass for the new pass manager.
Chandler Carruth [Thu, 6 Feb 2014 04:37:03 +0000 (04:37 +0000)]
[PM] Add a new "lazy" call graph analysis pass for the new pass manager.

The primary motivation for this pass is to separate the call graph
analysis used by the new pass manager's CGSCC pass management from the
existing call graph analysis pass. That analysis pass is (somewhat
unfortunately) over-constrained by the existing CallGraphSCCPassManager
requirements. Those requirements make it *really* hard to cleanly layer
the needed functionality for the new pass manager on top of the existing
analysis.

However, there are also a bunch of things that the pass manager would
specifically benefit from doing differently from the existing call graph
analysis, and this new implementation tries to address several of them:

- Be lazy about scanning function definitions. The existing pass eagerly
  scans the entire module to build the initial graph. This new pass is
  significantly more lazy, and I plan to push this even further to
  maximize locality during CGSCC walks.
- Don't use a single synthetic node to partition functions with an
  indirect call from functions whose address is taken. This node creates
  a huge choke-point which would preclude good parallelization across
  the fanout of the SCC graph when we got to the point of looking at
  such changes to LLVM.
- Use a memory dense and lightweight representation of the call graph
  rather than value handles and tracking call instructions. This will
  require explicit update calls instead of some updates working
  transparently, but should end up being significantly more efficient.
  The explicit update calls ended up being needed in many cases for the
  existing call graph so we don't really lose anything.
- Doesn't explicitly model SCCs and thus doesn't provide an "identity"
  for an SCC which is stable across updates. This is essential for the
  new pass manager to work correctly.
- Only form the graph necessary for traversing all of the functions in
  an SCC friendly order. This is a much simpler graph structure and
  should be more memory dense. It does limit the ways in which it is
  appropriate to use this analysis. I wish I had a better name than
  "call graph". I've commented extensively this aspect.

This is still very much a WIP, in fact it is really just the initial
bits. But it is about the fourth version of the initial bits that I've
implemented with each of the others running into really frustrating
problms. This looks like it will actually work and I'd like to split the
actual complexity across commits for the sake of my reviewers. =] The
rest of the implementation along with lots of wiring will follow
somewhat more rapidly now that there is a good path forward.

Naturally, this doesn't impact any of the existing optimizer. This code
is specific to the new pass manager.

A bunch of thanks are deserved for the various folks that have helped
with the design of this, especially Nick Lewycky who actually sat with
me to go through the fundamentals of the final version here.

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

10 years ago[PM] Back out one hunk of the patch in r200901 that was *supposed* to go
Chandler Carruth [Thu, 6 Feb 2014 04:32:33 +0000 (04:32 +0000)]
[PM] Back out one hunk of the patch in r200901 that was *supposed* to go
in my next patch. Sorry for the breakage.

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

10 years ago[PM] Wire up the analysis managers in the opt driver. This isn't really
Chandler Carruth [Thu, 6 Feb 2014 04:25:13 +0000 (04:25 +0000)]
[PM] Wire up the analysis managers in the opt driver. This isn't really
necessary until we add analyses to the driver, but I have such an
analysis ready and wanted to split this out. This is actually exercised
by the existing tests of the new pass manager as the analysis managers
are cross-checked and validated by the function and module managers.

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

10 years ago[DAG] Don't pull the binary operation though the shift if the operands have opaque...
Juergen Ributzka [Thu, 6 Feb 2014 04:09:06 +0000 (04:09 +0000)]
[DAG] Don't pull the binary operation though the shift if the operands have opaque constants.

During DAGCombine visitShiftByConstant assumes that certain binary operations
with only constant operands can always be folded successfully. This is no longer
true when the constant is opaque. This commit fixes visitShiftByConstant by not
performing the optimization for opaque constants. Otherwise we would end up in
an infinite DAGCombine loop.

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

10 years agoSet default of inlinecold-threshold to 225.
Manman Ren [Thu, 6 Feb 2014 01:59:22 +0000 (01:59 +0000)]
Set default of inlinecold-threshold to 225.

225 is the default value of inline-threshold. This change will make sure
we have the same inlining behavior as prior to r200886.

As Chandler points out, even though we don't have code in our testing
suite that uses cold attribute, there are larger applications that do
use cold attribute.

r200886 + this commit intend to keep the same behavior as prior to r200886.
We can later on tune the inlinecold-threshold.

The main purpose of r200886 is to help performance of instrumentation based
PGO before we actually hook up inliner with analysis passes such as BPI and BFI.
For instrumentation based PGO, we try to increase inlining of hot functions and
reduce inlining of cold functions by setting inlinecold-threshold.

Another option suggested by Chandler is to use a boolean flag that controls
if we should use OptSizeThreshold for cold functions. The default value
of the boolean flag should not change the current behavior. But it gives us
less freedom in controlling inlining of cold functions.

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

10 years agoUpdate the X86 assembler for .intel_syntax to accept
Kevin Enderby [Thu, 6 Feb 2014 01:21:15 +0000 (01:21 +0000)]
Update the X86 assembler for .intel_syntax to accept
the << and >> bitwise operators.

rdar://15975725

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

10 years agodon't set HasReliableSymbolDifference for ELF.
Rafael Espindola [Thu, 6 Feb 2014 01:06:31 +0000 (01:06 +0000)]
don't set HasReliableSymbolDifference for ELF.

It is only used in MachObjectWriter.cpp. Another leftover from early days
of ELF in MC.

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

10 years agodoesSectionRequireSymbols is meaningless on ELF, remove.
Rafael Espindola [Thu, 6 Feb 2014 00:54:53 +0000 (00:54 +0000)]
doesSectionRequireSymbols is meaningless on ELF, remove.

This is a nop. doesSectionRequireSymbols is only used from
isSymbolLinkerVisible. isSymbolLinkerVisible only use from ELF was in

if (!Asm.isSymbolLinkerVisible(Symbol) && !Symbol.isUndefined())
  return false;

if (Symbol.isTemporary())
  return false;

If the symbol is a temporary this code returns false and it is irrelevant if
we take the first if or not. If the symbol is not a temporary,
Asm.isSymbolLinkerVisible returns true without ever calling
doesSectionRequireSymbols.

This was an horrible leftover from when support for ELF was first added.

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

10 years agoDisable most IR-level transform passes on functions marked 'optnone'.
Paul Robinson [Thu, 6 Feb 2014 00:07:05 +0000 (00:07 +0000)]
Disable most IR-level transform passes on functions marked 'optnone'.
Ideally only those transform passes that run at -O0 remain enabled,
in reality we get as close as we reasonably can.
Passes are responsible for disabling themselves, it's not the job of
the pass manager to do it for them.

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

10 years agoJust returning false is the default.
Rafael Espindola [Thu, 6 Feb 2014 00:03:15 +0000 (00:03 +0000)]
Just returning false is the default.

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

10 years agoPass address space to allowsUnalignedMemoryAccesses
Matt Arsenault [Wed, 5 Feb 2014 23:16:05 +0000 (23:16 +0000)]
Pass address space to allowsUnalignedMemoryAccesses

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

10 years agoAdd address space argument to allowsUnalignedMemoryAccess.
Matt Arsenault [Wed, 5 Feb 2014 23:15:53 +0000 (23:15 +0000)]
Add address space argument to allowsUnalignedMemoryAccess.

On R600, some address spaces have more strict alignment
requirements than others.

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

10 years agoInliner uses a smaller inline threshold for callees with cold attribute.
Manman Ren [Wed, 5 Feb 2014 22:53:44 +0000 (22:53 +0000)]
Inliner uses a smaller inline threshold for callees with cold attribute.

Added command line option inlinecold-threshold to set threshold for inlining
functions with cold attribute. Listen to the cold attribute when it would
decrease the inline threshold.

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

10 years agoFix layering StringRef copy using BumpPtrAllocator.
Nick Kledzik [Wed, 5 Feb 2014 22:22:56 +0000 (22:22 +0000)]
Fix layering StringRef copy using BumpPtrAllocator.

Now to copy a string into a BumpPtrAllocator and get a StringRef to the copy:

   StringRef myCopy = myStr.copy(myAllocator);

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

10 years ago[RegAlloc] Add a last chance recoloring mechanism when everything else failed to
Quentin Colombet [Wed, 5 Feb 2014 22:13:59 +0000 (22:13 +0000)]
[RegAlloc] Add a last chance recoloring mechanism when everything else failed to
find a register.

The idea is to choose a color for the variable that cannot be allocated and
recolor its interferences around. Unlike the current register allocation scheme,
it is allowed to change the color of an already assigned (but maybe not
splittable or spillable) live interval while propagating this change to its
neighbors.
In other word, there are two things that may help finding an available color:
- Already assigned variables (RS_Done) can be recolored to different color.
- The recoloring allows to catch solutions that needs to touch more that just
  the neighbors of the current allocated variable.

E.g.,
vA can use {R1, R2    }
vB can use {    R2, R3}
vC can use {R1        }
Where vA, vB, and vC cannot be split anymore (they are reloads for instance) and
they all interfere.

vA is assigned R1
vB is assigned R2
vC tries to evict vA but vA is already done.
=> Regular register allocation heuristic fails.

Last chance recoloring kicks in:
vC does as if vA was evicted => vC uses R1.
vC is marked as fixed.
vA needs to find a color.
None are available.
vA cannot evict vC: vC is a fixed virtual register now.
vA does as if vB was evicted => vA uses R2.
vB needs to find a color.
R3 is available.
Recoloring => vC = R1, vA = R2, vB = R3.

<rdar://problem/15947839>

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

10 years ago[PM] Don't require analysis results to be const in the new pass manager.
Chandler Carruth [Wed, 5 Feb 2014 21:41:42 +0000 (21:41 +0000)]
[PM] Don't require analysis results to be const in the new pass manager.

I think this was just over-eagerness on my part. The analysis results
need to often be non-const because they need to (in some cases at least)
be updated by the transformation pass in order to remain correct. It
also makes lazy analyses (a common case) needlessly annoying to write in
order to make their entire state mutable.

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

10 years agoRemove support for not using .loc directives.
Rafael Espindola [Wed, 5 Feb 2014 18:00:21 +0000 (18:00 +0000)]
Remove support for not using .loc directives.

Clang itself was not using this. The only way to access it was via llc.

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

10 years agoRevert "Fix an invalid check for duplicate option categories."
Rafael Espindola [Wed, 5 Feb 2014 17:49:31 +0000 (17:49 +0000)]
Revert "Fix an invalid check for duplicate option categories."

This reverts commit r200853.

It was causing clang/Analysis/checker-plugins.c to crash.

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

10 years ago[mips] Add NaCl target and forbid indexed loads and stores for it
Petar Jovanovic [Wed, 5 Feb 2014 17:19:30 +0000 (17:19 +0000)]
[mips] Add NaCl target and forbid indexed loads and stores for it

This patch adds NaCl target for Mips. It also forbids indexed loads and
stores if the target is NaCl.

Patch by Sasa Stankovic.

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

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

10 years agoFix an invalid check for duplicate option categories.
Alexander Kornienko [Wed, 5 Feb 2014 16:56:37 +0000 (16:56 +0000)]
Fix an invalid check for duplicate option categories.

Summary:
The check performed in the comparator is invalid, as some STL
implementations enforce strict weak ordering by calling the comparator with the
same value. This check was also in a wrong place: the assertion would only fire
when -help was used. The new check is performed each time the category is
registered (we are not going to have thousands of them, so it's fine to do it in
O(N^2)).

Reviewers: jordan_rose

Reviewed By: jordan_rose

CC: cfe-commits, alexmc
Differential Revision: http://llvm-reviews.chandlerc.com/D2699

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

10 years agomips: XFAIL non-extern-addend-smallcodemodel test
Petar Jovanovic [Wed, 5 Feb 2014 16:47:59 +0000 (16:47 +0000)]
mips: XFAIL non-extern-addend-smallcodemodel test

Small code model (and default reloc model) set Reloc::PIC_ in this test,
and PIC is not yet supported in MCJIT for MIPS.

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

10 years agoAVX-512: optimized icmp -> sext -> icmp pattern
Elena Demikhovsky [Wed, 5 Feb 2014 16:17:36 +0000 (16:17 +0000)]
AVX-512: optimized icmp -> sext -> icmp pattern

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

10 years agoTest commit
Alon Mishne [Wed, 5 Feb 2014 14:23:18 +0000 (14:23 +0000)]
Test commit

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

10 years agoARM: Resolve thumb_bl fixup in same MCFragment.
Logan Chien [Wed, 5 Feb 2014 14:15:16 +0000 (14:15 +0000)]
ARM: Resolve thumb_bl fixup in same MCFragment.

In Thumb1 mode, bl instruction might be selected for branches between
basic blocks in the function if the offset is greater than 2KB.
However, this might cause SEGV because the destination symbol
is not marked as thumb function and the execution mode will be reset
to ARM mode.

Since we are sure that these symbols are in the same data fragment, we
can simply resolve these local symbols, and don't emit any relocation
information for this bl instruction.

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

10 years agoAVX-512: fixed a bug in EVEX encoding (the bug appeared after r200624)
Elena Demikhovsky [Wed, 5 Feb 2014 13:03:01 +0000 (13:03 +0000)]
AVX-512: fixed a bug in EVEX encoding (the bug appeared after r200624)

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

10 years agoR600/SI: Add pattern for zero-extending i1 to i32
Michel Danzer [Wed, 5 Feb 2014 09:48:05 +0000 (09:48 +0000)]
R600/SI: Add pattern for zero-extending i1 to i32

Fixes opencl-example if_* tests with radeonsi.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74469

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200830 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoShrink the size of CodeGenInstruction a little bit by using bitfields. 32 bools seeme...
Craig Topper [Wed, 5 Feb 2014 09:10:40 +0000 (09:10 +0000)]
Shrink the size of CodeGenInstruction a little bit by using bitfields. 32 bools seemed excessive.

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

10 years agoGet rid of a vector copy by just making a pointer out of the reference returned by...
Craig Topper [Wed, 5 Feb 2014 07:56:49 +0000 (07:56 +0000)]
Get rid of a vector copy by just making a pointer out of the reference returned by getInstructionsByEnumValue instead of assigning it to a new vector.

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

10 years agoFix a vector that was passed by value instead of reference.
Craig Topper [Wed, 5 Feb 2014 07:27:49 +0000 (07:27 +0000)]
Fix a vector that was passed by value instead of reference.

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

10 years agoARM: Enable use of relocation type tlsldo in debug info for tls data.
Kai Nacke [Wed, 5 Feb 2014 07:23:09 +0000 (07:23 +0000)]
ARM: Enable use of relocation type tlsldo in debug info for tls data.

This fixes PR18554.

Reviewers: Renato Golin, Keith Walker

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

10 years agoFix a doxygen comment referencing the wrong method name.
Craig Topper [Wed, 5 Feb 2014 07:21:07 +0000 (07:21 +0000)]
Fix a doxygen comment referencing the wrong method name.

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

10 years agoMove matching for x86 BMI BLSI/BLSMSK/BLSR instructions to isel patterns instead...
Craig Topper [Wed, 5 Feb 2014 07:09:40 +0000 (07:09 +0000)]
Move matching for x86 BMI BLSI/BLSMSK/BLSR instructions to isel patterns instead of DAG combine. This weakens the ability to fold loads with them because we aren't able to match patterns that load the same thing twice. But maybe we should fix that if we care. The peephole optimizer will be able to fold some loads in its absense.

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

10 years agoAVX-512: Added intrinsic for cvtph2ps.
Elena Demikhovsky [Wed, 5 Feb 2014 07:05:03 +0000 (07:05 +0000)]
AVX-512: Added intrinsic for cvtph2ps.
Added VPTESTNM instruction.
Added a pattern to vselect (lit tests will follow).

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

10 years agoAdd CheckChildInteger to ISelMatcher operations. Removes nearly 2000 bytes from X86...
Craig Topper [Wed, 5 Feb 2014 05:44:28 +0000 (05:44 +0000)]
Add CheckChildInteger to ISelMatcher operations. Removes nearly 2000 bytes from X86 matcher table.

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

10 years agoUse the information provided by getFlags to unify some code in llvm-nm.
Rafael Espindola [Wed, 5 Feb 2014 05:19:19 +0000 (05:19 +0000)]
Use the information provided by getFlags to unify some code in llvm-nm.

It is not clear how much we should try to expose in getFlags. For example,
should there be a SF_Object and a SF_Text?

But for information that is already being exposed, we may as well use it in
llvm-nm.

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

10 years agoFix configure to find arc4random via header files.
Todd Fiala [Wed, 5 Feb 2014 05:04:36 +0000 (05:04 +0000)]
Fix configure to find arc4random via header files.

ISSUE:

On Ubuntu 12.04 LTS, arc4random is provided by libbsd.so, which is a
transitive dependency of libedit. If a system had libedit on it that
was implemented in terms of libbsd.so, then the arc4random test,
previously implemented as a linker test, would succeed with -ledit.
However, on Ubuntu this would also require a #include <bsd/stdlib.h>.
This caused a build breakage on configure-based Ubuntu 12.04 with
libedit installed.

FIX:

This fix changes configure to test for arc4random by searching for it
in the standard header files. On Ubuntu 12.04, this test now properly
fails to find arc4random as it is not defined in the default header
locations. It also tweaks the #define names to match the output of the
header check command, which is slightly different than the linker
function check #defines.

I tested the following scenarios:

(1) Ubuntu 12.04 without the libedit package [did not find arc4random,
as expected]

(2) Ubuntu 12.04 with libedit package [properly did not find
arc4random, as expected]

(3) Ubuntu 12.04 with most recent libedit, custom built, and not
dependent on libbsd.so [properly did not find arc4random, as
expected].

(4) FreeBSD 10.0B1 [properly found arc4random, as expected]

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

10 years agoAdd a test for printing absolute symbols in ELF.
Rafael Espindola [Wed, 5 Feb 2014 04:36:47 +0000 (04:36 +0000)]
Add a test for printing absolute symbols in ELF.

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

10 years ago[CMake] Deliberately get all LLVM library dependencies for standalone builds.
Jordan Rose [Wed, 5 Feb 2014 00:02:42 +0000 (00:02 +0000)]
[CMake] Deliberately get all LLVM library dependencies for standalone builds.

CMake won't expand the dependency graph for us if the dependencies are in
another project, which leads to link errors in the standalone build.
This is a refinement of r200765.

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

10 years ago[CMake] Move -stdlib=libc++ handling into its own file.
Jordan Rose [Wed, 5 Feb 2014 00:02:37 +0000 (00:02 +0000)]
[CMake] Move -stdlib=libc++ handling into its own file.

r200744 moved this into cmake/config-ix.cmake, so that it would happen very
early in the build process. However, standalone builds of Clang and other
external projects never include this file (which is correct).

Now, -stdlib=libc++ and the LLVM_COMPILER_IS_GCC_COMPATIBLE option are
both set in a new include file, HandleLLVMStdlib, which is included by
both config-ix.cmake and HandleLLVMOptions.cmake. This preserves existing
behavior for projects relying on HandleLLVMOptions and still does the
right thing for builds of LLVM itself.

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

10 years agoSmall fix for llvm-nm handling of weak symbols on ELF (print 'v').
Rafael Espindola [Tue, 4 Feb 2014 23:53:15 +0000 (23:53 +0000)]
Small fix for llvm-nm handling of weak symbols on ELF (print 'v').

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

10 years agoUpdate testing case for r200806.
Manman Ren [Tue, 4 Feb 2014 23:53:12 +0000 (23:53 +0000)]
Update testing case for r200806.

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

10 years agoFix wording of warning message about invalid debug info.
Manman Ren [Tue, 4 Feb 2014 23:49:02 +0000 (23:49 +0000)]
Fix wording of warning message about invalid debug info.

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

10 years agoAdd a test for common symbols in coff.
Rafael Espindola [Tue, 4 Feb 2014 23:18:52 +0000 (23:18 +0000)]
Add a test for common symbols in coff.

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

10 years agoSilence a warning:
Chandler Carruth [Tue, 4 Feb 2014 22:53:45 +0000 (22:53 +0000)]
Silence a warning:

In file included from ../unittests/Support/ProcessTest.cpp:11:
../utils/unittest/googletest/include/gtest/gtest.h:1448:28: warning: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Wsign-compare]
GTEST_IMPL_CMP_HELPER_(NE, !=);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
../utils/unittest/googletest/include/gtest/gtest.h:1433:12: note: expanded from macro 'GTEST_IMPL_CMP_HELPER_'
  if (val1 op val2) {\
           ^
../unittests/Support/ProcessTest.cpp:46:3: note: in instantiation of function template specialization 'testing::internal::CmpHelperNE<unsigned int, int>' requested here
  EXPECT_NE((r1 | r2), 0);
  ^

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

10 years agoRemove unused SF_ThreadLocal.
Rafael Espindola [Tue, 4 Feb 2014 22:50:47 +0000 (22:50 +0000)]
Remove unused SF_ThreadLocal.

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

10 years agollvm-cov: Fix include order in GCOV.cpp
Justin Bogner [Tue, 4 Feb 2014 21:03:17 +0000 (21:03 +0000)]
llvm-cov: Fix include order in GCOV.cpp

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

10 years agoSimplifyLibCalls: Push TLI through the exp2->ldexp transform.
Benjamin Kramer [Tue, 4 Feb 2014 20:27:23 +0000 (20:27 +0000)]
SimplifyLibCalls: Push TLI through the exp2->ldexp transform.

For the odd case of platforms with exp2 available but not ldexp.

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

10 years agoAvoid using EL_GETFP.
Peter Collingbourne [Tue, 4 Feb 2014 20:04:46 +0000 (20:04 +0000)]
Avoid using EL_GETFP.

This should fix the build against old versions of libedit.

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

10 years ago[X86] Only 213 FMA3 variants should be marked commutable.
Lang Hames [Tue, 4 Feb 2014 19:42:47 +0000 (19:42 +0000)]
[X86] Only 213 FMA3 variants should be marked commutable.

Commuting the 231 and 132 variants would swap addends and
multiplicands/multipliers, which isn't valid.

I'm still trying to reduce a decent test case for this.

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

10 years agocleanup: scc_iterator consumers should use isAtEnd
Duncan P. N. Exon Smith [Tue, 4 Feb 2014 19:19:07 +0000 (19:19 +0000)]
cleanup: scc_iterator consumers should use isAtEnd

No functional change.  Updated loops from:

    for (I = scc_begin(), E = scc_end(); I != E; ++I)

to:

    for (I = scc_begin(); !I.isAtEnd(); ++I)

for teh win.

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

10 years ago[mips] Implement %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions
Petar Jovanovic [Tue, 4 Feb 2014 18:41:57 +0000 (18:41 +0000)]
[mips] Implement %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions

Patch implements %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions for MIPS
by creating target expression class MipsMCExpr.

Patch by Sasa Stankovic.

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

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

10 years agoEvery target uses .align. Simplify.
Rafael Espindola [Tue, 4 Feb 2014 18:39:51 +0000 (18:39 +0000)]
Every target uses .align. Simplify.

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

10 years agoUse the default values.
Rafael Espindola [Tue, 4 Feb 2014 18:34:04 +0000 (18:34 +0000)]
Use the default values.

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

10 years agoFix PR18345: ldr= pseudo instruction produces incorrect code when using in inline...
David Peixotto [Tue, 4 Feb 2014 17:22:40 +0000 (17:22 +0000)]
Fix PR18345: ldr= pseudo instruction produces incorrect code when using in inline assembly

This patch fixes the ldr-pseudo implementation to work when used in
inline assembly.  The fix is to move arm assembler constant pools
from the ARMAsmParser class to the ARMTargetStreamer class.

Previously we kept the assembler generated constant pools in the
ARMAsmParser object. This does not work for inline assembly because
a new parser object is created for each blob of inline assembly.
This patch moves the constant pools to the ARMTargetStreamer class
so that the constant pool will remain alive for the entire code
generation process.

An ARMTargetStreamer class is now required for the arm backend.
There was no existing implementation for MachO, only Asm and ELF.
Instead of creating an empty MachO subclass, we decided to make the
ARMTargetStreamer a non-abstract class and provide default
(llvm_unreachable) implementations for the non constant-pool related
methods.

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

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

10 years agoR600/SI: Expand i1 BR_CC
Tom Stellard [Tue, 4 Feb 2014 17:18:43 +0000 (17:18 +0000)]
R600/SI: Expand i1 BR_CC

This fixes a crashes in the OpenCV test suite and also the scrypt
kernel in bfgminer.

I was unable to come up with a reduced test case for this.

https://bugs.freedesktop.org/show_bug.cgi?id=72785

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

10 years agoR600/SI: Don't assume copies will be coalesced in SIFixSGPRCopies
Tom Stellard [Tue, 4 Feb 2014 17:18:42 +0000 (17:18 +0000)]
R600/SI: Don't assume copies will be coalesced in SIFixSGPRCopies

There is no lit test for this, because it would be too big and
complicated, but it does fix a crash in the Arithm/Absdiff.* OpenCV test.

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

10 years agoR600/SI: Custom lower i64 ISD::SELECT
Tom Stellard [Tue, 4 Feb 2014 17:18:40 +0000 (17:18 +0000)]
R600/SI: Custom lower i64 ISD::SELECT

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

10 years agoR600: Enable vector fpow.
Tom Stellard [Tue, 4 Feb 2014 17:18:37 +0000 (17:18 +0000)]
R600: Enable vector fpow.

The OpenCL specs say: "The vector versions of the math functions operate
component-wise. The description is per-component."

Patch by: Jan Vesely

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200773 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoHowToReleaseLLVM: Add information about dot releases
Tom Stellard [Tue, 4 Feb 2014 17:18:20 +0000 (17:18 +0000)]
HowToReleaseLLVM: Add information about dot releases

Based on the following discussion:
http://llvm.1065342.n5.nabble.com/LLVM-3-4-stable-releases-td65005.html

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

10 years agoOS X: the correct function is __sincospif_stret, not __sincospi_stretf
Tim Northover [Tue, 4 Feb 2014 16:28:20 +0000 (16:28 +0000)]
OS X: the correct function is __sincospif_stret, not __sincospi_stretf

rdar://problem/13729466

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

10 years agoARM & AArch64: merge NEON absolute compare intrinsics
Tim Northover [Tue, 4 Feb 2014 14:55:42 +0000 (14:55 +0000)]
ARM & AArch64: merge NEON absolute compare intrinsics

There was an extremely confusing proliferation of LLVM intrinsics to implement
the vacge & vacgt instructions. This combines them all into two polymorphic
intrinsics, shared across both backends.

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

10 years agoImplemented support for Process::GetRandomNumber on Windows.
Aaron Ballman [Tue, 4 Feb 2014 14:49:21 +0000 (14:49 +0000)]
Implemented support for Process::GetRandomNumber on Windows.

Patch thanks to Stephan Tolksdorf!

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

10 years ago[CMake] Get rid of llvm_config() to expand dependencies.
NAKAMURA Takumi [Tue, 4 Feb 2014 14:42:14 +0000 (14:42 +0000)]
[CMake] Get rid of llvm_config() to expand dependencies.

CMake's target_link_libraries() will manage dependencies.

Configuration time may be reduced by a few seconds.

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

10 years ago[CMake] LLVM-Config.cmake: Split explicit_map_components_to_libraries and introduce...
NAKAMURA Takumi [Tue, 4 Feb 2014 14:42:04 +0000 (14:42 +0000)]
[CMake] LLVM-Config.cmake: Split explicit_map_components_to_libraries and introduce llvm_map_components_to_libnames and llvm_expand_dependencies.

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

10 years ago[CMake] add_llvm_loadable_module: Fixup r200762, I mis-eliminated wrong line. :(
NAKAMURA Takumi [Tue, 4 Feb 2014 13:40:31 +0000 (13:40 +0000)]
[CMake] add_llvm_loadable_module: Fixup r200762, I mis-eliminated wrong line. :(

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

10 years agoRevert r122395, "Fixes file extension for loadable modules on OS X."
NAKAMURA Takumi [Tue, 4 Feb 2014 13:33:13 +0000 (13:33 +0000)]
Revert r122395, "Fixes file extension for loadable modules on OS X."

In trunk, every users assume add_llvm_loadable_module as "loadable module" and no one sets neither SHARED, ... nor also MODULE!
Unfortunately, all loadable modules were linked as not "MODULE" but "SHARED".

If this change caused any regressions, I wish guys to fix it properly. ;)

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

10 years agoAdd a note to documentation that Clang + libstdc++ 4.7.2 can not be used to build...
Dmitri Gribenko [Tue, 4 Feb 2014 12:02:13 +0000 (12:02 +0000)]
Add a note to documentation that Clang + libstdc++ 4.7.2 can not be used to build LLD.

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

10 years agollvm-cov: Implement the preserve-paths flag
Justin Bogner [Tue, 4 Feb 2014 10:45:02 +0000 (10:45 +0000)]
llvm-cov: Implement the preserve-paths flag

Until now, when a path in a gcno file included a directory, we would
emit our .gcov file in that directory, whereas gcov always emits the
file in the current directory. In doing so, this implements gcov's
strange name-mangling -p flag, which is needed to avoid clobbering
files when two with the same name exist in different directories.

The path mangling is a bit ugly and only handles unix-like paths, but
it's simple, and it doesn't make any guesses as to how it should
behave outside of what gcov documents. If we decide this should be
cross platform later, we can consider the compatibility implications
then.

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

10 years agoARM: fix fast-isel assertion failure
Tim Northover [Tue, 4 Feb 2014 10:38:46 +0000 (10:38 +0000)]
ARM: fix fast-isel assertion failure

Missing braces on if meant we inserted both ARM and Thumb load for a litpool
entry. This didn't end well.

rdar://problem/15959157

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

10 years ago[CMake] Revert r200695 and fix the problem with missing -fno-function-sections in...
Alexey Samsonov [Tue, 4 Feb 2014 08:15:46 +0000 (08:15 +0000)]
[CMake] Revert r200695 and fix the problem with missing -fno-function-sections in a different way.

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

10 years ago[CMake] Add -stdlib=libc++ to host Clang build flags before performing any header...
Alexey Samsonov [Tue, 4 Feb 2014 07:55:18 +0000 (07:55 +0000)]
[CMake] Add -stdlib=libc++ to host Clang build flags before performing any header search

If LLVM_ENABLE_LIBCXX is specified, we should append -stdlib=libc++ to build
flags as early as possible, in particular, before we check for header presence
(as -stdlib=libc++ modifies header lookup rules). Otherwise we can find a header
at configure time (w/o -stdlib=libc++) but fail to find it at build time
(with -stdlib=libc++). See PR18569 for more details.

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

10 years agoR600/SI: Fix fneg for 0.0
Michel Danzer [Tue, 4 Feb 2014 07:12:38 +0000 (07:12 +0000)]
R600/SI: Fix fneg for 0.0

V_ADD_F32 with source modifier does not produce -0.0 for this. Just
manipulate the sign bit directly instead.

Also add a pattern for (fneg (fabs ...)).

Fixes a bunch of bit encoding piglit tests with radeonsi.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200743 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agollvm-cov: Implement the object-directory flag
Justin Bogner [Tue, 4 Feb 2014 06:41:43 +0000 (06:41 +0000)]
llvm-cov: Implement the object-directory flag

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

10 years agollvm-cov: Ignore missing .gcda files
Justin Bogner [Tue, 4 Feb 2014 06:41:39 +0000 (06:41 +0000)]
llvm-cov: Ignore missing .gcda files

When gcov is run without gcda data, it acts as if the counts are all
zero and labels the file as - to indicate that there was no data. We
should do the same.

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

10 years agollvm-cov: Document the llvm-cov tests
Justin Bogner [Tue, 4 Feb 2014 06:41:33 +0000 (06:41 +0000)]
llvm-cov: Document the llvm-cov tests

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

10 years agoRegAllocGreedy.cpp: Use more simple value as Hysteresis, to suppress -mfpmath-depende...
NAKAMURA Takumi [Tue, 4 Feb 2014 06:29:38 +0000 (06:29 +0000)]
RegAllocGreedy.cpp: Use more simple value as Hysteresis, to suppress -mfpmath-dependent behavior.

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

10 years agoRevert: ARM: Enable use of relocation type tlsldo in debug info for tls data.
Kai Nacke [Tue, 4 Feb 2014 06:07:00 +0000 (06:07 +0000)]
Revert: ARM: Enable use of relocation type tlsldo in debug info for tls data.

There seems to be a new problem with the debug info in the test case.
I'll have to investigate this.

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

10 years agoAdd strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls
Kai Nacke [Tue, 4 Feb 2014 05:55:16 +0000 (05:55 +0000)]
Add strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls

Add the missing transformation strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls
and remove the ToDo comment.

Reviewer: Duncan P.N. Exan Smith

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

10 years agoARM: Enable use of relocation type tlsldo in debug info for tls data.
Kai Nacke [Tue, 4 Feb 2014 05:43:09 +0000 (05:43 +0000)]
ARM: Enable use of relocation type tlsldo in debug info for tls data.

This fixes PR18554.

Reviewers: Renato Golin, Keith Walker

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

10 years agoDebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero...
David Blaikie [Tue, 4 Feb 2014 01:23:52 +0000 (01:23 +0000)]
DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0}

A bunch of test cases needed to be cleaned up for this, many my fault -
when implementid imported modules I updated test cases by simply
duplicating the prior metadata field - which wasn't always the empty
metadata entry.

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

10 years agoRevert r200150, "[CMake] tablegen(): Use -I <dir> according to the list by include_di...
NAKAMURA Takumi [Tue, 4 Feb 2014 01:17:12 +0000 (01:17 +0000)]
Revert r200150, "[CMake] tablegen(): Use -I <dir> according to the list by include_directories()."

It missed include/llvm/Target. Could I avoid GLOB_RECURSE anyways? :(
FYI, I intended to prune ${LLVM_MAIN_INCLUDE_DIR} in TableGen.cmake in r200150.

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

10 years agoMove error handling down to getSymbolNMTypeChar.
Rafael Espindola [Tue, 4 Feb 2014 00:21:18 +0000 (00:21 +0000)]
Move error handling down to getSymbolNMTypeChar.

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

10 years agoSelf-memcpy-elision and memcpy of constant byte to memset transforms don't care how...
Nick Lewycky [Tue, 4 Feb 2014 00:18:54 +0000 (00:18 +0000)]
Self-memcpy-elision and memcpy of constant byte to memset transforms don't care how many bytes you were trying to transfer. Sink that safety test after those transforms. Noticed by inspection.

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

10 years agoDIBuilder: simplify array generation to produce true zero-length arrays
David Blaikie [Mon, 3 Feb 2014 23:08:54 +0000 (23:08 +0000)]
DIBuilder: simplify array generation to produce true zero-length arrays

For some anachronistic reason we were producing {i32 0} for zero-length
debug info arrays.

(this change is paired with a Clang change and may cause temporary
buildbot noise)

Let's not.

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

10 years agoAdd DEBUG_TYPE to SIAnnotateControlFlow
Matt Arsenault [Mon, 3 Feb 2014 22:58:05 +0000 (22:58 +0000)]
Add DEBUG_TYPE to SIAnnotateControlFlow

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

10 years agoinalloca: Don't remove dead arguments in the presence of inalloca args
Reid Kleckner [Mon, 3 Feb 2014 20:42:49 +0000 (20:42 +0000)]
inalloca: Don't remove dead arguments in the presence of inalloca args

It disturbs the layout of the parameters in memory and registers,
leading to problems in the backend.

The plan for optimizing internal inalloca functions going forward is to
essentially SROA the argument memory and demote any captured arguments
(things that aren't trivially written by a load or store) to an indirect
pointer to a static alloca.

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

10 years agoAArch64 & ARM: refactor crypto intrinsics to take scalars
Tim Northover [Mon, 3 Feb 2014 17:27:49 +0000 (17:27 +0000)]
AArch64 & ARM: refactor crypto intrinsics to take scalars

Some of the SHA instructions take a scalar i32 as one argument (largely because
they work on 160-bit hash fragments). This wasn't reflected in the IR
previously, with ARM and AArch64 choosing different types (<4 x i32> and <1 x
i32> respectively) which was ugly.

This makes all the affected intrinsics take a uniform "i32", allowing them to
become non-polymorphic at the same time.

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

10 years agoExpand vector bswap in LegalizeVectorOps
Hal Finkel [Mon, 3 Feb 2014 17:27:25 +0000 (17:27 +0000)]
Expand vector bswap in LegalizeVectorOps

ISD::BSWAP was missing from the list of node types that should be expanded
element-wise.

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

10 years agoUndef'ing _WIN32_IE to silence an MSVC warning about redefining a macro value.
Aaron Ballman [Mon, 3 Feb 2014 17:20:26 +0000 (17:20 +0000)]
Undef'ing _WIN32_IE to silence an MSVC warning about redefining a macro value.

No functional change intended.

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

10 years agoAdd a note about Clang+LLVM on Sparc64.
Venkatraman Govindaraju [Mon, 3 Feb 2014 15:28:26 +0000 (15:28 +0000)]
Add a note about Clang+LLVM on Sparc64.

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

10 years agoRemove outdated & incorrect part of comment.
Eli Bendersky [Mon, 3 Feb 2014 14:33:51 +0000 (14:33 +0000)]
Remove outdated & incorrect part of comment.

This comment was copied over from another class in r34170, where it made sense.

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

10 years agoDon't use -ffunction-sections if -fno-function-sections is not supported in the compiler.
Evgeniy Stepanov [Mon, 3 Feb 2014 13:57:09 +0000 (13:57 +0000)]
Don't use -ffunction-sections if -fno-function-sections is not supported in the compiler.

This will disable -ffunction-sections in older versions of Clang where it
breaks build of sanitizer runtime library.

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

10 years agoIntroduce SmallPtrSetImpl<T *> which allows insert, erase, count, and
Chandler Carruth [Mon, 3 Feb 2014 11:24:21 +0000 (11:24 +0000)]
Introduce SmallPtrSetImpl<T *> which allows insert, erase, count, and
iteration. This alows the majority of operations to be performed without
encoding a specific small size. It follows the model of
SmallVectorImpl<T>.

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

10 years agoRename the non-templated base class of SmallPtrSet to
Chandler Carruth [Mon, 3 Feb 2014 11:24:18 +0000 (11:24 +0000)]
Rename the non-templated base class of SmallPtrSet to
'SmallPtrSetImplBase'. This more closely matches the organization of
SmallVector and should allow introducing a SmallPtrSetImpl which serves
the same purpose as SmallVectorImpl: isolating the element type from the
particular small size chosen. This in turn allows a lot of
simplification of APIs by not coding them against a specific small size
which is rarely needed.

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

10 years agoRemove unnecessary include of AArch64GenInstrInfo.inc from AArch64Disassembler.cpp...
Craig Topper [Mon, 3 Feb 2014 06:33:17 +0000 (06:33 +0000)]
Remove unnecessary include of AArch64GenInstrInfo.inc from AArch64Disassembler.cpp. None of the GET_ defines were set that would make the include do anything.

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

10 years agoLower llvm.expect intrinsic correctly for i1
Duncan P. N. Exon Smith [Sun, 2 Feb 2014 22:43:55 +0000 (22:43 +0000)]
Lower llvm.expect intrinsic correctly for i1

LowerExpectIntrinsic previously only understood the idiom of an expect
intrinsic followed by a comparison with zero. For llvm.expect.i1, the
comparison would be stripped by the early-cse pass.

Patch by Daniel Micay.

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

10 years agoUnaligned access is supported on ARMv6 and ARMv7 for the NetBSD target.
Joerg Sonnenberger [Sun, 2 Feb 2014 21:18:36 +0000 (21:18 +0000)]
Unaligned access is supported on ARMv6 and ARMv7 for the NetBSD target.
Patch from Matt Thomas.

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