platform/upstream/llvm.git
9 years agoWe're actually -Wmissing-field-initializers clean thanks to the cmake
Eric Christopher [Fri, 7 Aug 2015 16:44:47 +0000 (16:44 +0000)]
We're actually -Wmissing-field-initializers clean thanks to the cmake
build so check and turn on -Wmissing-field-initializers. While there,
reorganize the conditional warning code based on compiler to be a bit
more obvious and inside a switch statement.

llvm-svn: 244330

9 years agoSilence gcc 5.1 unused variable warnings using LLVM_ATTRIBUTE_UNUSED.
Yaron Keren [Fri, 7 Aug 2015 16:37:34 +0000 (16:37 +0000)]
Silence gcc 5.1 unused variable warnings using LLVM_ATTRIBUTE_UNUSED.

llvm-svn: 244329

9 years agoDelete dead typedef. NFC.
Rafael Espindola [Fri, 7 Aug 2015 16:36:47 +0000 (16:36 +0000)]
Delete dead typedef. NFC.

llvm-svn: 244328

9 years agoUse 'signed char' instead of 'char'
Frederic Riss [Fri, 7 Aug 2015 16:31:59 +0000 (16:31 +0000)]
Use 'signed char' instead of 'char'

Hope this fixes the s390 and aarch64 bots.

llvm-svn: 244327

9 years agoUse LLVM_ATTRIBUTE_UNUSED to hide gcc 5.1 unused variable warning.
Yaron Keren [Fri, 7 Aug 2015 16:21:23 +0000 (16:21 +0000)]
Use LLVM_ATTRIBUTE_UNUSED to hide gcc 5.1 unused variable warning.
Suggestion by David Blaikie!

llvm-svn: 244326

9 years agoThis patch commits OpenMP 4 target device clauses
Michael Wong [Fri, 7 Aug 2015 16:16:36 +0000 (16:16 +0000)]
This patch commits OpenMP 4 target device clauses
This is committed on behalf of Kelvin Li
http://reviews.llvm.org/D11469?id=31227

llvm-svn: 244325

9 years ago[Compiler-RT] Disable TSAN on AArch64 temporarily
Renato Golin [Fri, 7 Aug 2015 15:41:43 +0000 (15:41 +0000)]
[Compiler-RT] Disable TSAN on AArch64 temporarily

Until all problems with the buildbot can be identified and fixed.

llvm-svn: 244324

9 years agoadd missing tests files
Rafael Espindola [Fri, 7 Aug 2015 15:35:49 +0000 (15:35 +0000)]
add missing tests files

llvm-svn: 244323

9 years agoAMDGPU/SI: v_mac_legacy_f32 does not exist on VI
Tom Stellard [Fri, 7 Aug 2015 15:34:30 +0000 (15:34 +0000)]
AMDGPU/SI: v_mac_legacy_f32 does not exist on VI

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 244322

9 years agoAMDGPU/SI: Remove unused outs parameter from VOPC TableGen classes
Tom Stellard [Fri, 7 Aug 2015 15:34:27 +0000 (15:34 +0000)]
AMDGPU/SI: Remove unused outs parameter from VOPC TableGen classes

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 244321

9 years agoAdd dynamic_table iterators back to ELF.h.
Rafael Espindola [Fri, 7 Aug 2015 15:25:20 +0000 (15:25 +0000)]
Add dynamic_table iterators back to ELF.h.

In tree they are only used by llvm-readobj, but it is also used by
https://github.com/mono/CppSharp.

While at it, add some missing error checking.

llvm-svn: 244320

9 years ago[dsymutil] Use the new MCDwarfLineTableParams customization to emit linetables
Frederic Riss [Fri, 7 Aug 2015 15:14:13 +0000 (15:14 +0000)]
[dsymutil] Use the new MCDwarfLineTableParams customization to emit linetables

llvm-dsymutil has to be able to process debug info produced by other compilers
which use different line table settings. The testcase wasn't generated by
another compiler, but by a modified clang.

llvm-svn: 244319

9 years ago[MC/Dwarf] Allow to specify custom parameters for linetable emission.
Frederic Riss [Fri, 7 Aug 2015 15:14:08 +0000 (15:14 +0000)]
[MC/Dwarf] Allow to specify custom parameters for linetable emission.

NFC patch for current users, but llvm-dsymutil will use the new
functionality to adapt to the input linetable.

Based on a patch by Adrian Prantl.

llvm-svn: 244318

9 years agoELF: Correctly identify SHT_NOTE sections with !SHF_ALLOC as type*Note
Tom Stellard [Fri, 7 Aug 2015 14:36:04 +0000 (14:36 +0000)]
ELF: Correctly identify SHT_NOTE sections with !SHF_ALLOC as type*Note

Subscribers: llvm-commits

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

llvm-svn: 244317

9 years ago[ASAN] Disable ManyThreadsTest in AArch64
Renato Golin [Fri, 7 Aug 2015 12:40:05 +0000 (12:40 +0000)]
[ASAN] Disable ManyThreadsTest in AArch64

This test was in an infinite loop in AArch64. We're investigating it
on PR24389, but I'm disabling it for now, so that we continue testing
everything else.

llvm-svn: 244316

9 years agoFix unused variable warning introduced in r244314
Silviu Baranga [Fri, 7 Aug 2015 12:05:46 +0000 (12:05 +0000)]
Fix unused variable warning introduced in r244314

llvm-svn: 244315

9 years ago[ARM] Update ReconstructShuffle to handle mismatched types
Silviu Baranga [Fri, 7 Aug 2015 11:40:46 +0000 (11:40 +0000)]
[ARM] Update ReconstructShuffle to handle mismatched types

Summary:
Port the ReconstructShuffle function from AArch64 to ARM
to handle mismatched incoming types in the BUILD_VECTOR
node.

This fixes an outstanding FIXME in the ReconstructShuffle
code.

Reviewers: t.p.northover, rengolin

Subscribers: aemerson, llvm-commits, rengolin

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

llvm-svn: 244314

9 years agoRevert "Make global aliases have symbol size equal to their type"
John Brawn [Fri, 7 Aug 2015 10:56:21 +0000 (10:56 +0000)]
Revert "Make global aliases have symbol size equal to their type"

This reverts r242520, as it caused pr24379. Also removes part of the test added
by r243874 that checks the size of alias symbols.

llvm-svn: 244313

9 years agoSilence tools/clang/lib/Tooling/CompilationDatabase.cpp:328:12: warning:
Yaron Keren [Fri, 7 Aug 2015 10:15:15 +0000 (10:15 +0000)]
Silence tools/clang/lib/Tooling/CompilationDatabase.cpp:328:12: warning:
‘clang::tooling::JSONAnchorDest’ defined but not used [-Wunused-variable]
from gcc 5.1.

llvm-svn: 244312

9 years agoTweak llvm/test/tools/dsymutil/arch-option.test to avoid globbing on mingw-w64.
NAKAMURA Takumi [Fri, 7 Aug 2015 08:38:22 +0000 (08:38 +0000)]
Tweak llvm/test/tools/dsymutil/arch-option.test to avoid globbing on mingw-w64.

llvm-svn: 244311

9 years agoRequire LLVM >=3.7 and bump version to 0.2.0
Jeroen Ketema [Fri, 7 Aug 2015 08:31:37 +0000 (08:31 +0000)]
Require LLVM >=3.7 and bump version to 0.2.0

v2: Also remove LLVM 3.6 traces from prepare-builtins.cpp

Patch by: EdB

llvm-svn: 244310

9 years agoShrinkWrap.cpp: Tweak r244235 for a non-functional member, PredicateFtor. [-Wdocument...
NAKAMURA Takumi [Fri, 7 Aug 2015 07:40:23 +0000 (07:40 +0000)]
ShrinkWrap.cpp: Tweak r244235 for a non-functional member, PredicateFtor. [-Wdocumentation]

llvm-svn: 244309

9 years ago[LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 mode support
Sagar Thakur [Fri, 7 Aug 2015 06:39:38 +0000 (06:39 +0000)]
[LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 mode support

This change :

    - Fixes offsets of all register sets for Mips.
    - Adds MSA register set and FRE=1 mode support for FP register set.
    - Separates lldb register numbers and register infos of freebsd/mips64 from linux/mips64.
    - Re-orders the register numbers of all kinds for mips to be consistent with freebsd order of register numbers.
    - Eliminates ENABLE_128_BIT_SUPPORT and union ValueData from Scalar.cpp and uses llvm::APInt and llvm::APFloat for all integer and floating point types.

Reviewers : emaste, jaydeep, clayborg
Subscribers : emaste, mohit.bhakkad, nitesh.jain, bhushan
Differential : http://reviews.llvm.org/D10919

llvm-svn: 244308

9 years agoMake sure the Features field of the Builtin Info struct is always initialized. Silenc...
Craig Topper [Fri, 7 Aug 2015 05:14:44 +0000 (05:14 +0000)]
Make sure the Features field of the Builtin Info struct is always initialized. Silences -Wmissing-field-initializers.

While there convert 0 in the BUILTIN macros to nullptr.

llvm-svn: 244307

9 years agoMake 'arm' cover both 32 and 64 bit architecutres
Ben Langmuir [Fri, 7 Aug 2015 01:59:56 +0000 (01:59 +0000)]
Make 'arm' cover both 32 and 64 bit architecutres

... and add aarch32 to specifically refer to the 32-bit ones.

Previously, 'arm' meant only 32-bit architectures and there was no way
for a module to build with both 32 and 64 bit ARM architectures.

Now a module that is intended to work on both architectures can specify
    requires arm
whereas a module only for 32-bit platforms can say
    requires aarch32
and just like before, 64-bit only can say
    requires aarch64

llvm-svn: 244306

9 years agoWebAssembly: textual emission uses expected opcode names
JF Bastien [Fri, 7 Aug 2015 01:57:03 +0000 (01:57 +0000)]
WebAssembly: textual emission uses expected opcode names

Summary: WebAssembly's tablegen instructions have the names WebAssembly expects, but by LLVM convention they're uppercase and suffixed with their type after an underscore. Leave the C++ code that way, but print outt he names WebAssembly expects (lowercase, no type). We could teach tablegen to do this later, maybe by using `!cast<string>(node)` in the .td files.

Reviewers: sunfish

Subscribers: jfb, llvm-commits

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

llvm-svn: 244305

9 years agoELF: Add AMDGPU specific defintions
Tom Stellard [Fri, 7 Aug 2015 01:35:24 +0000 (01:35 +0000)]
ELF: Add AMDGPU specific defintions

Reviewers: rafael

Subscribers: llvm-commits

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

llvm-svn: 244303

9 years agoValueMapper: Resolve uniquing cycles more aggressively
Duncan P. N. Exon Smith [Fri, 7 Aug 2015 00:44:55 +0000 (00:44 +0000)]
ValueMapper: Resolve uniquing cycles more aggressively

As a follow-up to r244181, resolve uniquing cycles underneath distinct
nodes on the fly.  This prevents uniquing cycles in early operands from
affecting later operands.  It also removes an iteration through distinct
nodes' operands.

No real functional change here, just more prompt resolution of temporary
nodes.

llvm-svn: 244302

9 years agoValueMapper: Pull out helper to resolve cycles, NFC
Duncan P. N. Exon Smith [Fri, 7 Aug 2015 00:39:26 +0000 (00:39 +0000)]
ValueMapper: Pull out helper to resolve cycles, NFC

Pull out a helper for resolving uniquing cycles of `Metadata` to remove
the boiler-plate of downcasting to `MDNode`.

llvm-svn: 244301

9 years ago[llvm-readobj] Convert to range-loops.
Davide Italiano [Fri, 7 Aug 2015 00:35:28 +0000 (00:35 +0000)]
[llvm-readobj] Convert to range-loops.

llvm-svn: 244300

9 years agoMIR Serialization: Fix serialization of unnamed IR block references.
Alex Lorenz [Thu, 6 Aug 2015 23:57:04 +0000 (23:57 +0000)]
MIR Serialization: Fix serialization of unnamed IR block references.

The block address machine operands can reference IR blocks in other functions.
This commit fixes a bug where the references to unnamed IR blocks in other
functions weren't serialized correctly.

llvm-svn: 244299

9 years agoAdd -latomic to Android mips build to avoid http://b.android.com/182094.
Chaoren Lin [Thu, 6 Aug 2015 23:53:07 +0000 (23:53 +0000)]
Add -latomic to Android mips build to avoid b.android.com/182094.

Reviewers: ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 244298

9 years agoRevert test commit.
Tanya Lattner [Thu, 6 Aug 2015 23:31:37 +0000 (23:31 +0000)]
Revert test commit.

llvm-svn: 244297

9 years agoTest commit
Tanya Lattner [Thu, 6 Aug 2015 23:30:28 +0000 (23:30 +0000)]
Test commit

llvm-svn: 244296

9 years agoMIR Parser: Simplify the token's string value handling.
Alex Lorenz [Thu, 6 Aug 2015 23:17:42 +0000 (23:17 +0000)]
MIR Parser: Simplify the token's string value handling.

This commit removes the 'StringOffset' and 'HasStringValue' fields from the
MIToken struct and simplifies the 'stringValue' method which now returns
the new 'StringValue' field.

This commit also adopts a different way of initializing the lexed tokens -
instead of constructing a new MIToken instance, the lexer resets the old token
using the new 'reset' method and sets its attributes using the new
'setStringValue', 'setOwnedStringValue', and 'setIntegerValue' methods.

Reviewers: Sean Silva

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

llvm-svn: 244295

9 years ago[LangRef] Cleanup some stray whitespace inconsistencies.
Sean Silva [Thu, 6 Aug 2015 22:56:48 +0000 (22:56 +0000)]
[LangRef] Cleanup some stray whitespace inconsistencies.

Patch by Debora Setton Sanches! <setton.debora@gmail.com>

llvm-svn: 244294

9 years ago[LangRef] Tiny editorial fixes.
Sean Silva [Thu, 6 Aug 2015 22:56:24 +0000 (22:56 +0000)]
[LangRef] Tiny editorial fixes.

Patch by Debora Setton Sanches! <setton.debora@gmail.com>

llvm-svn: 244293

9 years agoAdd initial documentation for the MIR serialization format.
Alex Lorenz [Thu, 6 Aug 2015 22:55:19 +0000 (22:55 +0000)]
Add initial documentation for the MIR serialization format.

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

llvm-svn: 244292

9 years ago[AArch64][FastISel] Always use AND before checking the branch flag.
Juergen Ributzka [Thu, 6 Aug 2015 22:44:15 +0000 (22:44 +0000)]
[AArch64][FastISel] Always use AND before checking the branch flag.

When we are not emitting the condition for the branch, because the condition is
in another BB or SDAG did the selection for us, then we have to mask the flag in
the register with AND.

This is required when the condition comes from a truncate, because SDAG only
truncates down to a legal size of i32.

This fixes rdar://problem/22161062.

llvm-svn: 244291

9 years agoRange-forify a loop, delete trailing whitespace. NFC
Douglas Katzman [Thu, 6 Aug 2015 22:36:24 +0000 (22:36 +0000)]
Range-forify a loop, delete trailing whitespace. NFC

llvm-svn: 244290

9 years ago[modules] Remove unused ModuleManager::visitDepthFirst function.
Richard Smith [Thu, 6 Aug 2015 22:14:35 +0000 (22:14 +0000)]
[modules] Remove unused ModuleManager::visitDepthFirst function.

llvm-svn: 244289

9 years ago[modules] Fix use-after-iterator-invalidation bug.
Richard Smith [Thu, 6 Aug 2015 22:14:12 +0000 (22:14 +0000)]
[modules] Fix use-after-iterator-invalidation bug.

llvm-svn: 244288

9 years agoRevert "[AArch64][FastISel] Add more truncation tests." and "[AArch64][FastISel]...
Juergen Ributzka [Thu, 6 Aug 2015 22:13:48 +0000 (22:13 +0000)]
Revert "[AArch64][FastISel] Add more truncation tests." and "[AArch64][FastISel] Always use an AND instruction when truncating to non-legal types."

This reverts commit r243198 and 243304.

Turns out this wasn't the correct fix for this problem. It works only within
FastISel, but fails when the truncate is selected by SDAG.

llvm-svn: 244287

9 years agoContinue the work from r243908 by adding a Features field to Builtin::Info
Eric Christopher [Thu, 6 Aug 2015 22:11:54 +0000 (22:11 +0000)]
Continue the work from r243908 by adding a Features field to Builtin::Info
so that we can populate it on a per-target basis with required features.

Future commits will start using this information for warnings.

llvm-svn: 244286

9 years ago[modules] Stop walking all modules when looking for lexical decls for a
Richard Smith [Thu, 6 Aug 2015 22:07:25 +0000 (22:07 +0000)]
[modules] Stop walking all modules when looking for lexical decls for a
DeclContext. These only ever come from the owning module file for the Decl.

llvm-svn: 244285

9 years ago[compatibility.ll] Cover explicitly named comdats.
Sean Silva [Thu, 6 Aug 2015 22:04:21 +0000 (22:04 +0000)]
[compatibility.ll] Cover explicitly named comdats.

Patch by Vedant Kumar! <vsk@apple.com>

llvm-svn: 244284

9 years agoDescribe the process better.
Sean Silva [Thu, 6 Aug 2015 22:03:54 +0000 (22:03 +0000)]
Describe the process better.

Patch by Vedant Kumar! <vsk@apple.com>

llvm-svn: 244283

9 years agoMove to llvm-readobj code that is only used there.
Rafael Espindola [Thu, 6 Aug 2015 21:54:37 +0000 (21:54 +0000)]
Move to llvm-readobj code that is only used there.

lld might end up using a small part of this, but it will be in a much
refactored form. For now this unblocks avoiding the full section scan in the
ELFFile constructor.

This also has a (very small) error handling improvement.

llvm-svn: 244282

9 years agoChange the warning message about optimization to be printed once
Jason Molenda [Thu, 6 Aug 2015 21:54:29 +0000 (21:54 +0000)]
Change the warning message about optimization to be printed once
per Module instead of once per CompileUnit, and print the
module name.  A module may have a mix of compile units built with
optimization and compile units built without optimization -- the
warning won't be printed until the user selects a stack frame of
a function that was built with optimization.  And as before, it
will only be printed once per module per debug session.

<rdar://problem/19281172>

llvm-svn: 244281

9 years agoFix alignment of TemplateArgumentList.
James Y Knight [Thu, 6 Aug 2015 21:22:02 +0000 (21:22 +0000)]
Fix alignment of TemplateArgumentList.

llvm-svn: 244280

9 years agoRevert accidentally committed WinEHPrepare changes
David Majnemer [Thu, 6 Aug 2015 21:13:51 +0000 (21:13 +0000)]
Revert accidentally committed WinEHPrepare changes

This reverts commit r244272, r244273, r244274, and r244275.

llvm-svn: 244278

9 years ago[modules] Remove now-unused MergedLookups map.
Richard Smith [Thu, 6 Aug 2015 21:09:44 +0000 (21:09 +0000)]
[modules] Remove now-unused MergedLookups map.

llvm-svn: 244277

9 years ago[IR] Remove TerminateInst's "NameStr" argument
David Majnemer [Thu, 6 Aug 2015 21:08:36 +0000 (21:08 +0000)]
[IR] Remove TerminateInst's "NameStr" argument

TerminateInst can't have a name because it doesn't produce a result.  No
functionality change is intended, this is just a cleanup.

llvm-svn: 244276

9 years agoPHIs don't need to be postprocessed
David Majnemer [Thu, 6 Aug 2015 21:08:34 +0000 (21:08 +0000)]
PHIs don't need to be postprocessed

llvm-svn: 244275

9 years agoHandle PHI nodes prefacing EH pads too
David Majnemer [Thu, 6 Aug 2015 21:08:32 +0000 (21:08 +0000)]
Handle PHI nodes prefacing EH pads too

llvm-svn: 244274

9 years agohandle phi nodes
David Majnemer [Thu, 6 Aug 2015 21:08:30 +0000 (21:08 +0000)]
handle phi nodes

llvm-svn: 244273

9 years ago[WinEHPrepare] Add rudimentary support for the new EH instructions
David Majnemer [Thu, 6 Aug 2015 21:07:55 +0000 (21:07 +0000)]
[WinEHPrepare] Add rudimentary support for the new EH instructions

Summary:
This adds somewhat basic preparation functionality including:
- Formation of funclets via coloring basic blocks.
- Cloning of polychromatic blocks to ensure that funclets have unique
  program counters.
- Demotion of values used between different funclets.
- Some amount of cleanup once we have removed predecessors from basic
  blocks.
- Verification that we are left with a CFG that makes some amount of
  sense.

N.B. Arguments and numbering still need to be done.

Reviewers: rnk, JosephTremoulet

Subscribers: llvm-commits

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

llvm-svn: 244272

9 years ago[modules] Remove redundant lookups into non-primary DeclContexts. These were made...
Richard Smith [Thu, 6 Aug 2015 21:05:21 +0000 (21:05 +0000)]
[modules] Remove redundant lookups into non-primary DeclContexts. These were made unnecessary by r244192.

llvm-svn: 244271

9 years ago[dsymutil] Implement dSYM bundle creation
Frederic Riss [Thu, 6 Aug 2015 21:05:06 +0000 (21:05 +0000)]
[dsymutil] Implement dSYM bundle creation

A dSYM bundle is a file hierarchy that looks slike this:
 <bundle name>.dSYM/
     Contents/
        Info.plist
        Resources/
           DWARF/
              <DWARF file(s)>

This is the default output mode of dsymutil.

llvm-svn: 244270

9 years ago[dsymutil] Add (unimplemented) --flat option
Frederic Riss [Thu, 6 Aug 2015 21:05:01 +0000 (21:05 +0000)]
[dsymutil] Add (unimplemented) --flat option

dsymutil should by default generate dSYM bundles which are filesystem
hierarchies containing the debug info and an additional Info.plist.
Currently llvm-dsymutil emits raw binaries containing the debug info.
This is what we call the 'flat mode'. Add a -f/-flat option that is
supposed to enable that flat mode, but don't wire it for now, only
pass it to the tests that will need it to stay functional once we
do bundle generation by default.
This basically makes this commit NFC and removes the noise from the
actual commit that adds support for bundle generation.

llvm-svn: 244269

9 years agoThread premissions through sys::fs::create_director{y|ies}
Frederic Riss [Thu, 6 Aug 2015 21:04:55 +0000 (21:04 +0000)]
Thread premissions through sys::fs::create_director{y|ies}

llvm-svn: 244268

9 years ago[WinEH] Add documentation motivating the new EH instructions
Reid Kleckner [Thu, 6 Aug 2015 21:01:32 +0000 (21:01 +0000)]
[WinEH] Add documentation motivating the new EH instructions

This adds documentation on how to use the new EH instructions added in
r243766.

Reviewers: majnemer, reames

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

llvm-svn: 244267

9 years ago[ItaniumCXXABI] Don't import RTTI data for classes with key functions
David Majnemer [Thu, 6 Aug 2015 20:56:55 +0000 (20:56 +0000)]
[ItaniumCXXABI] Don't import RTTI data for classes with key functions

MinGW has some pretty strange behvaior around RTTI and
dllimport/dllexport:
- RTTI data is never imported
- RTTI data is only exported if the class has no key function.

llvm-svn: 244266

9 years ago[IndVars] Fix PR24356.
Sanjoy Das [Thu, 6 Aug 2015 20:43:41 +0000 (20:43 +0000)]
[IndVars] Fix PR24356.

Unsigned predicates increase or decrease agnostic of the signs of their
increments.

llvm-svn: 244265

9 years ago[IndVars] Improved logging under DEBUG(); NFC.
Sanjoy Das [Thu, 6 Aug 2015 20:43:28 +0000 (20:43 +0000)]
[IndVars] Improved logging under DEBUG(); NFC.

Before this, we'd print the modified comparision in the "Simplified
comparison" case.  That looked misleading.

llvm-svn: 244264

9 years ago[ASAN/AArch64] Make sure aarch64 is not stable-runtime
Renato Golin [Thu, 6 Aug 2015 20:34:51 +0000 (20:34 +0000)]
[ASAN/AArch64] Make sure aarch64 is not stable-runtime

llvm-svn: 244263

9 years agoConvert a few classes over to use the new TrailingObjects helper.
James Y Knight [Thu, 6 Aug 2015 20:26:32 +0000 (20:26 +0000)]
Convert a few classes over to use the new TrailingObjects helper.

This initial commit serves as an example -- the remainder of the
classes using pointer arithmetic for trailing objects will be
converted in subsequent changes.

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

llvm-svn: 244262

9 years agoRemove unused 'Owned' flag from TemplateArgumentList.
James Y Knight [Thu, 6 Aug 2015 20:26:18 +0000 (20:26 +0000)]
Remove unused 'Owned' flag from TemplateArgumentList.

llvm-svn: 244261

9 years agoConvert a bunch of loops to foreach. NFC.
Pete Cooper [Thu, 6 Aug 2015 20:22:46 +0000 (20:22 +0000)]
Convert a bunch of loops to foreach.  NFC.

After r244074, we now have a successors() method to iterate over
all the successors of a TerminatorInst.  This commit changes a bunch
of eligible loops to use it.

llvm-svn: 244260

9 years agoUpdate comments.
Rui Ueyama [Thu, 6 Aug 2015 20:05:27 +0000 (20:05 +0000)]
Update comments.

llvm-svn: 244259

9 years agoCOFF: Update a comment.
Rui Ueyama [Thu, 6 Aug 2015 19:57:21 +0000 (19:57 +0000)]
COFF: Update a comment.

llvm-svn: 244258

9 years agoAMDGPU/SI: Add Fiji support
Tom Stellard [Thu, 6 Aug 2015 19:43:02 +0000 (19:43 +0000)]
AMDGPU/SI: Add Fiji support

Patch by: Alex Deucher

llvm-svn: 244255

9 years agoAMDGPU/SI: Add support for 32-bit immediate SMRD offsets on CI
Tom Stellard [Thu, 6 Aug 2015 19:28:38 +0000 (19:28 +0000)]
AMDGPU/SI: Add support for 32-bit immediate SMRD offsets on CI

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 244254

9 years agoAMDGPU/SI: Use ComplexPatterns for SMRD addressing modes
Tom Stellard [Thu, 6 Aug 2015 19:28:30 +0000 (19:28 +0000)]
AMDGPU/SI: Use ComplexPatterns for SMRD addressing modes

Summary: This allows us to consolidate several of the TableGen patterns.

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 244253

9 years agoFix memory leaks by avoiding extra manual dynamic allocation
David Blaikie [Thu, 6 Aug 2015 19:23:33 +0000 (19:23 +0000)]
Fix memory leaks by avoiding extra manual dynamic allocation

Improvement to r244212.

llvm-svn: 244252

9 years agoFix nested CrashRecoveryContexts with LLVM_ENABLE_THREADS=OFF, allow them.
Nico Weber [Thu, 6 Aug 2015 19:21:25 +0000 (19:21 +0000)]
Fix nested CrashRecoveryContexts with LLVM_ENABLE_THREADS=OFF, allow them.

libclang uses a CrashRecoveryContext, and building a module does too. If a
module gets built through libclang, nested CrashRecoveryContexts are used.  They
work fine with threads as things are stored in ThreadLocal variables, but in
LLVM_ENABLE_THREADS=OFF builds the two recovery contexts would write to the
same globals.

To fix, keep active CrashRecoveryContextImpls in a list and have the global
point to the innermost one, and do something similar for
tlIsRecoveringFromCrash.

Necessary (but not sufficient) for PR11974 and PR20325

http://reviews.llvm.org/D11770

llvm-svn: 244251

9 years ago[libFuzzer] move the mutators to public interface so that custom mutators may reuse...
Kostya Serebryany [Thu, 6 Aug 2015 19:19:55 +0000 (19:19 +0000)]
[libFuzzer] move the mutators to public interface so that custom mutators may reuse these functions directly

llvm-svn: 244250

9 years agoOn freebsd it is possible to open a directory. Test with another error.
Rafael Espindola [Thu, 6 Aug 2015 19:12:03 +0000 (19:12 +0000)]
On freebsd it is possible to open a directory. Test with another error.

llvm-svn: 244249

9 years agoRename inst_range() to instructions() for consistency. NFC
Nico Rieck [Thu, 6 Aug 2015 19:10:45 +0000 (19:10 +0000)]
Rename inst_range() to instructions() for consistency. NFC

llvm-svn: 244248

9 years agoFix possible infinite loop in shrink wrapping when searching for save/restore
Kit Barton [Thu, 6 Aug 2015 19:01:57 +0000 (19:01 +0000)]
Fix possible infinite loop in shrink wrapping when searching for save/restore
points.

There is an infinite loop that can occur in Shrink Wrapping while searching
for the Save/Restore points.

Part of this search checks whether the save/restore points are located in
different loop nests and if so, uses the (post) dominator trees to find the
immediate (post) dominator blocks. However, if the current block does not have
any immediate (post) dominators then this search will result in an infinite
loop. This can occur in code containing an infinite loop.

The modification checks whether the immediate (post) dominator is different from
the current save/restore block. If it is not, then the search terminates and the
current location is not considered as a valid save/restore point for shrink wrapping.

Phabricator: http://reviews.llvm.org/D11607
llvm-svn: 244247

9 years agoLibDriver: Replace references to lld-link2 with lld-link.
Peter Collingbourne [Thu, 6 Aug 2015 19:00:42 +0000 (19:00 +0000)]
LibDriver: Replace references to lld-link2 with lld-link.

llvm-svn: 244246

9 years ago[Frontend] Fix crash when serializing diagnostics with really long text.
Argyrios Kyrtzidis [Thu, 6 Aug 2015 18:46:36 +0000 (18:46 +0000)]
[Frontend] Fix crash when serializing diagnostics with really long text.

rdar://21896690

llvm-svn: 244245

9 years ago[Reassociation] Fix miscompile for va_arg arguments.
Quentin Colombet [Thu, 6 Aug 2015 18:44:34 +0000 (18:44 +0000)]
[Reassociation] Fix miscompile for va_arg arguments.

iisUnmovableInstruction() had a list of instructions hardcoded which are
considered unmovable. The list lacked (at least) an entry for the va_arg
and cmpxchg instructions.
Fix this by introducing a new Instruction::mayBeMemoryDependent()
instead of maintaining another instruction list.

Patch by Matthias Braun <matze@braunis.de>.

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

rdar://problem/22118647

llvm-svn: 244244

9 years agotest: Use lld-link instead of lld-link2 as the LTO linker on Windows.
Peter Collingbourne [Thu, 6 Aug 2015 18:37:54 +0000 (18:37 +0000)]
test: Use lld-link instead of lld-link2 as the LTO linker on Windows.

The old COFF linker has been removed and lld-link now refers to the new linker.

llvm-svn: 244243

9 years agoFix memory ownership in the NeonEmitter by using values instead of pointers (smart...
David Blaikie [Thu, 6 Aug 2015 18:29:32 +0000 (18:29 +0000)]
Fix memory ownership in the NeonEmitter by using values instead of pointers (smart or otherwise)

Improvement to the memory leak fix in 244196.

Address validity is required for the Intrinsic objects, but since the
collections only ever grow (no elements are removed), deque provides
sufficient guarantees (that the objects will never be reallocated/moved
around) for this use case.

llvm-svn: 244241

9 years agoMIR Parser: Report an error when parsing duplicate memory operand flags.
Alex Lorenz [Thu, 6 Aug 2015 18:26:36 +0000 (18:26 +0000)]
MIR Parser: Report an error when parsing duplicate memory operand flags.

llvm-svn: 244240

9 years agoRevert r244154 which causes some build failure. See https://llvm.org/bugs/show_bug...
Cong Hou [Thu, 6 Aug 2015 18:17:29 +0000 (18:17 +0000)]
Revert r244154 which causes some build failure. See https://llvm.org/bugs/show_bug.cgi?id=24377.

llvm-svn: 244239

9 years agoUpdate docs for accessing !dbg attachments
Duncan P. N. Exon Smith [Thu, 6 Aug 2015 18:15:25 +0000 (18:15 +0000)]
Update docs for accessing !dbg attachments

llvm-svn: 244238

9 years ago[ARM/Unwind] Fix wrong usage of write-back on register save
Renato Golin [Thu, 6 Aug 2015 18:15:17 +0000 (18:15 +0000)]
[ARM/Unwind] Fix wrong usage of write-back on register save

The register save routine in libunwind was using write-back addressing
mode to r0 for thumb, when that was not only different from the ARM
version and more importantly the register restore, but also saving the
wrong address.

Patch by Manuel Freiberger.

Fixes PR24331.

llvm-svn: 244237

9 years agoThis patch changes the interface to enable the shrink wrapping optimization.
Kit Barton [Thu, 6 Aug 2015 18:02:53 +0000 (18:02 +0000)]
This patch changes the interface to enable the shrink wrapping optimization.

It adds a new constructor, which takes a std::function predicate function that
is run at the beginning of shrink wrapping to determine whether the optimization
should run on the given machine function. The std::function can be overridden by
each target, allowing target-specific decisions to be made on each machine
function.

This is necessary for PowerPC, as the decision to run shrink wrapping is
partially based on the ABI. Futhermore, this operates nicely with the GCC iFunc
capability, which allows option overrides on a per-function basis.

Phabricator: http://reviews.llvm.org/D11421
llvm-svn: 244235

9 years ago[sanitizer] 2-nd attempt. Add the flag handle_sigfpe that is default true to handle...
Kostya Serebryany [Thu, 6 Aug 2015 17:52:54 +0000 (17:52 +0000)]
[sanitizer] 2-nd attempt. Add the flag handle_sigfpe that is default true to handle SIGFPE crashes same as SIGSEV crashes, patch by Karl Skomski. This time the test is enabled only on x86-64 (it broke on ARM)

llvm-svn: 244234

9 years ago[AArch64] Use a static function and other minor cleanup for readability. NFC.
Chad Rosier [Thu, 6 Aug 2015 17:37:18 +0000 (17:37 +0000)]
[AArch64] Use a static function and other minor cleanup for readability. NFC.

llvm-svn: 244233

9 years ago[cmake] Handle Dragonfly BSD like FreeBSD
Reid Kleckner [Thu, 6 Aug 2015 17:17:44 +0000 (17:17 +0000)]
[cmake] Handle Dragonfly BSD like FreeBSD

Fixes build break reported in PR24358.

Patch by John Marino.

llvm-svn: 244232

9 years agodocs: Fix typo in Phabricator.rst
Reid Kleckner [Thu, 6 Aug 2015 16:57:49 +0000 (16:57 +0000)]
docs: Fix typo in Phabricator.rst

Summary: Fix a small typo in Phabricator.rst: s/your/you.

Reviewers: rnk

Subscribers: rnk, llvm-commits

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

llvm-svn: 244231

9 years agoMIR Serialization: Serialize the 'invariant' machine memory operand flag.
Alex Lorenz [Thu, 6 Aug 2015 16:55:53 +0000 (16:55 +0000)]
MIR Serialization: Serialize the 'invariant' machine memory operand flag.

llvm-svn: 244230

9 years agoFix an alignment error in `llvm::expandAtomicRMWToCmpXchg` without breaking the build...
Richard Diamond [Thu, 6 Aug 2015 16:55:03 +0000 (16:55 +0000)]
Fix an alignment error in `llvm::expandAtomicRMWToCmpXchg` without breaking the build where X86 isn't enabled.

Summary: Divide the primitive size in bits by eight so the initial load's alignment is in bytes as expected. Tested with the included unit test.

Reviewers: rengolin, jfb

Subscribers: llvm-commits

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

llvm-svn: 244229

9 years agoMIR Serialization: Serialize the 'non-temporal' machine memory operand flag.
Alex Lorenz [Thu, 6 Aug 2015 16:49:30 +0000 (16:49 +0000)]
MIR Serialization: Serialize the 'non-temporal' machine memory operand flag.

llvm-svn: 244228

9 years agoCOFF: Make test commands shorter. NFC.
Rui Ueyama [Thu, 6 Aug 2015 16:47:46 +0000 (16:47 +0000)]
COFF: Make test commands shorter. NFC.

llvm-svn: 244227

9 years agoCOFF: Remove the old COFF linker and make link an alias to link2.
Rui Ueyama [Thu, 6 Aug 2015 16:19:35 +0000 (16:19 +0000)]
COFF: Remove the old COFF linker and make link an alias to link2.

It's time to remove old COFF linker because the new one is now complete.

llvm-svn: 244226

9 years ago[AArch64] Improve the readability of the ld/st optimization pass. NFC.
Chad Rosier [Thu, 6 Aug 2015 15:50:12 +0000 (15:50 +0000)]
[AArch64] Improve the readability of the ld/st optimization pass. NFC.

llvm-svn: 244222