platform/upstream/llvm.git
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

9 years agoFix a bug when pretty-printing DW_OP_deref.
Adrian Prantl [Fri, 5 Dec 2014 18:19:38 +0000 (18:19 +0000)]
Fix a bug when pretty-printing DW_OP_deref.

llvm-svn: 223493

9 years agoRegenerate this stale testcase from source.
Adrian Prantl [Fri, 5 Dec 2014 18:19:32 +0000 (18:19 +0000)]
Regenerate this stale testcase from source.

llvm-svn: 223492

9 years ago[CodeGenPrepare] Use variables for reused values. NFC.
Ahmed Bougacha [Fri, 5 Dec 2014 18:04:40 +0000 (18:04 +0000)]
[CodeGenPrepare] Use variables for reused values. NFC.

llvm-svn: 223491

9 years agoWorkaround attribute ordering issue with kernel only attributes
Matt Arsenault [Fri, 5 Dec 2014 18:03:58 +0000 (18:03 +0000)]
Workaround attribute ordering issue with kernel only attributes

Placing the attribute after the kernel keyword would incorrectly
reject the attribute, so use the smae workaround that other
kernel only attributes use.

Also add a FIXME because there are two different phrasings now
for the same error, althoug amdgpu_num_[sv]gpr uses a consistent one.

llvm-svn: 223490

9 years agoUse else if when checking multiple attributes.
Matt Arsenault [Fri, 5 Dec 2014 18:03:55 +0000 (18:03 +0000)]
Use else if when checking multiple attributes.

Only one of these can really match.

llvm-svn: 223489

9 years ago[Hexagon] [NFC] Rearranging patterns and mux instruction.
Colin LeMahieu [Fri, 5 Dec 2014 17:58:06 +0000 (17:58 +0000)]
[Hexagon] [NFC] Rearranging patterns and mux instruction.

llvm-svn: 223488

9 years ago[Hexagon] [NFC] Rearranging def order.
Colin LeMahieu [Fri, 5 Dec 2014 17:55:51 +0000 (17:55 +0000)]
[Hexagon] [NFC] Rearranging def order.

llvm-svn: 223487

9 years agoRefactor duplicated code. NFC.
Rafael Espindola [Fri, 5 Dec 2014 17:53:15 +0000 (17:53 +0000)]
Refactor duplicated code. NFC.

llvm-svn: 223486

9 years ago[Hexagon] Adding combine reg-reg forms.
Colin LeMahieu [Fri, 5 Dec 2014 17:38:36 +0000 (17:38 +0000)]
[Hexagon] Adding combine reg-reg forms.

llvm-svn: 223485

9 years agoFix compilation errors after clang modules checkin.
Zachary Turner [Fri, 5 Dec 2014 17:38:20 +0000 (17:38 +0000)]
Fix compilation errors after clang modules checkin.

llvm-svn: 223484

9 years ago[ASan] Refactor thread starting code.
Sergey Matveev [Fri, 5 Dec 2014 17:31:13 +0000 (17:31 +0000)]
[ASan] Refactor thread starting code.

Move thread context creation into AsanThread::Create().

llvm-svn: 223483

9 years ago[Hexagon] Marking several instructions as isCodeGenOnly=0 and adding direct disassemb...
Colin LeMahieu [Fri, 5 Dec 2014 17:27:39 +0000 (17:27 +0000)]
[Hexagon] Marking several instructions as isCodeGenOnly=0 and adding direct disassembly tests for many instructions.

llvm-svn: 223482

9 years agoBe less conservative about when we build the gold plugin.
Rafael Espindola [Fri, 5 Dec 2014 17:25:52 +0000 (17:25 +0000)]
Be less conservative about when we build the gold plugin.

It is only build if LLVM_BINUTILS_INCDIR is explicitly given, so there is
no point in having extra restrictions.

llvm-svn: 223481

9 years ago[LSan] Rewrite the test from r223419 to not use C++11.
Sergey Matveev [Fri, 5 Dec 2014 17:21:43 +0000 (17:21 +0000)]
[LSan] Rewrite the test from r223419 to not use C++11.

This was causing build failures on llvm-clang-lld-x86_64-centos-6.5 for some
reason. Anyway, the new way is better because we no longer rely on std::thread
implementation details.

llvm-svn: 223480

9 years agoAmending r223468 with this documentation change.
Aaron Ballman [Fri, 5 Dec 2014 17:11:49 +0000 (17:11 +0000)]
Amending r223468 with this documentation change.

llvm-svn: 223479

9 years agoLLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps.
Benjamin Kramer [Fri, 5 Dec 2014 17:03:01 +0000 (17:03 +0000)]
LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps.

Required some APInt massaging to get proper empty/tombstone values. Apart
from making the code a bit simpler this also reduces the bucket size of
the ConstantInt map from 32 to 24 bytes.

llvm-svn: 223478

9 years ago[ASan] Fix Win build following r223419.
Sergey Matveev [Fri, 5 Dec 2014 16:53:58 +0000 (16:53 +0000)]
[ASan] Fix Win build following r223419.

llvm-svn: 223477

9 years agoImprovements to ARM assembler tests
Asiri Rathnayake [Fri, 5 Dec 2014 16:33:56 +0000 (16:33 +0000)]
Improvements to ARM assembler tests

No functional changes. Got myself bitten in r223113 when adding support for
modified immediate syntax (regressions reported by joerg@britannica.bec.de,
fixes in r223366 and r223381). Our assembler tests did not cover serveral
different syntax variants. This patch expands the test coverage to check for
the following cases:

1. Modified immediate operands may be expressed with expressions, as in #(4 * 2)
instead of #8.

2. Modified immediate operands may be _optionally_ prefixed by a '#' symbol or a
'$' symbol.

3. Certain instructions (e.g. ADD) support single input register variants;
[ADD r0, #mod_imm] is same as [ADD r0, r0, #mod_imm].

4. Certain instructions have aliases which convert plain immediates to modified
immediates. For an example, [ADD r0, -10] is not valid because -10 (in two's
complement) cannot be encoded as a modified immediate, but ARMInstrInfo.td
defines an alias which can transform this into a [SUB r0, 10].

llvm-svn: 223475

9 years agoSmall cleanup on how we clear constant variables. NFC.
Rafael Espindola [Fri, 5 Dec 2014 16:05:19 +0000 (16:05 +0000)]
Small cleanup on how we clear constant variables. NFC.

llvm-svn: 223474

9 years agoUpdate TargetTriple format info.
Chad Rosier [Fri, 5 Dec 2014 16:05:14 +0000 (16:05 +0000)]
Update TargetTriple format info.
Phabricator revision: http://reviews.llvm.org/D6543

llvm-svn: 223473

9 years agoFix typos in llvm/IR/Module.h
Chad Rosier [Fri, 5 Dec 2014 16:02:06 +0000 (16:02 +0000)]
Fix typos in llvm/IR/Module.h
Phabricator revision: http://reviews.llvm.org/D6535

llvm-svn: 223472

9 years agoFix Typos in include/clang-c/Index.h
Chad Rosier [Fri, 5 Dec 2014 15:50:44 +0000 (15:50 +0000)]
Fix Typos in include/clang-c/Index.h
Phabricator revision: http://reviews.llvm.org/D6507

llvm-svn: 223471

9 years agoUse an early return. NFC.
Rafael Espindola [Fri, 5 Dec 2014 15:42:30 +0000 (15:42 +0000)]
Use an early return. NFC.

llvm-svn: 223470

9 years agotsan: fix test
Dmitry Vyukov [Fri, 5 Dec 2014 15:42:17 +0000 (15:42 +0000)]
tsan: fix test

this test is flaky because of ASLR
app memory is 7e8000000000-800000000000,
there may or may not be a 1TB hole depending on
where ASLR will choose to map libraries

llvm-svn: 223469

9 years agoModify __has_attribute so that it only looks for GNU-style attributes. Removes the...
Aaron Ballman [Fri, 5 Dec 2014 15:24:55 +0000 (15:24 +0000)]
Modify __has_attribute so that it only looks for GNU-style attributes. Removes the ability to look for generic attributes and keywords via this macro, which has the potential to be a breaking change. However, since there is __has_cpp_attribute and __has_declspec_attribute, and given the limited usefulness of querying a generic attribute name regardless of syntax, this seems like the correct path forward.

llvm-svn: 223468

9 years agoAdded a new preprocessor macro: __has_declspec_attribute. This can be used as a way...
Aaron Ballman [Fri, 5 Dec 2014 15:05:29 +0000 (15:05 +0000)]
Added a new preprocessor macro: __has_declspec_attribute. This can be used as a way to determine whether Clang supports a __declspec spelling for a given attribute, similar to  __has_attribute and __has_cpp_attribute.

llvm-svn: 223467

9 years agoTemporarily reverting r223443 due to bot breakage.
Aaron Ballman [Fri, 5 Dec 2014 14:52:04 +0000 (14:52 +0000)]
Temporarily reverting r223443 due to bot breakage.

llvm-svn: 223465