platform/upstream/llvm.git
9 years agoA fix for PR21176.
Ekaterina Romanova [Wed, 10 Dec 2014 23:19:56 +0000 (23:19 +0000)]
A fix for PR21176.

DW_OP_const <const> doesn't describe a constant value, but a value at a constant address.
The proper way to describe a constant value is DW_OP_constu <const>, DW_OP_stack_value.

Added DW_OP_stack_value to the stack.

-This line, and those below, will be ignored--

M    lib/CodeGen/AsmPrinter/DwarfDebug.cpp
A    test/DebugInfo/incorrect-variable-debugloc1.ll

llvm-svn: 223981

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

llvm-svn: 223980

9 years agoForgot to commit this change with r223975
David Majnemer [Wed, 10 Dec 2014 23:08:43 +0000 (23:08 +0000)]
Forgot to commit this change with r223975

llvm-svn: 223979

9 years agoLiveInterval: Use more range based for loops for value numbers and segments.
Matthias Braun [Wed, 10 Dec 2014 23:07:54 +0000 (23:07 +0000)]
LiveInterval: Use more range based for loops for value numbers and segments.

llvm-svn: 223978

9 years agoAdd a FIXME for unifying ARM target abi handling.
Eric Christopher [Wed, 10 Dec 2014 22:58:34 +0000 (22:58 +0000)]
Add a FIXME for unifying ARM target abi handling.

llvm-svn: 223977

9 years agoRevert the default changing behavior part of r216662 until we
Eric Christopher [Wed, 10 Dec 2014 22:58:32 +0000 (22:58 +0000)]
Revert the default changing behavior part of r216662 until we
can change the backend to be the same default. Leave the
modified/new testcases with the exception of the default behavior
since it increases our testing footprint.

llvm-svn: 223976

9 years agoAST: Properly calculate the linkage of a IndirectFieldDecl
David Majnemer [Wed, 10 Dec 2014 22:58:14 +0000 (22:58 +0000)]
AST: Properly calculate the linkage of a IndirectFieldDecl

getLVForNamespaceScopeDecl believed that it wasn't possible for it to
ever see an IndirectFieldDecl.  However, this can occur when determining
whether or not something is a redeclaration of a member of an anonymous
static union.

This fixes PR21858.

llvm-svn: 223975

9 years agoFix PR21694. r219517 added a use of SCEV divide in HowFarToZero computation. This...
Mark Heffernan [Wed, 10 Dec 2014 22:53:52 +0000 (22:53 +0000)]
Fix PR21694. r219517 added a use of SCEV divide in HowFarToZero computation.  This divide can produce incorrect results as we are using an unsigned divide for what should be a modular divide.  This change reverts back to a more conservative computation using trailing zeros.

llvm-svn: 223974

9 years agoFix a bunch of [-Werror,-Winconsistent-missing-override] warnings.
Eric Christopher [Wed, 10 Dec 2014 22:29:58 +0000 (22:29 +0000)]
Fix a bunch of [-Werror,-Winconsistent-missing-override] warnings.

llvm-svn: 223973

9 years agoSilence -Winconsistent-missing-override warnings.
Eric Christopher [Wed, 10 Dec 2014 22:24:56 +0000 (22:24 +0000)]
Silence -Winconsistent-missing-override warnings.

llvm-svn: 223972

9 years ago[Hexagon] Adding combine ri/ir instructions.
Colin LeMahieu [Wed, 10 Dec 2014 22:23:07 +0000 (22:23 +0000)]
[Hexagon] Adding combine ri/ir instructions.

llvm-svn: 223971

9 years agoConstantFold: Clean up X * undef code
David Majnemer [Wed, 10 Dec 2014 21:58:17 +0000 (21:58 +0000)]
ConstantFold: Clean up X * undef code

No functional change intended.

llvm-svn: 223970

9 years agoConstantFold, InstSimplify: undef >>a x can be either -1 or 0, choose 0
David Majnemer [Wed, 10 Dec 2014 21:58:15 +0000 (21:58 +0000)]
ConstantFold, InstSimplify: undef >>a x can be either -1 or 0, choose 0

Zero is usually a nicer constant to have than -1.

llvm-svn: 223969

9 years agoConstantFold: an undef shift amount results in undef
David Majnemer [Wed, 10 Dec 2014 21:38:05 +0000 (21:38 +0000)]
ConstantFold: an undef shift amount results in undef

X shifted by undef results in undef because the undef value can
represent values greater than the width of the operands.

llvm-svn: 223968

9 years ago[Hexagon] Adding encodings for JR class instructions. Updating complier usages.
Colin LeMahieu [Wed, 10 Dec 2014 21:24:10 +0000 (21:24 +0000)]
[Hexagon] Adding encodings for JR class instructions.  Updating complier usages.

llvm-svn: 223967

9 years agoFixed an 80-column violation.
Sean Callanan [Wed, 10 Dec 2014 21:22:20 +0000 (21:22 +0000)]
Fixed an 80-column violation.

Thanks to Nico Weber for spotting this.

llvm-svn: 223966

9 years agoDo not run dead code elimination by default
Tobias Grosser [Wed, 10 Dec 2014 21:12:23 +0000 (21:12 +0000)]
Do not run dead code elimination by default

The dead code elimination is a pass that looks very promising, but needs some
more compile-time tuning before enabling it by default seems sensible.

llvm-svn: 223965

9 years agoMove three methods only used by MCJIT to MCJIT.
Rafael Espindola [Wed, 10 Dec 2014 20:46:55 +0000 (20:46 +0000)]
Move three methods only used by MCJIT to MCJIT.

These methods are only used by MCJIT and are very specific to it. In fact, they
are also fairly specific to the fact that we have a dynamic linker of
relocatable objects.

llvm-svn: 223964

9 years ago[ELF] Allow target to adjust a symbol's value for using in a dynamic tag
Simon Atanasyan [Wed, 10 Dec 2014 20:09:12 +0000 (20:09 +0000)]
[ELF] Allow target to adjust a symbol's value for using in a dynamic tag

Some targets like microMIPS and ARM Thumb use the last bit of a symbol's
value to mark 'compressed' code. This patch adds new virtual function
`DynamicTable::getAtomVirtualAddress` which allows to adjust a symbol's
value before using it in a dynamic table tags like DT_INIT / DT_FINI.

llvm-svn: 223963

9 years agoDR1891, PR21787: a lambda closure type has no default constructor, rather than
Richard Smith [Wed, 10 Dec 2014 20:04:48 +0000 (20:04 +0000)]
DR1891, PR21787: a lambda closure type has no default constructor, rather than
having a deleted default constructor.

llvm-svn: 223953

9 years ago[AArch64] MachO large code-model: Materialize FP constants in code.
Juergen Ributzka [Wed, 10 Dec 2014 19:43:32 +0000 (19:43 +0000)]
[AArch64] MachO large code-model: Materialize FP constants in code.

In the large code model we have to first get the address of the GOT entry, load
the address of the constant, and then load the constant itself.

To avoid these loads and the GOT entry alltogether this commit changes the way
how FP constants are materialized in the large code model. The constats are now
materialized in a GPR and then bitconverted/moved into the FPR.

Reviewed by Tim Northover

Fixes rdar://problem/16572564.

llvm-svn: 223941

9 years agoR600/SI: Use getTargetConstant in AdjustRegClass
Marek Olsak [Wed, 10 Dec 2014 19:25:31 +0000 (19:25 +0000)]
R600/SI: Use getTargetConstant in AdjustRegClass

llvm-svn: 223940

9 years agoAdded support to the expression parser for finding
Sean Callanan [Wed, 10 Dec 2014 19:23:29 +0000 (19:23 +0000)]
Added support to the expression parser for finding
Objective-C types and enums in modules.  We now have
a three-stage fallback when looking for methods and
properties: first the DWARF, second the modules, third
the runtime.

<rdar://problem/18782288>

llvm-svn: 223939

9 years agoMake test case 32/64 bit neutral
David Blaikie [Wed, 10 Dec 2014 19:19:24 +0000 (19:19 +0000)]
Make test case 32/64 bit neutral

llvm-svn: 223938

9 years agoDebugInfo: Location information for scalar new expressions
David Blaikie [Wed, 10 Dec 2014 19:04:09 +0000 (19:04 +0000)]
DebugInfo: Location information for scalar new expressions

llvm-svn: 223937

9 years agoclang-format: Factor out UnwrappedLineFormatter into a separate file.
Daniel Jasper [Wed, 10 Dec 2014 19:00:42 +0000 (19:00 +0000)]
clang-format: Factor out UnwrappedLineFormatter into a separate file.

No functional changes intended.

llvm-svn: 223936

9 years agoAdded a testcase to make sure the parser allows
Sean Callanan [Wed, 10 Dec 2014 18:57:09 +0000 (18:57 +0000)]
Added a testcase to make sure the parser allows
but ignores module imports in debugger mode,
even inside functions.

llvm-svn: 223935

9 years agoObjective-C SDK modernizer. When modernizing an enum to
Fariborz Jahanian [Wed, 10 Dec 2014 18:25:24 +0000 (18:25 +0000)]
Objective-C SDK modernizer. When modernizing an enum to
NS_ENUM/NS_OPTIONS use the underlying type if there is
no associated type. rdar://19198042

llvm-svn: 223934

9 years ago[Hexagon] Adding JR class predicated call reg instructions.
Colin LeMahieu [Wed, 10 Dec 2014 18:24:16 +0000 (18:24 +0000)]
[Hexagon] Adding JR class predicated call reg instructions.

llvm-svn: 223933

9 years agoUpdate ASan/Win test expectations broken by r223508
Timur Iskhodzhanov [Wed, 10 Dec 2014 17:56:29 +0000 (17:56 +0000)]
Update ASan/Win test expectations broken by r223508

llvm-svn: 223932

9 years agoAdded documentation for MergeFunctions pass:
Stepan Dyatkovskiy [Wed, 10 Dec 2014 17:42:01 +0000 (17:42 +0000)]
Added documentation for MergeFunctions pass:
Pass looks for equivalent functions that are mergable and folds them.

llvm-svn: 223931

9 years agoclang-format: Remove a few else after return statements.
Daniel Jasper [Wed, 10 Dec 2014 17:24:34 +0000 (17:24 +0000)]
clang-format: Remove a few else after return statements.

They are against the LLVM coding conventions. No functional changes
intended.

llvm-svn: 223930

9 years agoMatch new shuffle codegen for MOVHPD patterns
Sanjay Patel [Wed, 10 Dec 2014 16:58:54 +0000 (16:58 +0000)]
Match new shuffle codegen for MOVHPD patterns

Add patterns to match SSE (shufpd) and AVX (vpermilpd) shuffle codegen
when storing the high element of a v2f64. The existing patterns were
only checking for an unpckh type of shuffle.

http://llvm.org/bugs/show_bug.cgi?id=21791

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

llvm-svn: 223929

9 years agoOpenCL C: Add support for a set of floating point
Pekka Jaaskelainen [Wed, 10 Dec 2014 16:41:14 +0000 (16:41 +0000)]
OpenCL C: Add support for a set of floating point
arithmetic relaxation flags:

-cl-no-signed-zeros
-cl-unsafe-math-optimizations
-cl-finite-math-only
-cl-fast-relaxed-math

Propagate the info to FP instruction flags as well
as function attributes where they are available.

llvm-svn: 223928

9 years ago[mips] Removing __SIZEOF_INT128__ macro for MIPS64
Simon Atanasyan [Wed, 10 Dec 2014 15:44:07 +0000 (15:44 +0000)]
[mips] Removing __SIZEOF_INT128__ macro for MIPS64

This is a temporary workaround while MIPS64 has not yet fully supported
128-bit integers. But declaration of int128 type is necessary even though
`__SIZEOF_INT128__` is undefined because c++ standard header files like
`limits` throw error message if `__int128` is not available.

Patch by Sagar Thakur.

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

llvm-svn: 223927

9 years agoSilencing a -Wsequence-point warning, and the resulting undefined behavior. NFC.
Aaron Ballman [Wed, 10 Dec 2014 14:14:54 +0000 (14:14 +0000)]
Silencing a -Wsequence-point warning, and the resulting undefined behavior. NFC.

llvm-svn: 223926

9 years ago[sanitizer] Disable compile-time checks for __kernel_old_uid_t size on aarch64.
Evgeniy Stepanov [Wed, 10 Dec 2014 11:44:09 +0000 (11:44 +0000)]
[sanitizer] Disable compile-time checks for __kernel_old_uid_t size on aarch64.

Should fix PR21476.

llvm-svn: 223925

9 years agoConstantFold: div undef, 0 should fold to undef, not zero
David Majnemer [Wed, 10 Dec 2014 09:14:55 +0000 (09:14 +0000)]
ConstantFold: div undef, 0 should fold to undef, not zero

Dividing by zero yields an undefined value.

llvm-svn: 223924

9 years agoInstSimplify: [al]shr exact undef, %X -> undef
David Majnemer [Wed, 10 Dec 2014 09:14:52 +0000 (09:14 +0000)]
InstSimplify: [al]shr exact undef, %X -> undef

Exact shifts always keep the non-zero bits of their input.  This means
it keeps it's undef bits.

llvm-svn: 223923

9 years ago[X86] Make a code path in EltsFromConsecutiveLoads work only on vectors it expects
Michael Kuperstein [Wed, 10 Dec 2014 08:46:12 +0000 (08:46 +0000)]
[X86] Make a code path in EltsFromConsecutiveLoads work only on vectors it expects

EltsFromConsecutiveLoads was apparently only ever called for 128-bit vectors, and assumed this implicitly. r223518 started calling it for AVX-sized vectors, causing the code path that had this assumption to crash.
This adds a check to make this path fire only for 128-bit vectors.

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

llvm-svn: 223922

9 years agoclang/test/Modules/modular_maps.cpp REQUIRES shell. chdir is unsupported on Lit inter...
NAKAMURA Takumi [Wed, 10 Dec 2014 08:20:32 +0000 (08:20 +0000)]
clang/test/Modules/modular_maps.cpp REQUIRES shell. chdir is unsupported on Lit internal runner.

llvm-svn: 223921

9 years agoRemove unreachable return statement.
Rui Ueyama [Wed, 10 Dec 2014 08:12:06 +0000 (08:12 +0000)]
Remove unreachable return statement.

llvm-svn: 223920

9 years agoInstSimplify: div %X, 0 -> undef
David Majnemer [Wed, 10 Dec 2014 07:52:18 +0000 (07:52 +0000)]
InstSimplify: div %X, 0 -> undef

We already optimized rem %X, 0 to undef, we should do the same for div.

llvm-svn: 223919

9 years agoUse unique_ptr instead of DeleteContainerSeconds.
Craig Topper [Wed, 10 Dec 2014 06:18:57 +0000 (06:18 +0000)]
Use unique_ptr instead of DeleteContainerSeconds.

llvm-svn: 223918

9 years ago[ELF] Make -init/-fini options compatible with the gnu linker
Simon Atanasyan [Wed, 10 Dec 2014 05:38:46 +0000 (05:38 +0000)]
[ELF] Make -init/-fini options compatible with the gnu linker

The LLD linker searches initializer and finalizer function names
and emits DT_INIT/DT_FINI dynamic table tags to point to these symbols.
The -init/-fini command line options override initializer ("_init") and
finalizer ("_fini") function names used by default.

Now the -init/-fini options do not affect .init_array/.fini_array
sections. The corresponding code has been removed.

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

llvm-svn: 223917

9 years agoClangFunction: Fix destruction order of parser and execution unit
Duncan P. N. Exon Smith [Wed, 10 Dec 2014 04:59:18 +0000 (04:59 +0000)]
ClangFunction: Fix destruction order of parser and execution unit

Fix PR21802 by correcting the destruction order of
`ClangExpressionParser` and `IRExecutionUnit` in `ClangFunction`.  The
former has hooks into the latter -- i.e., `clang::CGDebugInfo` points at
the `LLVMContext` -- so it needs to be torn down first.

This was exposed by r223802 in LLVM, which started doing work in the
`CGDebugInfo` teardown.

llvm-svn: 223916

9 years ago[LIT] Add support for `UNSUPPORTED` tag to `TestRunner.parseIntegratedTestScript`
Eric Fiselier [Wed, 10 Dec 2014 03:42:09 +0000 (03:42 +0000)]
[LIT] Add support for `UNSUPPORTED` tag to `TestRunner.parseIntegratedTestScript`

Summary:
This patch gives me just enough to leverage the existing functionality in `TestRunner` for use in `libc++` and `libc++abi` .

It does the following:
* Adds the `UNSUPPORTED` tag to `TestRunner.parseIntegratedTestScript`.
* Allows `parseIntegratedTestScript` to return an empty script if a script is not required by the caller.

Reviewers: ddunbar, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits, llvm-commits

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

llvm-svn: 223915

9 years agoUpdate to match clang r223913.
Richard Smith [Wed, 10 Dec 2014 03:10:06 +0000 (03:10 +0000)]
Update to match clang r223913.

llvm-svn: 223914

9 years agoReinstate r223753, reverted in r223759 due to breakage of clang-tools-extra.
Richard Smith [Wed, 10 Dec 2014 03:09:48 +0000 (03:09 +0000)]
Reinstate r223753, reverted in r223759 due to breakage of clang-tools-extra.
Original commit message:

[modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1.

For files named by -fmodule-map-file=, and files found by 'extern module'
directives, this flag specifies that we should resolve filenames relative to
the current working directory rather than relative to the directory in which
the module map file resides. This is aimed at fixing path handling, in
particular for relative -I paths, when building modules that represent
components of the current project (rather than libraries installed on the
current system, which the current project has as dependencies, where we'd
typically expect the module map files to be looked up implicitly).

llvm-svn: 223913

9 years agoFixed the AST importer ot use redeclaration contexts properly.
Sean Callanan [Wed, 10 Dec 2014 03:09:41 +0000 (03:09 +0000)]
Fixed the AST importer ot use redeclaration contexts properly.

To ensure that we don't import duplicates, the ASTImporter often
checks the DeclContext for a Decl before importing it to see if
a Decl with the same name is already present.

This is problematic if the Decl is inside a transparent context
like an extern "C" block.  Lookup isn't allowed on such contexts,
and in fact they assert() if you do that.  So instead we look at
the redeclaration context -- the containing context that can be
used safely for these kinds of checks -- instead.

llvm-svn: 223912

9 years agoDataLayout: Provide nicer diagnostics for malformed strings
David Majnemer [Wed, 10 Dec 2014 02:36:41 +0000 (02:36 +0000)]
DataLayout: Provide nicer diagnostics for malformed strings

llvm-svn: 223911

9 years agobuiltins: cleanup constant data section selection
Saleem Abdulrasool [Wed, 10 Dec 2014 02:36:22 +0000 (02:36 +0000)]
builtins: cleanup constant data section selection

Each of the object formats use a different directive for selecting the constant
section.  Use a macro to avoid the duplication across a number of files.  Also
correct a small macro mismatch on the Windows case (HIDDEN_DIRECTIVE -> HIDDEN).

Patch by Vadim Chugunov!

llvm-svn: 223910

9 years ago[DD] Don't store the second copy of CommonFlags inside DDFlags.
Alexey Samsonov [Wed, 10 Dec 2014 02:30:04 +0000 (02:30 +0000)]
[DD] Don't store the second copy of CommonFlags inside DDFlags.

llvm-svn: 223909

9 years ago[CMake] Make sure dd is built as a part of compiler-rt.
Alexey Samsonov [Wed, 10 Dec 2014 02:14:15 +0000 (02:14 +0000)]
[CMake] Make sure dd is built as a part of compiler-rt.

Remove unused variables and definitions in CMake files
for TSan and DD (deadlock detector).

llvm-svn: 223908

9 years agoAsmParser: Don't allow null bytes in BB labels
David Majnemer [Wed, 10 Dec 2014 02:10:35 +0000 (02:10 +0000)]
AsmParser: Don't allow null bytes in BB labels

Since Value objects can't have null bytes in their name, we shouldn't
allow them in the labels of basic blocks.

llvm-svn: 223907

9 years agoRemove the last vestige of the world before data formatters :-)
Enrico Granata [Wed, 10 Dec 2014 02:00:45 +0000 (02:00 +0000)]
Remove the last vestige of the world before data formatters :-)
Function pointers had a summary generated for them bypassing formatters, directly as part of the ValueObject subsystem

This patch transitions that code into a hardcoded summary

llvm-svn: 223906

9 years agoSkip TestExprPathSynthetic test on FreeBSD, Linux & Windows.
Oleksiy Vyalov [Wed, 10 Dec 2014 01:48:17 +0000 (01:48 +0000)]
Skip TestExprPathSynthetic test on FreeBSD, Linux & Windows.

llvm-svn: 223905

9 years agoIR: Move call to dropAllReferences() to MDNode subclasses
Duncan P. N. Exon Smith [Wed, 10 Dec 2014 01:45:04 +0000 (01:45 +0000)]
IR: Move call to dropAllReferences() to MDNode subclasses

Don't call `dropAllReferences()` from `MDNode::~MDNode()`, call it
directly from `~MDNodeFwdDecl()` and `~GenericMDNode()`.

llvm-svn: 223904

9 years agoDataLayout: Be more verbose when diagnosing problems in pointer specs
David Majnemer [Wed, 10 Dec 2014 01:38:28 +0000 (01:38 +0000)]
DataLayout: Be more verbose when diagnosing problems in pointer specs

llvm-svn: 223903

9 years agoDebugInfo: Correct location information for array accesses to elements of variable...
David Blaikie [Wed, 10 Dec 2014 01:34:25 +0000 (01:34 +0000)]
DebugInfo: Correct location information for array accesses to elements of variable array type.

llvm-svn: 223902

9 years agoAdd D request handler to GDBRemoteCommunicationServer in order to support detach...
Oleksiy Vyalov [Wed, 10 Dec 2014 01:27:28 +0000 (01:27 +0000)]
Add D request handler to GDBRemoteCommunicationServer in order to support detach from inferior.

llvm-svn: 223901

9 years agoMade the ASTImporter resilient if it can't import
Sean Callanan [Wed, 10 Dec 2014 01:26:39 +0000 (01:26 +0000)]
Made the ASTImporter resilient if it can't import
SourceLocations.  LLDB rarely has the same files
mapped into the target AST context as the source
AST context, so the ASTImporter shouldn't expect
to see those files there.

This started to become a problem when importing
entities from modules -- these have proper source
locations, in contrast to all the ASTs LLDB
creates which have empty ones.

llvm-svn: 223900

9 years agoI didn't intend to commit this with r223898
David Majnemer [Wed, 10 Dec 2014 01:17:48 +0000 (01:17 +0000)]
I didn't intend to commit this with r223898

llvm-svn: 223899

9 years agoDataLayout: Move asserts over to report_fatal_error
David Majnemer [Wed, 10 Dec 2014 01:17:08 +0000 (01:17 +0000)]
DataLayout: Move asserts over to report_fatal_error

As indicated by the tests, it is possible to feed the AsmParser an
invalid datalayout string.  We should verify the result of parsing this
string regardless of whether or not we have assertions enabled.

llvm-svn: 223898

9 years agoDebugInfo: Fix another case of array access line information
David Blaikie [Wed, 10 Dec 2014 01:16:09 +0000 (01:16 +0000)]
DebugInfo: Fix another case of array access line information

llvm-svn: 223897

9 years agoMachineVerifier: Allow physreg use if just a subreg is defined.
Matthias Braun [Wed, 10 Dec 2014 01:13:13 +0000 (01:13 +0000)]
MachineVerifier: Allow physreg use if just a subreg is defined.

We can't mark partially undefined registers, so we have to allow reading
a register in the machine verifier if just parts of a register are
defined.

llvm-svn: 223896

9 years agoMachineVerifier: Allow LiveInterval segments to end at a partial write.
Matthias Braun [Wed, 10 Dec 2014 01:13:11 +0000 (01:13 +0000)]
MachineVerifier: Allow LiveInterval segments to end at a partial write.

In the subregister liveness tracking case we do not create implicit
reads on partial register writes anymore, still we need to produce a new
SSA value for partial writes so the live segment has to end.

llvm-svn: 223895

9 years agoVirtRegMap: Improve block live-in info if subregister liveness is available.
Matthias Braun [Wed, 10 Dec 2014 01:13:08 +0000 (01:13 +0000)]
VirtRegMap: Improve block live-in info if subregister liveness is available.

llvm-svn: 223894

9 years agoMCRegisterInfo: Add MCSubRegIndexIterator.
Matthias Braun [Wed, 10 Dec 2014 01:13:06 +0000 (01:13 +0000)]
MCRegisterInfo: Add MCSubRegIndexIterator.

This iterator iterates over subregister and their associated subregister indices
at the same time.

llvm-svn: 223893

9 years agoVirtRegMap: No implicit defs/uses for super registers with subreg liveness tracking.
Matthias Braun [Wed, 10 Dec 2014 01:13:04 +0000 (01:13 +0000)]
VirtRegMap: No implicit defs/uses for super registers with subreg liveness tracking.

Adding the implicit defs/uses to the superregisters is semantically questionable
but was not dangerous before as the register allocator never assigned the same
register to two overlapping LiveIntervals even when the actually live
subregisters do not overlap. With subregister liveness tracking enabled this
does actually happen and leads to subsequent bugs if we don't stop adding
the superregister defs/uses.

llvm-svn: 223892

9 years agoLiveRegMatrix: Respect subregister liveness when allocating registers.
Matthias Braun [Wed, 10 Dec 2014 01:13:01 +0000 (01:13 +0000)]
LiveRegMatrix: Respect subregister liveness when allocating registers.

llvm-svn: 223891

9 years agoLiveIntervalUnion: Allow specification of liverange when unifying/extracting.
Matthias Braun [Wed, 10 Dec 2014 01:12:59 +0000 (01:12 +0000)]
LiveIntervalUnion: Allow specification of liverange when unifying/extracting.

This allows it to add subregister ranges into the union.

llvm-svn: 223890

9 years agoTablegen'erate lanemasks for register units.
Matthias Braun [Wed, 10 Dec 2014 01:12:56 +0000 (01:12 +0000)]
Tablegen'erate lanemasks for register units.

Now we can relate lanemasks in a virtual register to register units.

llvm-svn: 223889

9 years agoRegisterCoalescer: Preserve subregister liveranges.
Matthias Braun [Wed, 10 Dec 2014 01:12:52 +0000 (01:12 +0000)]
RegisterCoalescer: Preserve subregister liveranges.

llvm-svn: 223888

9 years agoLiveInterval: Add removeEmptySubRanges().
Matthias Braun [Wed, 10 Dec 2014 01:12:40 +0000 (01:12 +0000)]
LiveInterval: Add removeEmptySubRanges().

llvm-svn: 223887

9 years agoLiveIntervalAnalysis: Add subregister aware variants pruneValue().
Matthias Braun [Wed, 10 Dec 2014 01:12:36 +0000 (01:12 +0000)]
LiveIntervalAnalysis: Add subregister aware variants pruneValue().

llvm-svn: 223886

9 years agoLiveInterval: Introduce LiveQuery accessor for dead or live out values.
Matthias Braun [Wed, 10 Dec 2014 01:12:33 +0000 (01:12 +0000)]
LiveInterval: Introduce LiveQuery accessor for dead or live out values.

llvm-svn: 223885

9 years agoAdd a flag to enable/disable subregister liveness.
Matthias Braun [Wed, 10 Dec 2014 01:12:30 +0000 (01:12 +0000)]
Add a flag to enable/disable subregister liveness.

llvm-svn: 223884

9 years agoLiveIntervalAnalysis: Adapt repairIntervalsInRange() to subregister liveness.
Matthias Braun [Wed, 10 Dec 2014 01:12:26 +0000 (01:12 +0000)]
LiveIntervalAnalysis: Adapt repairIntervalsInRange() to subregister liveness.

llvm-svn: 223883

9 years agoLiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.
Matthias Braun [Wed, 10 Dec 2014 01:12:23 +0000 (01:12 +0000)]
LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.

llvm-svn: 223882

9 years agoLiveIntervalAnalysis: Adapt handleMove() to subregister ranges.
Matthias Braun [Wed, 10 Dec 2014 01:12:20 +0000 (01:12 +0000)]
LiveIntervalAnalysis: Adapt handleMove() to subregister ranges.

llvm-svn: 223881

9 years agoLiveIntervalAnalysis: Update SubRanges in shrinkToUses().
Matthias Braun [Wed, 10 Dec 2014 01:12:18 +0000 (01:12 +0000)]
LiveIntervalAnalysis: Update SubRanges in shrinkToUses().

llvm-svn: 223880

9 years agoLiveIntervalAnalysis: Make computeDeadValues() private.
Matthias Braun [Wed, 10 Dec 2014 01:12:15 +0000 (01:12 +0000)]
LiveIntervalAnalysis: Make computeDeadValues() private.

llvm-svn: 223879

9 years agoLiveIntervalAnalysis: Compute subregister ranges.
Matthias Braun [Wed, 10 Dec 2014 01:12:12 +0000 (01:12 +0000)]
LiveIntervalAnalysis: Compute subregister ranges.

llvm-svn: 223878

9 years agoLiveInterval: Add support to track liveness of subregisters.
Matthias Braun [Wed, 10 Dec 2014 01:12:10 +0000 (01:12 +0000)]
LiveInterval: Add support to track liveness of subregisters.

This code adds the required data structures. Algorithms to compute it follow.

llvm-svn: 223877

9 years agoLiveInterval: Add a 'covers' operation to LiveRange.
Matthias Braun [Wed, 10 Dec 2014 01:12:06 +0000 (01:12 +0000)]
LiveInterval: Add a 'covers' operation to LiveRange.

llvm-svn: 223876

9 years agoLiveInterval: Add const version of LiveRange::advanceTo().
Matthias Braun [Wed, 10 Dec 2014 01:12:02 +0000 (01:12 +0000)]
LiveInterval: Add const version of LiveRange::advanceTo().

llvm-svn: 223875

9 years agoAdd function that translates subregister lane masks to other subregs.
Matthias Braun [Wed, 10 Dec 2014 01:12:00 +0000 (01:12 +0000)]
Add function that translates subregister lane masks to other subregs.

This works like the composeSubRegisterIndices() function but transforms
a subregister lane mask instead of a subregister index.

llvm-svn: 223874

9 years agoLet tablegen compute maximum lanemask for regs/regclasses.
Matthias Braun [Wed, 10 Dec 2014 01:11:56 +0000 (01:11 +0000)]
Let tablegen compute maximum lanemask for regs/regclasses.

Let tablegen compute the combination of subregister lanemasks for all
subregisters in a register/register class. This is preparation for further
work subregister allocation

llvm-svn: 223873

9 years agoDebugInfo: Correct the location of array accesses
David Blaikie [Wed, 10 Dec 2014 01:03:48 +0000 (01:03 +0000)]
DebugInfo: Correct the location of array accesses

Especially relevant to ASan when dealing with complex expressions
containing multiple array accesses. See PR21737.

llvm-svn: 223872

9 years agoMake sure that vec_perm is listed as a static function in altivec.h.
Eric Christopher [Wed, 10 Dec 2014 00:57:43 +0000 (00:57 +0000)]
Make sure that vec_perm is listed as a static function in altivec.h.

llvm-svn: 223871

9 years agoTweak test case from r223842 to make it pass on Windows MSVC
Reid Kleckner [Wed, 10 Dec 2014 00:47:33 +0000 (00:47 +0000)]
Tweak test case from r223842 to make it pass on Windows MSVC

We can't mangle __complex yet, and there is no C1 emission.

llvm-svn: 223870

9 years agoAsmParser: Don't crash if a null byte is inside a quoted string
David Majnemer [Wed, 10 Dec 2014 00:43:17 +0000 (00:43 +0000)]
AsmParser: Don't crash if a null byte is inside a quoted string

We don't allow Value* to have names which contain null bytes.  The
AsmParser should reject .ll files that try to do this.

llvm-svn: 223869

9 years agoDisable data formatter tests on Windows.
Zachary Turner [Wed, 10 Dec 2014 00:39:17 +0000 (00:39 +0000)]
Disable data formatter tests on Windows.

clang does not yet support MS-ABI record layout for externally-sourced
ASTs.  As a result, attempting to format something that requires data
layout results in undefined behavior in clang, in this case an assert.

http://llvm.org/pr21800 tracks fixing this on the clang side.

llvm-svn: 223868

9 years agoRe-commit r223330: Rewrite InputGraph's Group
Rui Ueyama [Wed, 10 Dec 2014 00:33:00 +0000 (00:33 +0000)]
Re-commit r223330: Rewrite InputGraph's Group

llvm-svn: 223867

9 years agoExtend some comments around GCModuleInfo, GCFunctionInfo, & GCStrategy
Philip Reames [Wed, 10 Dec 2014 00:30:11 +0000 (00:30 +0000)]
Extend some comments around GCModuleInfo, GCFunctionInfo, & GCStrategy

Nothing particularly interesting here, just documenting the way the code currently works before I start changing it...

llvm-svn: 223866

9 years agoFix Darwin linker. Patch from Jean-Daniel Dupas.
Rui Ueyama [Wed, 10 Dec 2014 00:24:37 +0000 (00:24 +0000)]
Fix Darwin linker. Patch from Jean-Daniel Dupas.

llvm-svn: 223865

9 years agocmake: Make SVNVersion.inc work on Windows if svn is called svn.bat.
Nico Weber [Wed, 10 Dec 2014 00:10:21 +0000 (00:10 +0000)]
cmake: Make SVNVersion.inc work on Windows if svn is called svn.bat.

llvm-svn: 223864

9 years agoSimplify the handling of aliases in the gold plugin.
Rafael Espindola [Wed, 10 Dec 2014 00:09:35 +0000 (00:09 +0000)]
Simplify the handling of aliases in the gold plugin.

The complicated situation is when we have to keep an alias but drop a GV
that is part of the aliasee.

We used to clone the dropped GV and make the clone internal. This is wasteful
as we know the original will be dropped.

With this patch what is done instead is set the linkage of the original to
internal and replace all uses (but the one in the alias) with a new
declaration that takes the name of the old GV. This saves us from having
to copy the body.

llvm-svn: 223863

9 years ago[ARM] Combine base-updating/post-incrementing vector load/stores.
Ahmed Bougacha [Wed, 10 Dec 2014 00:07:37 +0000 (00:07 +0000)]
[ARM] Combine base-updating/post-incrementing vector load/stores.

We used to only combine intrinsics, and turn them into VLD1_UPD/VST1_UPD
when the base pointer is incremented after the load/store.

We can do the same thing for generic load/stores.

Note that we can only combine the first load/store+adds pair in
a sequence (as might be generated for a v16f32 load for instance),
because other combines turn the base pointer addition chain (each
computing the address of the next load, from the address of the last
load) into independent additions (common base pointer + this load's
offset).

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

llvm-svn: 223862