platform/upstream/llvm.git
8 years agoDelete dead code. NFC.
Rafael Espindola [Sat, 8 Aug 2015 00:25:57 +0000 (00:25 +0000)]
Delete dead code. NFC.

llvm-svn: 244378

8 years agoCOFF: Simplify.
Rui Ueyama [Sat, 8 Aug 2015 00:23:37 +0000 (00:23 +0000)]
COFF: Simplify.

SymbolTable::find(mangle(X)) is equivalent to SymbolTable::findUnderscore(X)
except that the latter is slightly efficient as that doesn't allocate a new
string.

llvm-svn: 244377

8 years agoAMDGPU/SI: Attempt to fix Windows bots broken by r244372
Tom Stellard [Sat, 8 Aug 2015 00:17:59 +0000 (00:17 +0000)]
AMDGPU/SI: Attempt to fix Windows bots broken by r244372

llvm-svn: 244376

8 years agoConvert getSymbolSection to return an ErrorOr.
Rafael Espindola [Fri, 7 Aug 2015 23:27:14 +0000 (23:27 +0000)]
Convert getSymbolSection to return an ErrorOr.

This function can actually fail since the symbol contains an index to the
section and that can be invalid.

llvm-svn: 244375

8 years agoAST: Implement mangling support for function types without a prototype.
Peter Collingbourne [Fri, 7 Aug 2015 23:25:47 +0000 (23:25 +0000)]
AST: Implement mangling support for function types without a prototype.

Function types without prototypes can arise when mangling a function type
within an overloadable function in C. We mangle these as the absence of
any parameter types (not even an empty parameter list).

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

llvm-svn: 244374

8 years agoadd a missing regression test for a DAGCombiner FDIV optimization
Sanjay Patel [Fri, 7 Aug 2015 23:19:41 +0000 (23:19 +0000)]
add a missing regression test for a DAGCombiner FDIV optimization

There's no test for this transform in any backend. Discovered
while debugging fast-math-flag propagation in the DAG (r244053).

llvm-svn: 244373

8 years agoAMDGPU: Add pass to lower OpenCL image and sampler arguments.
Tom Stellard [Fri, 7 Aug 2015 23:19:30 +0000 (23:19 +0000)]
AMDGPU: Add pass to lower OpenCL image and sampler arguments.

The pass adds new kernel arguments for image attributes, and
resolves calls to dummy attribute and resource id getter functions.

Patch by: Zoltan Gilian

llvm-svn: 244372

8 years ago[SPARC] Disable unsupported ExecutionEngine tests, and XFAIL a couple
James Y Knight [Fri, 7 Aug 2015 23:01:16 +0000 (23:01 +0000)]
[SPARC] Disable unsupported ExecutionEngine tests, and XFAIL a couple
of DebugInfo tests.

llvm-svn: 244371

8 years ago[Sparc] XFAIL CodeGen/atomic_ops test.
James Y Knight [Fri, 7 Aug 2015 22:52:34 +0000 (22:52 +0000)]
[Sparc] XFAIL CodeGen/atomic_ops test.

llvm-svn: 244370

8 years ago[LAA] Remove unused pointer partition argument from getNumberOfChecks, NFC
Adam Nemet [Fri, 7 Aug 2015 22:44:21 +0000 (22:44 +0000)]
[LAA] Remove unused pointer partition argument from getNumberOfChecks, NFC

This is unused after filtering checks was moved to the clients.

As a result, we can just return the number of the checks in the
precomputed set.

llvm-svn: 244369

8 years ago[LAA] Make the set of runtime checks part of the state of LAA, NFC
Adam Nemet [Fri, 7 Aug 2015 22:44:15 +0000 (22:44 +0000)]
[LAA] Make the set of runtime checks part of the state of LAA, NFC

This is the full set of checks that clients can further filter. IOW,
it's client-agnostic.  This makes LAA complete in the sense that it now
provides the two main results of its analysis precomputed:

1. memory dependences via getDepChecker().getInsterestingDependences()
2. run-time checks via getRuntimePointerCheck().getChecks()

However, as a consequence we now compute this information pro-actively.
Thus if the client decides to skip the loop based on the dependences
we've computed the checks unnecessarily.  In order to see whether this
was a significant overhead I checked compile time on SPEC2k6 LTO bitcode
files.  The change was in the noise.

The checks are generated in canCheckPtrAtRT, at the same place where we
used to call groupChecks to merge checks.

llvm-svn: 244368

8 years agoCOFF: Handle _load_config_used in the same way as other special symbols.
Rui Ueyama [Fri, 7 Aug 2015 22:43:53 +0000 (22:43 +0000)]
COFF: Handle _load_config_used in the same way as other special symbols.

Handling the symbol this way is consistent with other symbols, such as
_tls_used. NFC.

llvm-svn: 244367

8 years ago[AArch64][LoadStoreOptimizer] Turn a test into an assert. NFC.
Quentin Colombet [Fri, 7 Aug 2015 22:40:51 +0000 (22:40 +0000)]
[AArch64][LoadStoreOptimizer] Turn a test into an assert. NFC.

At this point the given Opc must be valid, otherwise we should
not look for a matching pair to form paired load or store.

Thanks to Chad to point out this piece of code!

llvm-svn: 244366

8 years agoRemove unused variable.
Rui Ueyama [Fri, 7 Aug 2015 22:40:13 +0000 (22:40 +0000)]
Remove unused variable.

llvm-svn: 244365

8 years ago[asan] Try different values of the shadow gap start.
Evgeniy Stepanov [Fri, 7 Aug 2015 22:38:44 +0000 (22:38 +0000)]
[asan] Try different values of the shadow gap start.

The number of unaccessible pages at the beginning of the address
space can differ between processes on the same machine. Try different
values at runtime to protect as much memory as possible.

llvm-svn: 244364

8 years agoDo not use -fvisibility option with Visual C
Michael Kruse [Fri, 7 Aug 2015 22:16:44 +0000 (22:16 +0000)]
Do not use -fvisibility option with Visual C

It doesn't know the option and prints a warning.

llvm-svn: 244363

8 years agoAMDGPU/SI: Use InstAlias instead of MnemonicAlias for VOPC instructions
Tom Stellard [Fri, 7 Aug 2015 22:00:56 +0000 (22:00 +0000)]
AMDGPU/SI: Use InstAlias instead of MnemonicAlias for VOPC instructions

Summary:
With InstAlias, we don't need to print the _e32 portion of the mnemonic
when we print the $dst operand.  This change makes it possible to
include vcc in the asm string when we switch VOPC over to having
implicit vcc defs.

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 244362

8 years agoredo r244360 (tighten checks...) after specifying triple
Sanjay Patel [Fri, 7 Aug 2015 21:42:24 +0000 (21:42 +0000)]
redo r244360 (tighten checks...) after specifying triple

llvm-svn: 244361

8 years agotighten checks using update_llc_test_checks.py
Sanjay Patel [Fri, 7 Aug 2015 21:38:53 +0000 (21:38 +0000)]
tighten checks using update_llc_test_checks.py

llvm-svn: 244360

8 years ago[asan] Reduce shadow gap start on 32-bit Android.
Evgeniy Stepanov [Fri, 7 Aug 2015 21:17:46 +0000 (21:17 +0000)]
[asan] Reduce shadow gap start on 32-bit Android.

This fixes an internal assertion failure when running out of
the address space in the large allocator.

llvm-svn: 244359

8 years agoCOFF: Remove lld-link2 alias.
Rui Ueyama [Fri, 7 Aug 2015 21:02:36 +0000 (21:02 +0000)]
COFF: Remove lld-link2 alias.

llvm-svn: 244358

8 years agoMIR Serialization: Serialize the base alignment for the machine memory operands.
Alex Lorenz [Fri, 7 Aug 2015 20:48:30 +0000 (20:48 +0000)]
MIR Serialization: Serialize the base alignment for the machine memory operands.

llvm-svn: 244357

8 years agoMIR Serialization: Serialize the offsets for the machine memory operands.
Alex Lorenz [Fri, 7 Aug 2015 20:26:52 +0000 (20:26 +0000)]
MIR Serialization: Serialize the offsets for the machine memory operands.

llvm-svn: 244356

8 years agoMIR Parser: Extract the parsing of the operand's offset into a new method. NFC.
Alex Lorenz [Fri, 7 Aug 2015 20:21:00 +0000 (20:21 +0000)]
MIR Parser: Extract the parsing of the operand's offset into a new method. NFC.

This commit extract the code that parses the 64-bit offset from the method
'parseOperandsOffset' to a new method 'parseOffset' so that we can reuse it
when parsing the offset for the machine memory operands.

llvm-svn: 244355

8 years agoAMDGPU: Assume SMRD access for constant address space
Matt Arsenault [Fri, 7 Aug 2015 20:18:34 +0000 (20:18 +0000)]
AMDGPU: Assume SMRD access for constant address space

Since r243294 these are selected to SMRD and
moved later if required.

llvm-svn: 244354

8 years agoDon't look for a SHT_DYNSYM in the ELFFile's constructor.
Rafael Espindola [Fri, 7 Aug 2015 20:11:08 +0000 (20:11 +0000)]
Don't look for a SHT_DYNSYM in the ELFFile's constructor.

Yet another step in not having it scan every section.

llvm-svn: 244353

8 years agoAdd Intel family 6 model 90 as Silvermont. Fixes PR24392.
Craig Topper [Fri, 7 Aug 2015 20:09:42 +0000 (20:09 +0000)]
Add Intel family 6 model 90 as Silvermont. Fixes PR24392.

llvm-svn: 244352

8 years agoRemove the symbol iteration functions that don't take a symbol table.
Rafael Espindola [Fri, 7 Aug 2015 20:07:27 +0000 (20:07 +0000)]
Remove the symbol iteration functions that don't take a symbol table.

Another step in making ELFFile's constructor not iterate over all sections.

llvm-svn: 244351

8 years agoAvoid using getDotDynSymSec in lld. It is going away.
Rafael Espindola [Fri, 7 Aug 2015 20:01:24 +0000 (20:01 +0000)]
Avoid using getDotDynSymSec in lld. It is going away.

llvm-svn: 244350

8 years ago[LAA] Remove unused pointer partition argument from print(), NFC
Adam Nemet [Fri, 7 Aug 2015 19:44:48 +0000 (19:44 +0000)]
[LAA] Remove unused pointer partition argument from print(), NFC

This is now handled in the client.  No need for LAA to provide this
variant.

llvm-svn: 244349

8 years ago[ConstantFoldTerminator] Preserve make.implicit metadata when converting SwitchInst...
Chen Li [Fri, 7 Aug 2015 19:30:12 +0000 (19:30 +0000)]
[ConstantFoldTerminator] Preserve make.implicit metadata when converting SwitchInst to BranchInst

Summary: llvm::ConstantFoldTerminator function can convert SwitchInst with single case (and default) to a conditional BranchInst. This patch adds support to preserve make.implicit metadata on this conversion.

Reviewers: sanjoy, weimingz, chenli

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 244348

8 years ago[MCDwarf] Use more idiomatic [u]int8_t types.
Frederic Riss [Fri, 7 Aug 2015 19:19:44 +0000 (19:19 +0000)]
[MCDwarf] Use more idiomatic [u]int8_t types.

llvm-svn: 244347

8 years agoUpdate a comment to be more descriptive.
Eric Christopher [Fri, 7 Aug 2015 19:07:08 +0000 (19:07 +0000)]
Update a comment to be more descriptive.

llvm-svn: 244346

8 years agoUse lowercase for local cmake variables.
Chaoren Lin [Fri, 7 Aug 2015 18:54:06 +0000 (18:54 +0000)]
Use lowercase for local cmake variables.

llvm-svn: 244345

8 years agoHide cmake variables related to static linking Android lldb-server.
Chaoren Lin [Fri, 7 Aug 2015 18:54:04 +0000 (18:54 +0000)]
Hide cmake variables related to static linking Android lldb-server.

llvm-svn: 244344

8 years agoUpdate to D11825.
Chaoren Lin [Fri, 7 Aug 2015 18:54:02 +0000 (18:54 +0000)]
Update to D11825.

Summary:
Adding `-latomic` to `ANDROID_LINKER_FLAGS` doesn't actually work.
Adding `atomic` to `LLDB_SYSTEM_LIBS` does.

Related: D11831.

Reviewers: Andrzej, ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 244343

8 years agoMove the cpu validating virtual method down to the feature routines
Eric Christopher [Fri, 7 Aug 2015 18:31:25 +0000 (18:31 +0000)]
Move the cpu validating virtual method down to the feature routines
where it belongs.

llvm-svn: 244342

8 years ago[InstCombine] Fix SSE2/AVX2 vector logical shift by constant
Simon Pilgrim [Fri, 7 Aug 2015 18:22:50 +0000 (18:22 +0000)]
[InstCombine] Fix SSE2/AVX2 vector logical shift by constant

This patch fixes the sse2/avx2 vector shift by constant instcombine call to correctly deal with the fact that the shift amount is formed from the entire lower 64-bit and not just the lowest element as it currently assumes.

e.g.

%1 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)

In this case, (V)PSRLD doesn't perform a lshr by 15 but in fact attempts to shift by 64424509455 ((15 << 32) | 15) - giving a zero result.

In addition, this review also recognizes shift-by-zero from a ConstantAggregateZero type (PR23821).

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

llvm-svn: 244341

8 years agoNFC.
Cong Hou [Fri, 7 Aug 2015 18:04:17 +0000 (18:04 +0000)]
NFC.

Use a parent class to avoid reduncant code when specializing GraphTraits for T and const T.

llvm-svn: 244340

8 years agoRestore PrettyStackTrace state on crash.
Nico Weber [Fri, 7 Aug 2015 17:48:57 +0000 (17:48 +0000)]
Restore PrettyStackTrace state on crash.

Last part of PR11974.

llvm-svn: 244339

8 years agoAdd functions to save and restore the PrettyStackTrace state.
Nico Weber [Fri, 7 Aug 2015 17:47:03 +0000 (17:47 +0000)]
Add functions to save and restore the PrettyStackTrace state.

PrettyStackTraceHead is a LLVM_THREAD_LOCAL, which means it's just a global
in LLVM_ENABLE_THREADS=NO builds.  If a CrashRecoveryContext is used with
code that uses PrettyStackEntries, and a crash happens, PrettyStackTraceHead is
currently not reset to its pre-crash value.  These functions make it possible
to add a cleanup to such code that does this.

(Not reseting the value then causes the assert in ~PrettyStackTraceEntry() to
fire if the code outside of the CrashRecoveryContext also uses
PrettyStackEntries -- for example, clang when building a module.)

Part of PR11974.

llvm-svn: 244338

8 years agoAdd a comment.
Nico Weber [Fri, 7 Aug 2015 17:32:06 +0000 (17:32 +0000)]
Add a comment.

llvm-svn: 244337

8 years agoUse already available symbol tables. NFC.
Rafael Espindola [Fri, 7 Aug 2015 17:16:28 +0000 (17:16 +0000)]
Use already available symbol tables. NFC.

llvm-svn: 244336

8 years agoDelete dead code. NFC.
Rafael Espindola [Fri, 7 Aug 2015 17:06:05 +0000 (17:06 +0000)]
Delete dead code. NFC.

llvm-svn: 244335

8 years ago[ARM] Remove an unused reference to MachineRegisterInfo. NFC.
Chad Rosier [Fri, 7 Aug 2015 17:02:29 +0000 (17:02 +0000)]
[ARM] Remove an unused reference to MachineRegisterInfo. NFC.

llvm-svn: 244334

8 years agoDon't use a DenseMap to handle SHT_SYMTAB_SHNDX.
Rafael Espindola [Fri, 7 Aug 2015 16:51:44 +0000 (16:51 +0000)]
Don't use a DenseMap to handle SHT_SYMTAB_SHNDX.

It is already a convenient table.

llvm-svn: 244333

8 years agoAMDGPU/SI: Use correct encoding of vopc for VI in the assembler
Tom Stellard [Fri, 7 Aug 2015 16:45:33 +0000 (16:45 +0000)]
AMDGPU/SI: Use correct encoding of vopc for VI in the assembler

Summary: We were using the SI encoding for VI.

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 244332

8 years agoAMDGPU/SI: Add VI checks to vop3 assembler tests
Tom Stellard [Fri, 7 Aug 2015 16:45:30 +0000 (16:45 +0000)]
AMDGPU/SI: Add VI checks to vop3 assembler tests

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 244331

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

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

llvm-svn: 244297

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

llvm-svn: 244296

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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