platform/upstream/llvm.git
9 years agowww-todo: We assume accesses to fixed-size arrays are in-bounds
Tobias Grosser [Sun, 7 Dec 2014 15:56:21 +0000 (15:56 +0000)]
www-todo: We assume accesses to fixed-size arrays are in-bounds

llvm-svn: 223605

9 years agoR600/SI: Update instruction conversions for VI
Marek Olsak [Sun, 7 Dec 2014 12:19:03 +0000 (12:19 +0000)]
R600/SI: Update instruction conversions for VI

There are 3 changes:
- Convert 32-bit S_LSHL/LSHR/ASHR to their V_*REV variants for VI
- Lower RSQ_CLAMP for VI
- Don't generate MIN/MAX_LEGACY on VI

llvm-svn: 223604

9 years agoR600/SI: Add VI instructions
Marek Olsak [Sun, 7 Dec 2014 12:18:57 +0000 (12:18 +0000)]
R600/SI: Add VI instructions

llvm-svn: 223603

9 years agoR600/SI: Add SCC Defs/Uses to SOP1 and SOP2 opcodes
Marek Olsak [Sun, 7 Dec 2014 12:18:45 +0000 (12:18 +0000)]
R600/SI: Add SCC Defs/Uses to SOP1 and SOP2 opcodes

llvm-svn: 223602

9 years agoGive lit.cfg's threading options default values when not defined.
Eric Fiselier [Sun, 7 Dec 2014 08:52:19 +0000 (08:52 +0000)]
Give lit.cfg's threading options default values when not defined.

llvm-svn: 223601

9 years agoMark a couple of tests as XFAIL with older compilers.
Eric Fiselier [Sun, 7 Dec 2014 05:31:17 +0000 (05:31 +0000)]
Mark a couple of tests as XFAIL with older compilers.

llvm-svn: 223600

9 years agoConsolidate error reporting in lit.cfg
Eric Fiselier [Sun, 7 Dec 2014 04:28:50 +0000 (04:28 +0000)]
Consolidate error reporting in lit.cfg

llvm-svn: 223599

9 years agoRevert parts of r223594. Use DYLD_LIBRARY_PATH on OSX when running tests.
Eric Fiselier [Sun, 7 Dec 2014 00:34:23 +0000 (00:34 +0000)]
Revert parts of r223594. Use DYLD_LIBRARY_PATH on OSX when running tests.

llvm-svn: 223598

9 years agoFix apple clang detection in lit.cfg
Eric Fiselier [Sat, 6 Dec 2014 22:49:38 +0000 (22:49 +0000)]
Fix apple clang detection in lit.cfg

llvm-svn: 223597

9 years agoAdd some file content to avoid test failures on content-addressed file systems.
Richard Smith [Sat, 6 Dec 2014 22:12:07 +0000 (22:12 +0000)]
Add some file content to avoid test failures on content-addressed file systems.

llvm-svn: 223596

9 years agoAdd test file missed from r223561.
Richard Smith [Sat, 6 Dec 2014 22:11:06 +0000 (22:11 +0000)]
Add test file missed from r223561.

llvm-svn: 223595

9 years agoUnify and cleanup rpath handling in tests.
Eric Fiselier [Sat, 6 Dec 2014 22:08:51 +0000 (22:08 +0000)]
Unify and cleanup rpath handling in tests.

llvm-svn: 223594

9 years ago[libcxx] Add logic to probe compiler in tests.
Eric Fiselier [Sat, 6 Dec 2014 21:13:15 +0000 (21:13 +0000)]
[libcxx] Add logic to probe compiler in tests.

Summary:
This patch probes the cxx compiler used during testing by getting it to dump its predefined macros. Based on the value of these macros the compiler name and compiler name + version are added to the available features.

There are three compiler names:
- `clang`
- `apple-clang`
- `gcc`.

The available features added are equivalent to:
- `'%s' % compiler_name`
- `'%s-%s.%s' % compiler_name, major_version, minor_version`

This information can be used to XFAIL tests on different compilers / versions.

Reviewers: mclow.lists, danalbert, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

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

llvm-svn: 223593

9 years agoAdd support for building and testing libc++ without threads to CMake.
Eric Fiselier [Sat, 6 Dec 2014 21:02:58 +0000 (21:02 +0000)]
Add support for building and testing libc++ without threads to CMake.

Currently hacks must be used in to configure and build libc++ without threads
when using CMake. This patch adds CMake options to enable/disable building with
threads and a monotonic clock.

This patch also propagates the configuration information to lit so the tests
are properly configured as well.

llvm-svn: 223591

9 years agoImprove error message when _LIBCPP_HAS_NO_MONOTONIC_CLOCK is used improperly
Eric Fiselier [Sat, 6 Dec 2014 20:09:11 +0000 (20:09 +0000)]
Improve error message when _LIBCPP_HAS_NO_MONOTONIC_CLOCK is used improperly

llvm-svn: 223590

9 years agoTurn some DenseMaps that are only used for set operations into DenseSets.
Benjamin Kramer [Sat, 6 Dec 2014 19:22:54 +0000 (19:22 +0000)]
Turn some DenseMaps that are only used for set operations into DenseSets.

DenseSet has better memory efficiency now.

llvm-svn: 223589

9 years agoMake the DenseMap bucket type configurable and use a smaller bucket for DenseSet.
Benjamin Kramer [Sat, 6 Dec 2014 19:22:44 +0000 (19:22 +0000)]
Make the DenseMap bucket type configurable and use a smaller bucket for DenseSet.

DenseSet used to be implemented as DenseMap<Key, char>, which usually doubled
the memory footprint of the map. Now we use a compressed set so the second
element uses no memory at all. This required some surgery on DenseMap as
all accesses to the bucket now have to go through methods; this should
have no impact on the behavior of DenseMap though. The new default bucket
type for DenseMap is a slightly extended std::pair as we expose it through
DenseMap's iterator and don't want to break any existing users.

llvm-svn: 223588

9 years agoReapply "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."
Benjamin Kramer [Sat, 6 Dec 2014 13:12:56 +0000 (13:12 +0000)]
Reapply "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."

This reapplies r223478 with a fix for 32 bit targets.

llvm-svn: 223586

9 years agoConstantFold: Don't optimize comparisons with weak linkage objects
David Majnemer [Sat, 6 Dec 2014 11:58:33 +0000 (11:58 +0000)]
ConstantFold: Don't optimize comparisons with weak linkage objects

Consider:
void f() {}
void __attribute__((weak)) g() {}
bool b = &f != &g;

It's possble for g to resolve to f if --defsym=g=f is passed on to the
linker.

llvm-svn: 223585

9 years agoI didn't intend to commit this change.
David Majnemer [Sat, 6 Dec 2014 10:52:32 +0000 (10:52 +0000)]
I didn't intend to commit this change.

llvm-svn: 223584

9 years agoInstSimplify: Optimize away useless unsigned comparisons
David Majnemer [Sat, 6 Dec 2014 10:51:40 +0000 (10:51 +0000)]
InstSimplify: Optimize away useless unsigned comparisons

Code like X < Y && Y == 0 should always be folded away to false.

llvm-svn: 223583

9 years agoReformat.
NAKAMURA Takumi [Sat, 6 Dec 2014 05:57:06 +0000 (05:57 +0000)]
Reformat.

llvm-svn: 223580

9 years agoR600/SI: Restore PrivateGlobalPrefix to the default ELF value of ".L"
Tom Stellard [Sat, 6 Dec 2014 05:34:34 +0000 (05:34 +0000)]
R600/SI: Restore PrivateGlobalPrefix to the default ELF value of ".L"

This was changed in r223323.

llvm-svn: 223579

9 years agoRename a couple of preprocessor symbols to be more descriptive. NFC.
Paul Robinson [Sat, 6 Dec 2014 05:06:37 +0000 (05:06 +0000)]
Rename a couple of preprocessor symbols to be more descriptive. NFC.
Review feedback from recent changes to GetSVN.cmake.

llvm-svn: 223578

9 years ago[modules] If we import a module, and we've seen a module map that describes the
Richard Smith [Sat, 6 Dec 2014 03:21:08 +0000 (03:21 +0000)]
[modules] If we import a module, and we've seen a module map that describes the
module, use the path from the module map file in preference to the path from
the .pcm file when resolving relative paths in the .pcm file. This allows
diagnostics (and .d output) to give relative paths if the module was found via
a relative path.

llvm-svn: 223577

9 years agoAvoid angle brackets in comment. [-Wdocumentation-html]
NAKAMURA Takumi [Sat, 6 Dec 2014 03:11:46 +0000 (03:11 +0000)]
Avoid angle brackets in comment. [-Wdocumentation-html]

llvm-svn: 223576

9 years agoFixed an unfortunate reversed conditional that
Sean Callanan [Sat, 6 Dec 2014 02:31:49 +0000 (02:31 +0000)]
Fixed an unfortunate reversed conditional that
resulted in hard-to-track-down crashes.  Sigh.

llvm-svn: 223575

9 years agoIR: Disallow function-local metadata attachments
Duncan P. N. Exon Smith [Sat, 6 Dec 2014 02:29:44 +0000 (02:29 +0000)]
IR: Disallow function-local metadata attachments

Metadata attachments to instructions cannot be function-local.

This is part of PR21532.

llvm-svn: 223574

9 years agoLLVMInstrumentation requires MC since r223532.
NAKAMURA Takumi [Sat, 6 Dec 2014 02:22:11 +0000 (02:22 +0000)]
LLVMInstrumentation requires MC since r223532.

llvm-svn: 223573

9 years agoFix typo
Matt Arsenault [Sat, 6 Dec 2014 02:14:41 +0000 (02:14 +0000)]
Fix typo

llvm-svn: 223572

9 years agoAdd a proper triple to switch-jump-table.ll
Hans Wennborg [Sat, 6 Dec 2014 02:08:16 +0000 (02:08 +0000)]
Add a proper triple to switch-jump-table.ll

llvm-svn: 223571

9 years agollvm/test/CodeGen/X86/switch-jump-table.ll: Add explicit triple. Local labels have...
NAKAMURA Takumi [Sat, 6 Dec 2014 02:03:49 +0000 (02:03 +0000)]
llvm/test/CodeGen/X86/switch-jump-table.ll: Add explicit triple. Local labels have a prefix "." for targeting i686-cygming.

llvm-svn: 223570

9 years agoImprovements to FastDemangler to correct parsing of <local-name> encodings for string...
Kate Stone [Sat, 6 Dec 2014 01:42:41 +0000 (01:42 +0000)]
Improvements to FastDemangler to correct parsing of <local-name> encodings for string literal and parameter/entity cases.  Patch courtesy of slydiman.

llvm-svn: 223569

9 years agoReverting r223548 which broke running in the shell on OS X.
Jim Ingham [Sat, 6 Dec 2014 01:41:10 +0000 (01:41 +0000)]
Reverting r223548 which broke running in the shell on OS X.

llvm-svn: 223568

9 years ago[X86] Refactor PMOV[SZ]Xrm to add missing AVX2 patterns.
Ahmed Bougacha [Sat, 6 Dec 2014 01:31:07 +0000 (01:31 +0000)]
[X86] Refactor PMOV[SZ]Xrm to add missing AVX2 patterns.

Most patterns will go away once the extload legalization changes land.

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

llvm-svn: 223567

9 years agoSelectionDAG switch lowering: Replace unreachable default with most popular case.
Hans Wennborg [Sat, 6 Dec 2014 01:28:50 +0000 (01:28 +0000)]
SelectionDAG switch lowering: Replace unreachable default with most popular case.

This can significantly reduce the size of the switch, allowing for more
efficient lowering.

I also worked with the idea of exploiting unreachable defaults by
omitting the range check for jump tables, but always ended up with a
non-neglible binary size increase. It might be worth looking into some more.

SimplifyCFG currently does this transformation, but I'm working towards changing
that so we can optimize harder based on unreachable defaults.

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

llvm-svn: 223566

9 years agoAdd the ability to set breakpoints with conditions, commands, etc,
Jim Ingham [Sat, 6 Dec 2014 01:28:03 +0000 (01:28 +0000)]
Add the ability to set breakpoints with conditions, commands, etc,
in the "dummy-target".  The dummy target breakpoints prime all future
targets.  Breakpoints set before any target is created (e.g. breakpoints
in ~/.lldbinit) automatically get set in the dummy target.  You can also
list, add & delete breakpoints from the dummy target using the "-D" flag,
which is supported by most of the breakpoint commands.

This removes a long-standing wart in lldb...

<rdar://problem/10881487>

llvm-svn: 223565

9 years agoIR: Disallow complicated function-local metadata
Duncan P. N. Exon Smith [Sat, 6 Dec 2014 01:26:49 +0000 (01:26 +0000)]
IR: Disallow complicated function-local metadata

Disallow complex types of function-local metadata.  The only valid
function-local metadata is an `MDNode` whose sole argument is a
non-metadata function-local value.

Part of PR21532.

llvm-svn: 223564

9 years agoNo memcpy for copy ctor with -fsanitize-address-field-padding=1
Kostya Serebryany [Sat, 6 Dec 2014 01:23:08 +0000 (01:23 +0000)]
No memcpy for copy ctor with -fsanitize-address-field-padding=1

Summary:
When -fsanitize-address-field-padding=1 is present
don't emit memcpy for copy constructor.
Thanks Nico for the extra test case.

Test Plan: regression tests

Reviewers: thakis, rsmith

Reviewed By: rsmith

Subscribers: rsmith, cfe-commits

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

llvm-svn: 223563

9 years agoFix for xunit output to work around issue in Jenkins when tests are at the root level
Chris Matthews [Sat, 6 Dec 2014 01:13:49 +0000 (01:13 +0000)]
Fix for xunit output to work around issue in Jenkins when tests are at the root level

llvm-svn: 223562

9 years agoPR21217: Slightly more eagerly load -fmodule-map-file= files and provide
Richard Smith [Sat, 6 Dec 2014 01:13:41 +0000 (01:13 +0000)]
PR21217: Slightly more eagerly load -fmodule-map-file= files and provide
diagnostics if they don't exist. Based on a patch by John Thompson!

llvm-svn: 223561

9 years agoNow that we get types from modules, we occasionally
Sean Callanan [Sat, 6 Dec 2014 01:03:30 +0000 (01:03 +0000)]
Now that we get types from modules, we occasionally
encounter clang::ExternalASTSources that are not instances
of ClangExternalASTSourceCommon.  We used to blithely
assume that all are, and so we could use static_cast<>.
That's no longer the case, so we have to have these AST
sources register themselves.

llvm-svn: 223560

9 years agoFix a type (MAX_PATH instead of PATH_MAX) and remove an unused variable.
Jim Ingham [Sat, 6 Dec 2014 01:03:17 +0000 (01:03 +0000)]
Fix a type (MAX_PATH instead of PATH_MAX) and remove an unused variable.

llvm-svn: 223559

9 years agoAdd new-lines after module compiler errors so
Sean Callanan [Sat, 6 Dec 2014 00:56:43 +0000 (00:56 +0000)]
Add new-lines after module compiler errors so
they are readable.

llvm-svn: 223557

9 years agoUtils: Style cleanups, NFC
Duncan P. N. Exon Smith [Sat, 6 Dec 2014 00:48:17 +0000 (00:48 +0000)]
Utils: Style cleanups, NFC

llvm-svn: 223556

9 years agoUtils: Avoid RAUW on metadata in CloneFunction()
Duncan P. N. Exon Smith [Sat, 6 Dec 2014 00:48:13 +0000 (00:48 +0000)]
Utils: Avoid RAUW on metadata in CloneFunction()

llvm-svn: 223555

9 years agoCanonicalize multiplies by looking at whether the operands have any constants themsel...
Nick Lewycky [Sat, 6 Dec 2014 00:45:50 +0000 (00:45 +0000)]
Canonicalize multiplies by looking at whether the operands have any constants themselves. Patch by Tim Murray!

llvm-svn: 223554

9 years ago[TEST-COMMIT] As per Developer Policy, Added a blank line.
Neeraj Badlani [Sat, 6 Dec 2014 00:38:39 +0000 (00:38 +0000)]
[TEST-COMMIT] As per Developer Policy, Added a blank line.

llvm-svn: 223553

9 years agoAArch64: use explicit MVT::i64 when creating EXTRACT_SUBVECTOR nodes.
Tim Northover [Sat, 6 Dec 2014 00:33:37 +0000 (00:33 +0000)]
AArch64: use explicit MVT::i64 when creating EXTRACT_SUBVECTOR nodes.

All our patterns use MVT::i64, but the ISelLowering nodes were inconsistent in
their choice.

No functional change.

llvm-svn: 223551

9 years agoAdd an initial description of the rules for constructing new SB API classes.
Jim Ingham [Sat, 6 Dec 2014 00:28:05 +0000 (00:28 +0000)]
Add an initial description of the rules for constructing new SB API classes.

llvm-svn: 223550

9 years agoFix corner cases in lit xunit for paths with dots
Chris Matthews [Sat, 6 Dec 2014 00:21:08 +0000 (00:21 +0000)]
Fix corner cases in lit xunit for paths with dots

llvm-svn: 223549

9 years agoFix some posix assumptions related to running shell commands.
Zachary Turner [Sat, 6 Dec 2014 00:14:24 +0000 (00:14 +0000)]
Fix some posix assumptions related to running shell commands.

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

Reviewed By: Greg Clayton

llvm-svn: 223548

9 years agoAdditional safety for the root cause of regression in r223443; make the module
Richard Smith [Sat, 6 Dec 2014 00:09:19 +0000 (00:09 +0000)]
Additional safety for the root cause of regression in r223443; make the module
map path more canonical before hashing it. No functionality change.

llvm-svn: 223547

9 years agoRevert "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."
Benjamin Kramer [Sat, 6 Dec 2014 00:02:31 +0000 (00:02 +0000)]
Revert "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."

Somehow made DenseMap probe on forever on 32 bit machines.
This reverts commit r223478.

llvm-svn: 223546

9 years agoAdd a list iterable helper and use it to make a Breakpoint
Jim Ingham [Fri, 5 Dec 2014 23:21:30 +0000 (23:21 +0000)]
Add a list iterable helper and use it to make a Breakpoint
iterator in the BreakpointList class.

llvm-svn: 223544

9 years agoFirst pass at a description of the lldb coding conventions.
Jim Ingham [Fri, 5 Dec 2014 23:18:01 +0000 (23:18 +0000)]
First pass at a description of the lldb coding conventions.

llvm-svn: 223543

9 years ago[X86] Cleanup FCOPYSIGN lowering. NFC intended.
Ahmed Bougacha [Fri, 5 Dec 2014 23:11:36 +0000 (23:11 +0000)]
[X86] Cleanup FCOPYSIGN lowering. NFC intended.

llvm-svn: 223542

9 years agoFix some uninitialized variables in ClangExpressionParser.
Zachary Turner [Fri, 5 Dec 2014 22:54:56 +0000 (22:54 +0000)]
Fix some uninitialized variables in ClangExpressionParser.

Reviewed by: Sean Callanan

llvm-svn: 223541

9 years agoXFAILing suppression tests on Android. The suppression files are not being transfered...
Kuba Brecka [Fri, 5 Dec 2014 22:47:44 +0000 (22:47 +0000)]
XFAILing suppression tests on Android. The suppression files are not being transfered to the device.

llvm-svn: 223540

9 years ago[modules] Instead of storing absolute paths in a .pcm file, store the path to
Richard Smith [Fri, 5 Dec 2014 22:42:13 +0000 (22:42 +0000)]
[modules] Instead of storing absolute paths in a .pcm file, store the path to
the root of the module and use paths relative to that directory wherever
possible. This is a step towards allowing explicit modules to be relocated
without being rebuilt, which is important for some kinds of distributed builds,
for good paths in diagnostics, and for appropriate .d output.

This is a recommit of r223443, reverted in r223465; when joining together
imported file paths, we now use the system's separator rather than always
using '/'. This avoids path mismatches between the original module build and
the module user on Windows (at least, in some cases). A more comprehensive
fix will follow.

llvm-svn: 223539

9 years agoASTDumper: print whether a function is constexpr
Hans Wennborg [Fri, 5 Dec 2014 22:38:57 +0000 (22:38 +0000)]
ASTDumper: print whether a function is constexpr

llvm-svn: 223538

9 years agoSpecify the name of the generated header only once. NFC.
Paul Robinson [Fri, 5 Dec 2014 22:32:49 +0000 (22:32 +0000)]
Specify the name of the generated header only once. NFC.
This will also simplify a private patch that we have.

llvm-svn: 223537

9 years agoAdd target triples to all dfsan tests.
Peter Collingbourne [Fri, 5 Dec 2014 22:32:30 +0000 (22:32 +0000)]
Add target triples to all dfsan tests.

llvm-svn: 223536

9 years agoRecommit of r223513 and r223514.
Kuba Brecka [Fri, 5 Dec 2014 22:19:35 +0000 (22:19 +0000)]
Recommit of r223513 and r223514.

Reviewed at http://reviews.llvm.org/D6488

llvm-svn: 223533

9 years agoRecommit of r223513 and r223514.
Kuba Brecka [Fri, 5 Dec 2014 22:19:18 +0000 (22:19 +0000)]
Recommit of r223513 and r223514.

Reviewed at http://reviews.llvm.org/D6488

llvm-svn: 223532

9 years ago[mach-o] fix leak in atoms -> normalized
Nick Kledzik [Fri, 5 Dec 2014 22:03:28 +0000 (22:03 +0000)]
[mach-o] fix leak in atoms -> normalized

llvm-svn: 223530

9 years ago[mach-o] Switch MachOFile and MachODylibFile to use BumpPtr in lld::File
Nick Kledzik [Fri, 5 Dec 2014 22:03:26 +0000 (22:03 +0000)]
[mach-o] Switch MachOFile and MachODylibFile to use BumpPtr in lld::File

llvm-svn: 223529

9 years agoAdd BumpPtrAllocator to lld::File. Switch SimpleDefinedAtom to allocate
Nick Kledzik [Fri, 5 Dec 2014 22:03:23 +0000 (22:03 +0000)]
Add BumpPtrAllocator to lld::File.  Switch SimpleDefinedAtom to allocate
its SimpleRefernces using the BumpPtrAllocator.

llvm-svn: 223528

9 years ago[mach-o] Pass vectors by reference and name empty vector.
Nick Kledzik [Fri, 5 Dec 2014 22:03:20 +0000 (22:03 +0000)]
[mach-o] Pass vectors by reference and name empty vector.

llvm-svn: 223527

9 years agoMake DiagnosticErrorTrap work even if SuppressAllDiagnostics is enabled.
Richard Smith [Fri, 5 Dec 2014 21:52:58 +0000 (21:52 +0000)]
Make DiagnosticErrorTrap work even if SuppressAllDiagnostics is enabled.
Patch by Brad King!

llvm-svn: 223525

9 years ago[PECOFF] Fix exported symbols in an import library.
Rui Ueyama [Fri, 5 Dec 2014 21:52:02 +0000 (21:52 +0000)]
[PECOFF] Fix exported symbols in an import library.

Looks like if you have symbol foo in a module-definition file
(.def file), and if the actual symbol name to match that export
description is _foo@x (where x is an integer), the exported
symbol name becomes this.

  - foo in the .dll file
  - foo@x in the .lib file

I have checked in a few fixes recently for exported symbol name mangling.
I haven't found a simple rule that governs all the mangling rules.
There may not ever exist. For now, this is a patch to improve .lib
file compatibility.

llvm-svn: 223524

9 years ago[Hexagon] Relocating logical instructions and templates later in the td file.
Colin LeMahieu [Fri, 5 Dec 2014 21:51:12 +0000 (21:51 +0000)]
[Hexagon] Relocating logical instructions and templates later in the td file.

llvm-svn: 223523

9 years ago[Hexagon] Adding sub/and/or reg, imm forms
Colin LeMahieu [Fri, 5 Dec 2014 21:38:29 +0000 (21:38 +0000)]
[Hexagon] Adding sub/and/or reg, imm forms

llvm-svn: 223522

9 years agoRemove dead code. We are only lazy about functions with bodies.
Rafael Espindola [Fri, 5 Dec 2014 21:36:06 +0000 (21:36 +0000)]
Remove dead code. We are only lazy about functions with bodies.

llvm-svn: 223521

9 years agoReverting r223513 and r223514.
Kuba Brecka [Fri, 5 Dec 2014 21:32:46 +0000 (21:32 +0000)]
Reverting r223513 and r223514.

llvm-svn: 223520

9 years agoReverting r223513 and r223514.
Kuba Brecka [Fri, 5 Dec 2014 21:32:22 +0000 (21:32 +0000)]
Reverting r223513 and r223514.

llvm-svn: 223519

9 years agoOptimize merging of scalar loads for 32-byte vectors [X86, AVX]
Sanjay Patel [Fri, 5 Dec 2014 21:28:14 +0000 (21:28 +0000)]
Optimize merging of scalar loads for 32-byte vectors [X86, AVX]

Fix the poor codegen seen in PR21710 ( http://llvm.org/bugs/show_bug.cgi?id=21710 ).
Before we crack 32-byte build vectors into smaller chunks (and then subsequently
glue them back together), we should look for the easy case where we can just load
all elements in a single op.

An example of the codegen change is:

From:

vmovss  16(%rdi), %xmm1
vmovups (%rdi), %xmm0
vinsertps       $16, 20(%rdi), %xmm1, %xmm1
vinsertps       $32, 24(%rdi), %xmm1, %xmm1
vinsertps       $48, 28(%rdi), %xmm1, %xmm1
vinsertf128     $1, %xmm1, %ymm0, %ymm0
retq

To:

vmovups (%rdi), %ymm0
retq

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

llvm-svn: 223518

9 years ago[DFSAN][MIPS] adding support of DFSAN for MIPS64
Peter Collingbourne [Fri, 5 Dec 2014 21:22:36 +0000 (21:22 +0000)]
[DFSAN][MIPS] adding support of DFSAN for MIPS64

Minor changes to enable DFSAN on MIPS64

Patch by Kumar Sukhani!

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

llvm-svn: 223517

9 years ago[DFSAN][MIPS][LLVM] Defining ShadowPtrMask variable for MIPS64
Peter Collingbourne [Fri, 5 Dec 2014 21:22:32 +0000 (21:22 +0000)]
[DFSAN][MIPS][LLVM] Defining ShadowPtrMask variable for MIPS64

Patch by Kumar Sukhani!

corresponding compiler-rt patch: http://reviews.llvm.org/D6437
clang patch: http://reviews.llvm.org/D6147

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

llvm-svn: 223516

9 years ago[Hexagon] Updating mux_ir/ri/ii/rr with encoding bits
Colin LeMahieu [Fri, 5 Dec 2014 21:09:27 +0000 (21:09 +0000)]
[Hexagon] Updating mux_ir/ri/ii/rr with encoding bits

llvm-svn: 223515

9 years agoAddressSanitizer - Don't instrument globals from cstring_literals sections. (compiler...
Kuba Brecka [Fri, 5 Dec 2014 21:05:04 +0000 (21:05 +0000)]
AddressSanitizer - Don't instrument globals from cstring_literals sections. (compiler-rt part)

Reviewed at http://reviews.llvm.org/D6488

llvm-svn: 223514

9 years agoAddressSanitizer - Don't instrument globals from cstring_literals sections. (llvm...
Kuba Brecka [Fri, 5 Dec 2014 21:04:43 +0000 (21:04 +0000)]
AddressSanitizer - Don't instrument globals from cstring_literals sections. (llvm part)

Reviewed at http://reviews.llvm.org/D6488

llvm-svn: 223513

9 years agoSimplify the loop linking function bodies. NFC.
Rafael Espindola [Fri, 5 Dec 2014 21:04:36 +0000 (21:04 +0000)]
Simplify the loop linking function bodies. NFC.

llvm-svn: 223512

9 years agoAdd commands
Enrico Granata [Fri, 5 Dec 2014 20:59:08 +0000 (20:59 +0000)]
Add commands
type format info
type summary info
type synthetic info

These commands all take an expression, evaluate it, and show which of the respective formatter (if any) applies to the result of the expression

Fixes rdar://12059317

llvm-svn: 223511

9 years agoUse 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.
Jan Wen Voung [Fri, 5 Dec 2014 20:55:53 +0000 (20:55 +0000)]
Use 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.

Summary:
Follow up to [x32] "Use ebp/esp as frame and stack pointer":
http://reviews.llvm.org/D4617

In that earlier patch, NaCl64 was made to always use rbp.
That's needed for most cases because rbp should hold a full
64-bit address within the NaCl sandbox so that load/stores
off of rbp don't require sandbox adjustment (zeroing the top
32-bits, then filling those by adding r15).

However, llvm.frameaddress returns a pointer and pointers
are 32-bit for NaCl64. In this case, use ebp instead, which
will make the register copy type check. A similar mechanism
may be needed for llvm.eh.return, but is not added in this change.

Test Plan: test/CodeGen/X86/frameaddr.ll

Reviewers: dschuff, nadav

Subscribers: jfb, llvm-commits

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

llvm-svn: 223510

9 years ago[PowerPC]Update Power VSX test cases to also test fast-isel
Bill Seurer [Fri, 5 Dec 2014 20:32:05 +0000 (20:32 +0000)]
[PowerPC]Update Power VSX test cases to also test fast-isel

Update of some of the VSX test cases for Power to check fast-isel codegen as well as the regular codegen.

http://reviews.llvm.org/D6357

llvm-svn: 223509

9 years agoImplement AddressSanitizer suppressions.
Kuba Brecka [Fri, 5 Dec 2014 20:26:09 +0000 (20:26 +0000)]
Implement AddressSanitizer suppressions.

Adds 3 new suppression types, "interceptor_name", "interceptor_via_fun", "interceptor_via_lib".

Reviewed at http://reviews.llvm.org/D6280.

llvm-svn: 223508

9 years ago[PowerPC]Add VSX loads/stores to fastisel for PPC target
Bill Seurer [Fri, 5 Dec 2014 20:15:56 +0000 (20:15 +0000)]
[PowerPC]Add VSX loads/stores to fastisel for PPC target

This patch adds VSX floating point loads and stores to fastisel.

Along with the change to tablegen (D6220), VSX instructions are now fully supported in fastisel.

http://reviews.llvm.org/D6274

llvm-svn: 223507

9 years ago[Hexagon] Adding tfrih/l instructions.
Colin LeMahieu [Fri, 5 Dec 2014 20:07:19 +0000 (20:07 +0000)]
[Hexagon] Adding tfrih/l instructions.

llvm-svn: 223506

9 years ago[X86] Improved lowering of packed vector shifts to vpsllq/vpsrlq.
Andrea Di Biagio [Fri, 5 Dec 2014 20:02:22 +0000 (20:02 +0000)]
[X86] Improved lowering of packed vector shifts to vpsllq/vpsrlq.

SSE2/AVX non-constant packed shift instructions only use the lower 64-bit of
the shift count.

This patch teaches function 'getTargetVShiftNode' how to deal with shifts
where the shift count node is of type MVT::i64.

Before this patch, function 'getTargetVShiftNode' only knew how to deal with
shift count nodes of type MVT::i32. This forced the backend to wrongly
truncate the shift count to MVT::i32, and then zero-extend it back to MVT::i64.

llvm-svn: 223505

9 years ago[Hexagon] Adding add reg, imm form with encoding bits and test.
Colin LeMahieu [Fri, 5 Dec 2014 19:51:23 +0000 (19:51 +0000)]
[Hexagon] Adding add reg, imm form with encoding bits and test.

llvm-svn: 223504

9 years agoRemove unused arguments. NFC.
Rafael Espindola [Fri, 5 Dec 2014 19:35:07 +0000 (19:35 +0000)]
Remove unused arguments. NFC.

llvm-svn: 223503

9 years agoThese two calls were grabbing the same register info. Unify them.
Eric Christopher [Fri, 5 Dec 2014 19:23:55 +0000 (19:23 +0000)]
These two calls were grabbing the same register info. Unify them.

llvm-svn: 223502

9 years agoFix a bunch of [-Werror,-Winconsistent-missing-override] warnings.
Eric Christopher [Fri, 5 Dec 2014 19:21:49 +0000 (19:21 +0000)]
Fix a bunch of [-Werror,-Winconsistent-missing-override] warnings.

llvm-svn: 223501

9 years agoBFI: Saturate when combining edges to a successor
Duncan P. N. Exon Smith [Fri, 5 Dec 2014 19:13:42 +0000 (19:13 +0000)]
BFI: Saturate when combining edges to a successor

When a loop gets bundled up, its outgoing edges are quite large, and can
just barely overflow 64-bits.  If one successor has multiple incoming
edges -- and that successor is getting all the incoming mass --
combining just its edges can overflow.  Handle that by saturating rather
than asserting.

This fixes PR21622.

llvm-svn: 223500

9 years agoFix a few default label in switch which covers all
Eric Christopher [Fri, 5 Dec 2014 19:09:02 +0000 (19:09 +0000)]
Fix a few default label in switch which covers all
enumeration values [-Werror,-Wcovered-switch-default]
warnings.

llvm-svn: 223499

9 years agoSubtract the size of the breakpoint opcode from the PC when getting the bp site.
Zachary Turner [Fri, 5 Dec 2014 18:46:14 +0000 (18:46 +0000)]
Subtract the size of the breakpoint opcode from the PC when getting the bp site.

llvm-svn: 223498

9 years agoLoad / unload modules in the target when the OS events occur.
Zachary Turner [Fri, 5 Dec 2014 18:46:04 +0000 (18:46 +0000)]
Load / unload modules in the target when the OS events occur.

This causes all deferred breakpoints to be correctly resolved as
the modules that they reside in are loaded.

llvm-svn: 223497

9 years agoImplement an empty DynamicLoader plugin for Windows.
Zachary Turner [Fri, 5 Dec 2014 18:45:53 +0000 (18:45 +0000)]
Implement an empty DynamicLoader plugin for Windows.

llvm-svn: 223496

9 years ago[Hexagon] Adding DoubleRegs decoder. Moving C2_mux and A2_nop. Adding combine imm...
Colin LeMahieu [Fri, 5 Dec 2014 18:24:06 +0000 (18:24 +0000)]
[Hexagon] Adding DoubleRegs decoder.  Moving C2_mux and A2_nop.  Adding combine imm-imm form.

llvm-svn: 223494