platform/upstream/llvm.git
10 years agoARM: add __aeabi_d2h for truncation on AEABI systems
Tim Northover [Tue, 29 Jul 2014 09:56:45 +0000 (09:56 +0000)]
ARM: add __aeabi_d2h for truncation on AEABI systems

ARM does actually define the name for this conversion, so we should use it on
"-eabi" platforms.

llvm-svn: 214176

10 years agoARM: fix @llvm.convert.from.fp16 on softfloat targets.
Tim Northover [Tue, 29 Jul 2014 09:56:38 +0000 (09:56 +0000)]
ARM: fix @llvm.convert.from.fp16 on softfloat targets.

We need to make sure we use the softened version of all appropriate operands in
the libcall, or things go horribly wrong. This may entail actually executing a
1-stage softening.

llvm-svn: 214175

10 years agoUseListShuffleVector::~UseListShuffleVector(): Fix inappropriate delete. It should...
NAKAMURA Takumi [Tue, 29 Jul 2014 09:54:35 +0000 (09:54 +0000)]
UseListShuffleVector::~UseListShuffleVector(): Fix inappropriate delete. It should be delete[].

llvm-svn: 214174

10 years agoAArch64: Resolve some FIXMEs in CGBuiltin left over from backend merge
Yi Kong [Tue, 29 Jul 2014 09:25:17 +0000 (09:25 +0000)]
AArch64: Resolve some FIXMEs in CGBuiltin left over from backend merge

Merge vrshr_n_v and vqshlu_n_v with ARM.

Remove FIXME comments for others as they can't actually be shared.

NFC.

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

llvm-svn: 214173

10 years ago[OPENMP] Additional comments for implicit 'flush' clause + removed unused parameter...
Alexey Bataev [Tue, 29 Jul 2014 09:17:39 +0000 (09:17 +0000)]
[OPENMP] Additional comments for implicit 'flush' clause + removed unused parameter from method classof().

llvm-svn: 214172

10 years ago[Refactor] Adjust some comments
Johannes Doerfert [Tue, 29 Jul 2014 09:16:55 +0000 (09:16 +0000)]
[Refactor] Adjust some comments

llvm-svn: 214171

10 years agoAssume no annotations when visiting new domain (IslAst)
Johannes Doerfert [Tue, 29 Jul 2014 08:59:56 +0000 (08:59 +0000)]
Assume no annotations when visiting new domain (IslAst)

  Whe we build the IslAst we visit for nodes (in pre and post order) as well as
  user/domain nodes. As these two sets are non overlapping we do not need to
  check if we annotated a node earlier when we visit it.

llvm-svn: 214170

10 years agoAdded base array id's to Memory Accesses
Johannes Doerfert [Tue, 29 Jul 2014 08:37:55 +0000 (08:37 +0000)]
Added base array id's to Memory Accesses

  These id's allow us to cread id -> array base value mappings.

llvm-svn: 214169

10 years ago[Refactor] Use non-const MemoryAccess base addresses
Johannes Doerfert [Tue, 29 Jul 2014 08:36:18 +0000 (08:36 +0000)]
[Refactor] Use non-const MemoryAccess base addresses

llvm-svn: 214168

10 years ago[autoconf] Fixup s/3.5/3.6/. Clang's ident was 3.5.0svn in autoconf build.
NAKAMURA Takumi [Tue, 29 Jul 2014 08:35:03 +0000 (08:35 +0000)]
[autoconf] Fixup s/3.5/3.6/. Clang's ident was 3.5.0svn in autoconf build.

llvm-svn: 214167

10 years ago[Refactor] Adjust some comments
Johannes Doerfert [Tue, 29 Jul 2014 08:35:00 +0000 (08:35 +0000)]
[Refactor] Adjust some comments

llvm-svn: 214166

10 years ago[Refactor] Remove unused MemoryAccess constructor
Johannes Doerfert [Tue, 29 Jul 2014 08:34:03 +0000 (08:34 +0000)]
[Refactor] Remove unused MemoryAccess constructor

llvm-svn: 214165

10 years ago3.5 => 3.6
Sylvestre Ledru [Tue, 29 Jul 2014 07:07:31 +0000 (07:07 +0000)]
3.5 => 3.6

llvm-svn: 214164

10 years agoRevert "Emit column debug information for loads"
Tobias Grosser [Tue, 29 Jul 2014 06:53:14 +0000 (06:53 +0000)]
Revert "Emit column debug information for loads"

This broke the following gdb tests:

gdb.base__annota1.exp
gdb.base__consecutive.exp
gdb.python__py-symtab.exp
gdb.reverse__consecutive-precsave.exp
gdb.reverse__consecutive-reverse.exp

I will look into this.

This reverts commit 214162.

llvm-svn: 214163

10 years agoEmit column debug information for loads
Tobias Grosser [Tue, 29 Jul 2014 06:10:47 +0000 (06:10 +0000)]
Emit column debug information for loads

This allows us to give more precise diagnostics.

Diego kindly tested the impact on debug info size: "The increase on average
debug sizes is 0.1%. The total file size increase is ~0%."

llvm-svn: 214162

10 years agoFix compile error on Windows.
Zachary Turner [Tue, 29 Jul 2014 05:39:21 +0000 (05:39 +0000)]
Fix compile error on Windows.

A piece of a future patch accidentally made it in, this simply
fixes the error.

llvm-svn: 214161

10 years agoImplement AArch64 TTI interface isAsCheapAsAMove.
Jiangning Liu [Tue, 29 Jul 2014 02:09:26 +0000 (02:09 +0000)]
Implement AArch64 TTI interface isAsCheapAsAMove.

llvm-svn: 214159

10 years agoAdd TargetInstrInfo interface isAsCheapAsAMove.
Jiangning Liu [Tue, 29 Jul 2014 01:55:19 +0000 (01:55 +0000)]
Add TargetInstrInfo interface isAsCheapAsAMove.

llvm-svn: 214158

10 years agoBitcode: Correctly compare a Use against itself
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:13:56 +0000 (01:13 +0000)]
Bitcode: Correctly compare a Use against itself

Fix the sort of expected order in the reader to correctly return `false`
when comparing a `Use` against itself.

This was caught by test/Bitcode/binaryIntInstructions.3.2.ll, so I'm
adding a `RUN` line using `llvm-uselistorder` for every test in
`test/Bitcode` that passes.

A few tests still fail, so I'll investigate those next.

This is part of PR5680.

llvm-svn: 214157

10 years agoFix line-endings, NFC
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:10:57 +0000 (01:10 +0000)]
Fix line-endings, NFC

A follow-up commit is adding a RUN line to each of these tests, so fix
the line endings first.  This is a whitespace-only change.

llvm-svn: 214156

10 years agoIR: Augment debug statements for use-list order
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:09:46 +0000 (01:09 +0000)]
IR: Augment debug statements for use-list order

llvm-svn: 214155

10 years ago[modules] Add testcase for a bug reduced from a selfhost issue. This bug was
Richard Smith [Tue, 29 Jul 2014 00:58:01 +0000 (00:58 +0000)]
[modules] Add testcase for a bug reduced from a selfhost issue. This bug was
never present in Clang trunk, but was present in some of my development work,
and it seems like a useful test to have.

llvm-svn: 214154

10 years agoRevert accidentally-committed files in r214151.
Richard Smith [Tue, 29 Jul 2014 00:54:09 +0000 (00:54 +0000)]
Revert accidentally-committed files in r214151.

llvm-svn: 214152

10 years ago[modules] Add missing #include, found by modules build. We need a class
Richard Smith [Tue, 29 Jul 2014 00:51:47 +0000 (00:51 +0000)]
[modules] Add missing #include, found by modules build. We need a class
definition in order to apply isa<...>.

llvm-svn: 214151

10 years agoDelete dead code.
Rafael Espindola [Tue, 29 Jul 2014 00:38:55 +0000 (00:38 +0000)]
Delete dead code.

It was added 12 years ago, but never used (and in the case of sort, never
implemented).

llvm-svn: 214150

10 years ago[UBSan] Try to enable pipefail in UBSan lit tests to make them behave more predictably
Alexey Samsonov [Tue, 29 Jul 2014 00:30:01 +0000 (00:30 +0000)]
[UBSan] Try to enable pipefail in UBSan lit tests to make them behave more predictably

llvm-svn: 214149

10 years agoFix up handling of ARM options for controlling strict alignment.
Bob Wilson [Tue, 29 Jul 2014 00:23:18 +0000 (00:23 +0000)]
Fix up handling of ARM options for controlling strict alignment.

The -mstrict-align option was originally added in r167619 as a target-
independent option. It was then changed in r167623 to be implemented with an
ARM-specific backend option, even though the code remained in the
target-independent Clang::ConstructJob function. This means that if you used
the -mstrict-align option with a non-ARM target, you would still get the
-arm-strict-align option getting passed to the backend, which was harmless
but gross. The driver option was then replaced by the GCC-compatible
-m[no-]unaligned-access option (r189175) and modified to work with AArch64
(r208075). However, in the process, the help text for -mstrict-align was
incorrectly changed to show it as only being supported for AArch64. Even worse,
the logic for handling these options together with -mkernel was wrong for
AArch64, where -mkernel does not currently imply strict alignment.

This patch fixes up all of those things. Besides the obvious change to the
option help text, it moves the logic into the ARM and AArch64-specific parts
of the driver, so that the option will be correctly ignored for non-ARM
targets. <rdar://problem/17823697>

llvm-svn: 214148

10 years agoFix typos / grammar.
Matt Arsenault [Tue, 29 Jul 2014 00:02:40 +0000 (00:02 +0000)]
Fix typos / grammar.

llvm-svn: 214147

10 years agoFix header including itself
Matt Arsenault [Tue, 29 Jul 2014 00:02:37 +0000 (00:02 +0000)]
Fix header including itself

llvm-svn: 214146

10 years ago[mach-o] fix non-debug warnings
Nick Kledzik [Mon, 28 Jul 2014 23:40:26 +0000 (23:40 +0000)]
[mach-o] fix non-debug warnings

llvm-svn: 214145

10 years agollvm-uselistorder: Add -num-shuffles option
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 23:25:21 +0000 (23:25 +0000)]
llvm-uselistorder: Add -num-shuffles option

llvm-svn: 214144

10 years agoTweak llvm-nm’s -undefined-only (aka -u) printing for Mach-O files
Kevin Enderby [Mon, 28 Jul 2014 23:17:38 +0000 (23:17 +0000)]
Tweak llvm-nm’s -undefined-only (aka -u) printing for Mach-O files
to just print the symbol name.  So it matches darwin’s nm(1) -u option.

llvm-svn: 214143

10 years agoClean up testing cases.
Manman Ren [Mon, 28 Jul 2014 23:16:05 +0000 (23:16 +0000)]
Clean up testing cases.

llvm-svn: 214142

10 years agoAdd a location to MS inline asm blobs
Reid Kleckner [Mon, 28 Jul 2014 23:12:59 +0000 (23:12 +0000)]
Add a location to MS inline asm blobs

This isn't nearly as elaborate as the GCC inline asm which emits an
array of source locations, but it's very, very hard to trigger backend
diagnostics in MS inline asm because we parse it up front with good
source information, unlike GCC inline asm.

Currently I can trigger a "inline assembly requires more registers than
available" diagnostic with this code:

  void foo();
  void bar() {
    __asm pusha
    __asm call foo
    __asm popa
  }

However, if I committed that as a test case, I would have to remove it
once I fix PR20052.

llvm-svn: 214141

10 years ago[mach-o] Implement interworking between thumb and arm code
Nick Kledzik [Mon, 28 Jul 2014 23:06:09 +0000 (23:06 +0000)]
[mach-o] Implement interworking between thumb and arm code

All iOS arm processor support switching between arm and thumb mode at call sites
by using the BLX instruction (instead of BL).  But the compiler does not know
the implementation mode for extern functions, so the linker must update BL/BLX
instructions to match what is linked is actually linked together.  In addition,
pointers to functions (such as vtables) must have the low bit set if the target
of the pointer is a thumb mode function.

llvm-svn: 214140

10 years ago[Debug Info] unique MDNodes in the enum types of each compile unit.
Manman Ren [Mon, 28 Jul 2014 23:04:20 +0000 (23:04 +0000)]
[Debug Info] unique MDNodes in the enum types of each compile unit.

The enum types array by design contains pointers to MDNodes rather than DIRefs.
Unique them when handling the enum types in DwarfDebug.

rdar://17628609

llvm-svn: 214139

10 years agoFixup TestStepNoDebug to cleanup properly on shutdown.
Todd Fiala [Mon, 28 Jul 2014 22:53:49 +0000 (22:53 +0000)]
Fixup TestStepNoDebug to cleanup properly on shutdown.

This was causing core dumps on MacOSX and was not properly
cleaning up the state of the inferior before exiting.

The test was overriding def tearDown(), but failed to
call the base class after doing its own cleanup.  This
essentially eliminated normal clean-up activity.

llvm-svn: 214138

10 years agoRemove extra ; in testing case.
Manman Ren [Mon, 28 Jul 2014 22:46:46 +0000 (22:46 +0000)]
Remove extra ; in testing case.

llvm-svn: 214137

10 years agoRemove a nonsense friend declaration.
Richard Smith [Mon, 28 Jul 2014 22:42:21 +0000 (22:42 +0000)]
Remove a nonsense friend declaration.

llvm-svn: 214136

10 years agoIR: Optimize size of use-list order shuffle vectors
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 22:41:50 +0000 (22:41 +0000)]
IR: Optimize size of use-list order shuffle vectors

Since we're storing lots of these, save two-pointers per vector with a
custom type rather than using the relatively heavy `SmallVector`.

Part of PR5680.

llvm-svn: 214135

10 years ago[PECOFF] Fix failing test.
Rui Ueyama [Mon, 28 Jul 2014 22:31:37 +0000 (22:31 +0000)]
[PECOFF] Fix failing test.

This should be covered by the Driver's unit tests.

llvm-svn: 214134

10 years ago[Debug Info] add DISubroutineType and its creation takes DITypeArray.
Manman Ren [Mon, 28 Jul 2014 22:24:34 +0000 (22:24 +0000)]
[Debug Info] add DISubroutineType and its creation takes DITypeArray.

This is the last patch to unique the type array of a subroutine type.
This is the paired commit with llvm r214132.

llvm-svn: 214133

10 years ago[Debug Info] add DISubroutineType and its creation takes DITypeArray.
Manman Ren [Mon, 28 Jul 2014 22:24:06 +0000 (22:24 +0000)]
[Debug Info] add DISubroutineType and its creation takes DITypeArray.

DITypeArray is an array of DITypeRef, at its creation, we will create
DITypeRef (i.e use the identifier if the type node has an identifier).

This is the last patch to unique the type array of a subroutine type.

rdar://17628609

llvm-svn: 214132

10 years agoUpdate LLVM version: 3.5 => 3.6
Hans Wennborg [Mon, 28 Jul 2014 22:10:52 +0000 (22:10 +0000)]
Update LLVM version: 3.5 => 3.6

We branched 3.5, it's now time to work on 3.6.

This is Sylvestre's patch from [1] plus regenerated configure
file by me, and minus the release notes reset, which Sean
pointed out [2] should happen later.

 1. http://reviews.llvm.org/D4660
 2. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140721/111137.html

llvm-svn: 214131

10 years agoExclude ASM from CompilerRT languages as an attempt to fix CMake failure in standalon...
Alexey Samsonov [Mon, 28 Jul 2014 22:04:19 +0000 (22:04 +0000)]
Exclude ASM from CompilerRT languages as an attempt to fix CMake failure in standalone mode

llvm-svn: 214130

10 years agoRegenerate autoconf, previous updates to the configury haven't
Eric Christopher [Mon, 28 Jul 2014 22:00:44 +0000 (22:00 +0000)]
Regenerate autoconf, previous updates to the configury haven't
been updating configure.

llvm-svn: 214129

10 years agollvm-uselistorder: Get it building in configure+make after r214125
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:47:40 +0000 (21:47 +0000)]
llvm-uselistorder: Get it building in configure+make after r214125

Somehow this wasn't being built before (only noticed now since the test
was XFAILed).

llvm-svn: 214128

10 years agoBitcode: Serialize (and recover) use-list order
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:19:41 +0000 (21:19 +0000)]
Bitcode: Serialize (and recover) use-list order

Predict and serialize use-list order in bitcode.  This makes the option
`-preserve-bc-use-list-order` work *most* of the time, but this is still
experimental.

  - Builds a full value-table up front in the writer, sets up a list of
    use-list orders to write out, and discards the table.  This is a
    simpler first step than determining the order from the various
    overlapping IDs of values on-the-fly.

  - The shuffles stored in the use-list order list have an unnecessarily
    large memory footprint.

  - `blockaddress` expressions cause functions to be materialized
    out-of-order.  For now I've ignored this problem, so use-list orders
    will be wrong for constants used by functions that have block
    addresses taken.  There are a couple of ways to fix this, but I
    don't have a concrete plan yet.

  - When materializing functions lazily, the use-lists for constants
    will not be correct.  This use case is out of scope: what should the
    use-list order be, if it's incomplete?

This is part of PR5680.

llvm-svn: 214125

10 years ago[modules] PR20475: merging support for alias template declarations.
Richard Smith [Mon, 28 Jul 2014 21:16:37 +0000 (21:16 +0000)]
[modules] PR20475: merging support for alias template declarations.

llvm-svn: 214124

10 years agollvm-uselistorder: Add -save-temps option
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:12:19 +0000 (21:12 +0000)]
llvm-uselistorder: Add -save-temps option

This is part of PR5680.

llvm-svn: 214123

10 years agollvm-uselistorder: Check the correct flag for assembly
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:12:17 +0000 (21:12 +0000)]
llvm-uselistorder: Check the correct flag for assembly

This is part of PR5680.

llvm-svn: 214122

10 years agoIR: Expose Module::rbegin() and rend()
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:09:32 +0000 (21:09 +0000)]
IR: Expose Module::rbegin() and rend()

A follow-up commit for PR5680 needs to visit functions in reverse order.
Expose iterators to allow that.

llvm-svn: 214121

10 years agoChange __INTx_TYPE__ to be always signed. This changes the value for
Joerg Sonnenberger [Mon, 28 Jul 2014 21:06:22 +0000 (21:06 +0000)]
Change __INTx_TYPE__ to be always signed. This changes the value for
char-based types from "char" to "signed char". Adjust stdint.h to use
__INTx_TYPE__ directly without prefixing it with signed and to use
__UINTx_TYPE__ for unsigned ones.

The value of __INTx_TYPE__ now matches GCC.

llvm-svn: 214119

10 years ago[MCJIT] Remove extraneous parentheses in test case.
Lang Hames [Mon, 28 Jul 2014 21:00:48 +0000 (21:00 +0000)]
[MCJIT] Remove extraneous parentheses in test case.

llvm-svn: 214117

10 years agoTest the linker plugin handling of llvm.used.
Rafael Espindola [Mon, 28 Jul 2014 20:42:29 +0000 (20:42 +0000)]
Test the linker plugin handling of llvm.used.

llvm-svn: 214116

10 years ago[Debug Info] add a template class DITypedArray.
Manman Ren [Mon, 28 Jul 2014 19:33:20 +0000 (19:33 +0000)]
[Debug Info] add a template class DITypedArray.

Typedef DIArray to DITypedArray<DIDescriptor>. Also typedef DITypeArray as
DITypedArray<DITypeRef>.

This is the third of a series of patches to handle type uniqueing of the
type array for a subroutine type.

This commit should have no functionality change.

llvm-svn: 214115

10 years agoFix linking with just-built libc++abi (added in r214037).
Alexey Samsonov [Mon, 28 Jul 2014 19:25:44 +0000 (19:25 +0000)]
Fix linking with just-built libc++abi (added in r214037).

Pass target name ("cxxabi") to target_link_libraries(cxx ...) to ensure
that linker is able to locate just-built libc++abi in the build tree,
instead of relying on "-lc++abi" linker flag.

llvm-svn: 214114

10 years ago[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
Manman Ren [Mon, 28 Jul 2014 19:14:41 +0000 (19:14 +0000)]
[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.

This is the paired commit with llvm r214112.

llvm-svn: 214113

10 years ago[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
Manman Ren [Mon, 28 Jul 2014 19:14:13 +0000 (19:14 +0000)]
[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.

This is the second of a series of patches to handle type uniqueing of the
type array for a subroutine type.

For vector and array types, getElements returns the array of subranges, so it
is a better name than getTypeArray. Even for class, struct and enum types,
getElements returns the members, which can be subprograms.

setArrays can set up to two arrays, the second is the templates.

This commit should have no functionality change.

llvm-svn: 214112

10 years ago[Debug Info] replace DIUnspecifiedParameter with DITrivialType.
Manman Ren [Mon, 28 Jul 2014 18:52:30 +0000 (18:52 +0000)]
[Debug Info] replace DIUnspecifiedParameter with DITrivialType.

This is the first of a series of patches to handle type uniqueing of the
type array for a subroutine type.

This commit makes sure unspecified_parameter is a DIType to enable converting
the type array for a subroutine type to an array of DITypes.

This commit should have no functionality change. With this commit, we may
change unspecified type to be a DITrivialType instead of a DIType.

llvm-svn: 214111

10 years agoAdd another keyword-selection flag to CorrectionCandidateCallback.
Kaelyn Takata [Mon, 28 Jul 2014 18:14:02 +0000 (18:14 +0000)]
Add another keyword-selection flag to CorrectionCandidateCallback.

The new flag, WantFunctionLikeCasts, covers a subset of the keywords
covered by WantTypeSpecifiers that can be used in casts that look like
function calls, e.g. "return long(5);", while excluding the keywords
like "enum" and "const" that would be included when WantTypeSpecifiers
is true but cannot be used in something that looks like a function call.

llvm-svn: 214109

10 years agoR600: Modernize test
Matt Arsenault [Mon, 28 Jul 2014 18:06:08 +0000 (18:06 +0000)]
R600: Modernize test

llvm-svn: 214108

10 years agollvm-cov: move the gcov code into a separate file.
Alex Lorenz [Mon, 28 Jul 2014 18:03:51 +0000 (18:03 +0000)]
llvm-cov: move the gcov code into a separate file.

The gcov compatible code is moved to its own file and
llvm-cov is updated to be a wrapper that always calls
the gcov main function.

llvm-svn: 214107

10 years agoR600/SI: Fix return type for isMIMG / isSMRD
Matt Arsenault [Mon, 28 Jul 2014 17:59:38 +0000 (17:59 +0000)]
R600/SI: Fix return type for isMIMG / isSMRD

All the others use bool, so these should too.

llvm-svn: 214106

10 years ago[SDAG] Add DEBUG logging to the legalizer, fixing a "bug" found by
Chandler Carruth [Mon, 28 Jul 2014 17:55:07 +0000 (17:55 +0000)]
[SDAG] Add DEBUG logging to the legalizer, fixing a "bug" found by
inspection in the proccess, and shuffle the logging in the DAG combiner
around a bit.

With this it is much easier to follow what the legalizer is doing. It
should even accurately present most of the strange legalization
operations where a single node is replaced by multiple nodes, etc. There
is still some information lost (we log SDNodes not SDValues so we don't
log which result is used for which thing), but I think this is much
closer to a usable system. Notably, this will make it *much* more
apparant when legalization is actually happening inside the combiner, or
when there is a cycle caused by interactions of the legalizer and the
combiner.

The "bug" I fixed here I'm not sure is remotely possible to trigger. We
were only adding one of the nodes in a replacement to the updated set
rather than all of the nodes in the replacement. Realistically, the
worst result of this are nodes not getting back onto the worklist in the
DAG combiner. I doubt it is possible to trigger this today, and
I certainly don't have any ideas about how, but this at least brings the
code into alignment with the principled operation of the routine.

llvm-svn: 214105

10 years agoR600/SI: Implement getOptimalMemOpType
Matt Arsenault [Mon, 28 Jul 2014 17:49:26 +0000 (17:49 +0000)]
R600/SI: Implement getOptimalMemOpType

The default guess uses i32. This needs an address space argument
to really do the right thing in all cases.

llvm-svn: 214104

10 years agoFix MSVC warnings about falling off the end of a non-void function
Reid Kleckner [Mon, 28 Jul 2014 17:48:12 +0000 (17:48 +0000)]
Fix MSVC warnings about falling off the end of a non-void function

llvm-svn: 214103

10 years agoAdd tests for the various emit-llvm plugin options.
Rafael Espindola [Mon, 28 Jul 2014 17:37:25 +0000 (17:37 +0000)]
Add tests for the various emit-llvm plugin options.

llvm-svn: 214102

10 years agoR600/SI: Make argument loads invariant
Matt Arsenault [Mon, 28 Jul 2014 17:31:39 +0000 (17:31 +0000)]
R600/SI: Make argument loads invariant

llvm-svn: 214101

10 years agoUpdate comment
Matt Arsenault [Mon, 28 Jul 2014 17:31:37 +0000 (17:31 +0000)]
Update comment

llvm-svn: 214100

10 years ago[AVX512] Add non-masking FP store intrinsics
Adam Nemet [Mon, 28 Jul 2014 17:14:45 +0000 (17:14 +0000)]
[AVX512] Add non-masking FP store intrinsics

Part of <rdar://problem/17688758>

llvm-svn: 214099

10 years ago[AVX512] Add FP add/sub/mul intrinsics
Adam Nemet [Mon, 28 Jul 2014 17:14:42 +0000 (17:14 +0000)]
[AVX512] Add FP add/sub/mul intrinsics

Part of <rdar://problem/17688758>

llvm-svn: 214098

10 years ago[AVX512] Reorder functions in avx512fintrin.h
Adam Nemet [Mon, 28 Jul 2014 17:14:40 +0000 (17:14 +0000)]
[AVX512] Reorder functions in avx512fintrin.h

There is no functional change here.

The idea is to have a similar order and categories of functions that we have
in avxintrin.h.

llvm-svn: 214097

10 years ago[AVX512] Bring the formatting of avx512fintrin.h closer to avxintrin.h
Adam Nemet [Mon, 28 Jul 2014 17:14:38 +0000 (17:14 +0000)]
[AVX512] Bring the formatting of avx512fintrin.h closer to avxintrin.h

llvm-svn: 214096

10 years ago[AVX512] Add CHECK-LABELs to test/CodeGen/avx512f-builtins.c
Adam Nemet [Mon, 28 Jul 2014 17:14:36 +0000 (17:14 +0000)]
[AVX512] Add CHECK-LABELs to test/CodeGen/avx512f-builtins.c

llvm-svn: 214095

10 years agoTeach LLDB about Windows processes.
Zachary Turner [Mon, 28 Jul 2014 16:45:18 +0000 (16:45 +0000)]
Teach LLDB about Windows processes.

This patch creates a simple ProcessWindows process plugin.
The only thing it knows how to do currently is create processes.

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

llvm-svn: 214094

10 years agoUse llvm Support functions to get the user's home directory.
Zachary Turner [Mon, 28 Jul 2014 16:45:05 +0000 (16:45 +0000)]
Use llvm Support functions to get the user's home directory.

Assuming that the user's home directory is at ~ is incorrect on
Windows.  This patch delegates the request to LLVM's support
library, which already provides a cross-platform implementation
of this function.

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

llvm-svn: 214093

10 years agoFix supported architectures on PlatformWindows.
Zachary Turner [Mon, 28 Jul 2014 16:44:49 +0000 (16:44 +0000)]
Fix supported architectures on PlatformWindows.

i386, i486, i486sx, and i686 are all indistinguishable as far as
PE/COFF files are concerned.  This patch adds support for all of
these architectures to PlatformWindows.

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

llvm-svn: 214092

10 years agoFix the MSVC build. MSVC does not support constexpr.
Zachary Turner [Mon, 28 Jul 2014 16:44:28 +0000 (16:44 +0000)]
Fix the MSVC build.  MSVC does not support constexpr.

llvm-svn: 214091

10 years agoObjective-C. Improve diagnostic when property is
Fariborz Jahanian [Mon, 28 Jul 2014 16:35:45 +0000 (16:35 +0000)]
Objective-C. Improve diagnostic when property is
not auto synthesized in current implementation.
rdar://17774815

llvm-svn: 214090

10 years agoThread Safety Analysis: Replace the old and broken SExpr with the new
DeLesley Hutchins [Mon, 28 Jul 2014 15:57:27 +0000 (15:57 +0000)]
Thread Safety Analysis:  Replace the old and broken SExpr with the new
til::SExpr.  This is a large patch, with many small changes to pretty printing
and expression lowering to make the new SExpr representation equivalent in
functionality to the old.

llvm-svn: 214089

10 years agoFix PR#20471. Add a cast in __align_it to ensure that the bit twiddling is done at...
Marshall Clow [Mon, 28 Jul 2014 15:02:42 +0000 (15:02 +0000)]
Fix PR#20471. Add a cast in __align_it to ensure that the bit twiddling is done at the correct size. A better solution, IMHO, would be to declare vector<bool>::__bits_per_word as 'size_type', rather than 'unsigned', but that's a possible ABI change.

llvm-svn: 214088

10 years agoTest the mcpu option.
Rafael Espindola [Mon, 28 Jul 2014 14:44:33 +0000 (14:44 +0000)]
Test the mcpu option.

llvm-svn: 214087

10 years ago[TEST] Improve tests for #pragma clang optimize off/on
Dario Domizioli [Mon, 28 Jul 2014 14:33:17 +0000 (14:33 +0000)]
[TEST] Improve tests for #pragma clang optimize off/on

Added coverage for:
* More than one "off region" in the same file
* An "off region" falling off the end of an included file

llvm-svn: 214086

10 years ago[Mips] Remove redundant REQUIRES clause.
Simon Atanasyan [Mon, 28 Jul 2014 14:19:18 +0000 (14:19 +0000)]
[Mips] Remove redundant REQUIRES clause.
The exe-got.test test case is target independent.

llvm-svn: 214085

10 years agoclang-format: [proto] Improve formatting of text-proto options.
Daniel Jasper [Mon, 28 Jul 2014 14:08:09 +0000 (14:08 +0000)]
clang-format: [proto] Improve formatting of text-proto options.

Initial patch and tests by Kaushik Sridharan, thank you!

llvm-svn: 214084

10 years agotsan: add a useful debug check
Dmitry Vyukov [Mon, 28 Jul 2014 13:54:18 +0000 (13:54 +0000)]
tsan: add a useful debug check

llvm-svn: 214082

10 years ago[SKX] Enabling mask logic instructions: encoding, lowering
Robert Khasanov [Mon, 28 Jul 2014 13:46:45 +0000 (13:46 +0000)]
[SKX] Enabling mask logic instructions: encoding, lowering
Instructions: KAND{BWDQ}, KANDN{BWDQ}, KOR{BWDQ}, KXOR{BWDQ}, KXNOR{BWDQ}

Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>

llvm-svn: 214081

10 years agoEmit a warning if llvm_map_components_to_libraries() is used noting that its
Dan Liew [Mon, 28 Jul 2014 13:36:50 +0000 (13:36 +0000)]
Emit a warning if llvm_map_components_to_libraries() is used noting that its
use is deprecated in favour of llvm_map_components_to_libnames()

Although message(DEPRECATION "msg") would probably be a better fit this
does nothing if CMAKE_ERROR_DEPRECATED and CMAKE_WARNING_DEPRECATED are
both off, which is the default.

llvm-svn: 214078

10 years agoDocument the new LLVM CMake interface for building against LLVM
Dan Liew [Mon, 28 Jul 2014 13:36:37 +0000 (13:36 +0000)]
Document the new LLVM CMake interface for building against LLVM
libraries. With many contributions from Brad King.

llvm-svn: 214077

10 years agoFixed sphinx warning.
Dan Liew [Mon, 28 Jul 2014 13:33:51 +0000 (13:33 +0000)]
Fixed sphinx warning.

llvm-svn: 214076

10 years agoclang-format: Improve operator and template recognition.
Daniel Jasper [Mon, 28 Jul 2014 13:19:58 +0000 (13:19 +0000)]
clang-format: Improve operator and template recognition.

Before:
  static_assert(is_convertible < A &&, B > ::value, "AAA");

After:
  static_assert(is_convertible<A &&, B>::value, "AAA");

llvm-svn: 214075

10 years ago[PowerPC] Support ELFv1/ELFv2 ABI selection via -mabi= option
Ulrich Weigand [Mon, 28 Jul 2014 13:17:52 +0000 (13:17 +0000)]
[PowerPC] Support ELFv1/ELFv2 ABI selection via -mabi= option

While Clang now supports both ELFv1 and ELFv2 ABIs, their use is currently
hard-coded via the target triple: powerpc64-linux is always ELFv1, while
powerpc64le-linux is always ELFv2.

These are of course the most common scenarios, but in principle it is
possible to support the ELFv2 ABI on big-endian or the ELFv1 ABI on
little-endian systems (and GCC does support that), and there are some
special use cases for that (e.g. certain Linux kernel versions could
only be built using ELFv1 on LE).

This patch implements the Clang side of supporting this, based on the
LLVM commit 214072.  The command line options -mabi=elfv1 or -mabi=elfv2
select the desired ABI if present.  (If not, Clang uses the same default
rules as now.)

Specifically, the patch implements the following changes based on the
presence of the -mabi= option:

In the driver:
- Pass the appropiate -target-abi flag to the back-end
- Select the correct dynamic loader version (/lib64/ld64.so.[12])

In the preprocessor:
- Define _CALL_ELF to the appropriate value (1 or 2)

In the compiler back-end:
- Select the correct ABI in TargetInfo.cpp
- Select the desired ABI for LLVM via feature (elfv1/elfv2)

llvm-svn: 214074

10 years ago[PowerPC] Add testcase forgotten in the 214072 commit.
Ulrich Weigand [Mon, 28 Jul 2014 13:10:25 +0000 (13:10 +0000)]
[PowerPC] Add testcase forgotten in the 214072 commit.

llvm-svn: 214073

10 years ago[PowerPC] Support ELFv1/ELFv2 ABI selection via features
Ulrich Weigand [Mon, 28 Jul 2014 13:09:28 +0000 (13:09 +0000)]
[PowerPC] Support ELFv1/ELFv2 ABI selection via features

While LLVM now supports both ELFv1 and ELFv2 ABIs, their use is currently
hard-coded via the target triple: powerpc64-linux is always ELFv1, while
powerpc64le-linux is always ELFv2.

These are of course the most common scenarios, but in principle it is
possible to support the ELFv2 ABI on big-endian or the ELFv1 ABI on
little-endian systems (and GCC does support that), and there are some
special use cases for that (e.g. certain Linux kernel versions could
only be built using ELFv1 on LE).

This patch implements the LLVM side of supporting this.  As precedent
on other platforms suggests, ABI options are passed to the back-end as
features.  Thus, this patch implements two features "elfv1" and "elfv2"
that select the desired ABI if present.  (If not, the LLVM uses the
same default rules as now.)

llvm-svn: 214072

10 years agoclang-format: Improve pointer/reference detection.
Daniel Jasper [Mon, 28 Jul 2014 12:24:21 +0000 (12:24 +0000)]
clang-format: Improve pointer/reference detection.

Before (with left pointer alignment):
  void f(int i = 0, SomeType* *temps = NULL);

After:
  void f(int i = 0, SomeType** temps = NULL);

llvm-svn: 214071

10 years agoclang-format: Fix unary operator recognition.
Daniel Jasper [Mon, 28 Jul 2014 12:08:16 +0000 (12:08 +0000)]
clang-format: Fix unary operator recognition.

Before:
  int x = ~ * p;

After:
  int x = ~*p;

llvm-svn: 214070

10 years agoclang-format: Fix formatting of lock annotations in lambda definitions.
Daniel Jasper [Mon, 28 Jul 2014 12:08:06 +0000 (12:08 +0000)]
clang-format: Fix formatting of lock annotations in lambda definitions.

Before:
  SomeFunction([](int i)LOCKS_EXCLUDED(a) {});

After:
  SomeFunction([](int i) LOCKS_EXCLUDED(a) {});

llvm-svn: 214069

10 years agoDataflowWorklist.h: Appease msc17 -- Split a private constructor to DataflowWorklistBase.
NAKAMURA Takumi [Mon, 28 Jul 2014 11:33:49 +0000 (11:33 +0000)]
DataflowWorklist.h: Appease msc17 -- Split a private constructor to DataflowWorklistBase.

MSC17 isn't capable to invoke other constructors in its scope.

llvm-svn: 214067

10 years agoFactoring DataflowWorklist out of LiveVariables and UninitializedValues analyses
Artyom Skrobov [Mon, 28 Jul 2014 08:47:38 +0000 (08:47 +0000)]
Factoring DataflowWorklist out of LiveVariables and UninitializedValues analyses

llvm-svn: 214064