platform/upstream/llvm.git
11 years agoARM: Use MCTargetAsmParser::validateTargetOperandClass().
Jim Grosbach [Wed, 6 Feb 2013 06:00:11 +0000 (06:00 +0000)]
ARM: Use MCTargetAsmParser::validateTargetOperandClass().

Use the validateTargetOperandClass() hook to match literal '#0' operands in
InstAlias definitions. Previously this required per-instruction C++ munging of the
operand list, but not is handled as a natural part of the matcher. Much better.

No additional tests are required, as the pre-existing tests for these instructions
exercise the new behaviour as being functionally equivalent to the old.

llvm-svn: 174488

11 years agoAllow targets to add custom asm operand matching logic.
Jim Grosbach [Wed, 6 Feb 2013 06:00:06 +0000 (06:00 +0000)]
Allow targets to add custom asm operand matching logic.

For example, ARM has several instructions with a literal '#0' immediate in the syntax
that's not represented as an actual operand. The asm matcher is expected a token
operand, but the parser will have created an immediate operand. This is currently
handled by dedicated per-instruction C++ munging of the ParsedAsmOperand list, but
will be better handled by this hook.

llvm-svn: 174487

11 years agoDon't check whether a friend declaration is correctly formed when instantiating,
Nick Lewycky [Wed, 6 Feb 2013 05:59:33 +0000 (05:59 +0000)]
Don't check whether a friend declaration is correctly formed when instantiating,
we already checked it when parsing.

llvm-svn: 174486

11 years agoFailing builds because a private class member is not being used after
Eli Bendersky [Wed, 6 Feb 2013 05:37:46 +0000 (05:37 +0000)]
Failing builds because a private class member is not being used after
initialization is one of the reasons I consider -werror to be shoddy.

llvm-svn: 174485

11 years agoRemove this test in the meantime, since it won't pass on Atom. Atom uses lea
Eli Bendersky [Wed, 6 Feb 2013 03:15:00 +0000 (03:15 +0000)]
Remove this test in the meantime, since it won't pass on Atom. Atom uses lea
to move the stack pointer in prologs/epilogs. I will fix the test and add it
back later.

llvm-svn: 174484

11 years agoAdd virtual desctructor to FrameEntry to avoid error on delete-non-virtual-dtor
Eli Bendersky [Wed, 6 Feb 2013 03:08:02 +0000 (03:08 +0000)]
Add virtual desctructor to FrameEntry to avoid error on delete-non-virtual-dtor

llvm-svn: 174483

11 years agoTweak check to avoid integer overflow (for insanely large alignments)
Evan Cheng [Wed, 6 Feb 2013 02:06:33 +0000 (02:06 +0000)]
Tweak check to avoid integer overflow (for insanely large alignments)

llvm-svn: 174482

11 years agoAdd a 'StringRef' version of hasAttribute.
Bill Wendling [Wed, 6 Feb 2013 01:33:42 +0000 (01:33 +0000)]
Add a 'StringRef' version of hasAttribute.

Fix the 'operator==' and 'hasAttributes' queries to take into account
target-dependent attributes.

llvm-svn: 174481

11 years agoAdd methods to merge an AttrBuilder into another builder.
Bill Wendling [Wed, 6 Feb 2013 01:16:00 +0000 (01:16 +0000)]
Add methods to merge an AttrBuilder into another builder.

This is useful when parsing an object that references multiple attribute groups.

N.B. If both builders have alignments specified, then they should match!

llvm-svn: 174480

11 years agoAttempt to recover gdb bot after r174445.
Manman Ren [Wed, 6 Feb 2013 00:59:41 +0000 (00:59 +0000)]
Attempt to recover gdb bot after r174445.

Failure: undefined symbol 'Lline_table_start0'.
Root-cause: we use a symbol subtraction to calculate at_stmt_list, but
the line table entries are not dumped in the assembly.
Fix: use zero instead of a symbol subtraction for Compile Unit 0.

llvm-svn: 174479

11 years ago[tests] One last batch of XFAILs, for tests using new symbols added to libc++.
Daniel Dunbar [Wed, 6 Feb 2013 00:59:06 +0000 (00:59 +0000)]
[tests] One last batch of XFAILs, for tests using new symbols added to libc++.

 - As of this commit, the test suite should now fully pass on both darwin11 and
   darwin12 when testing against either a locally built libc++ or the system libc++.

llvm-svn: 174478

11 years agoUse a dyn_cast to avoid a crash when the TypeLoc is not a ConstantArrayTypeLoc.
Chad Rosier [Wed, 6 Feb 2013 00:58:34 +0000 (00:58 +0000)]
Use a dyn_cast to avoid a crash when the TypeLoc is not a ConstantArrayTypeLoc.
rdar://13153516

llvm-svn: 174477

11 years ago<rdar://problem/11109570>
Greg Clayton [Wed, 6 Feb 2013 00:38:25 +0000 (00:38 +0000)]
<rdar://problem/11109570>

The first part of the fix for having LLDB handle LTO debugging when the DWARF is in the .o files. This part separates the object file's modules into a separate cache map that maps unique C strings for the N_OSO path to the ModuleSP since one object file might be mentioned more than once in LTO binaries.

llvm-svn: 174476

11 years ago[Headers] Use standard builtin defines instead of typeof trickery.
Daniel Dunbar [Wed, 6 Feb 2013 00:38:13 +0000 (00:38 +0000)]
[Headers] Use standard builtin defines instead of typeof trickery.

 - The trickery can confuse more basic source processors, in particular the
   Unix conformance tool that wants to scan headers.

llvm-svn: 174475

11 years agoFixed the TestSourceManager.py test case to not fail. It was using the "list" alias...
Greg Clayton [Wed, 6 Feb 2013 00:35:33 +0000 (00:35 +0000)]
Fixed the TestSourceManager.py test case to not fail. It was using the "list" alias which has now been turned into a regex command that mimics the GDB equivalent. Changed "list" to "source list" to get around this problem.

llvm-svn: 174474

11 years agoFix some formatting & add comments, following Eric's review
Eli Bendersky [Wed, 6 Feb 2013 00:20:38 +0000 (00:20 +0000)]
Fix some formatting & add comments, following Eric's review

llvm-svn: 174473

11 years agoAdded test for r174461 that checks that the desired behavior also occurs in ObjC...
Michael Gottesman [Wed, 6 Feb 2013 00:14:48 +0000 (00:14 +0000)]
Added test for r174461 that checks that the desired behavior also occurs in ObjC++ alongside ObjC.

\end paranoia.

llvm-svn: 174471

11 years ago[build] Create the link for the final library install name in the lib dir.
Daniel Dunbar [Wed, 6 Feb 2013 00:04:54 +0000 (00:04 +0000)]
[build] Create the link for the final library install name in the lib dir.

 - Otherwise, we never were actually linking against the right library when
   building the test applications.

llvm-svn: 174470

11 years ago[tests] Accept XFAIL arguments that match any part of a feature.
Daniel Dunbar [Wed, 6 Feb 2013 00:04:52 +0000 (00:04 +0000)]
[tests] Accept XFAIL arguments that match any part of a feature.

llvm-svn: 174469

11 years ago[analyzer]Revert part of r161511; suppresses leak false positives in C++
Anna Zaks [Wed, 6 Feb 2013 00:01:14 +0000 (00:01 +0000)]
[analyzer]Revert part of r161511; suppresses leak false positives in C++

This is a "quick fix".

The underlining issue is that when a const pointer to a struct is passed
into a function, we do not invalidate the pointer fields. This results
in false positives that are common in C++ (since copy constructors are
prevalent). (Silences two llvm false positives.)

llvm-svn: 174468

11 years agoAdd the target-dependent (string) attributes from the AttrBuilder to the AttributeSet.
Bill Wendling [Tue, 5 Feb 2013 23:48:36 +0000 (23:48 +0000)]
Add the target-dependent (string) attributes from the AttrBuilder to the AttributeSet.

llvm-svn: 174467

11 years agoAdding armv7l default to cortex-a8
Renato Golin [Tue, 5 Feb 2013 23:42:01 +0000 (23:42 +0000)]
Adding armv7l default to cortex-a8

llvm-svn: 174466

11 years agoAdd missing file to CMake list
Eli Bendersky [Tue, 5 Feb 2013 23:37:18 +0000 (23:37 +0000)]
Add missing file to CMake list

llvm-svn: 174465

11 years agoTest for r174446
Eli Bendersky [Tue, 5 Feb 2013 23:31:48 +0000 (23:31 +0000)]
Test for r174446

llvm-svn: 174464

11 years agoInitial support for DWARF CFI parsing and dumping in LLVM
Eli Bendersky [Tue, 5 Feb 2013 23:30:58 +0000 (23:30 +0000)]
Initial support for DWARF CFI parsing and dumping in LLVM

llvm-svn: 174463

11 years agoBe consistent about the field name - AddressSize, not PointerSize. Add
Eli Bendersky [Tue, 5 Feb 2013 23:26:02 +0000 (23:26 +0000)]
Be consistent about the field name - AddressSize, not PointerSize. Add
a setter and fix some comments.

llvm-svn: 174462

11 years agoChanged CGObjCMac.cpp to add the marker externally_initialized to SELECTOR_REFERENCES...
Michael Gottesman [Tue, 5 Feb 2013 23:08:45 +0000 (23:08 +0000)]
Changed CGObjCMac.cpp to add the marker externally_initialized to SELECTOR_REFERENCES in both the fragile and non-fragile API.

This is to ensure that GlobalOpt in LLVM does not attempt to look through a
selector reference to a method var name at compile time.

I also added a test/updated old tests that need to recognize the new keyword.

rdar://12580965.

llvm-svn: 174461

11 years agoPreprocess Apple llvmCore headers to reflect NDEBUG setting. <rdar://12568983>
Bob Wilson [Tue, 5 Feb 2013 22:59:42 +0000 (22:59 +0000)]
Preprocess Apple llvmCore headers to reflect NDEBUG setting. <rdar://12568983>

If an Apple llvmCore build is done without assertions, and a client uses
the llvmCore headers with assertions enabled, or vice versa, then things will
break because some of the structure sizes in the API are different.  Use the
unifdef tool to make the headers unconditionally match the way the llvmCore
libraries were built.

llvm-svn: 174460

11 years ago[tests] XFAIL some locale tests that don't seem to work on any Darwin.
Daniel Dunbar [Tue, 5 Feb 2013 22:51:20 +0000 (22:51 +0000)]
[tests] XFAIL some locale tests that don't seem to work on any Darwin.

llvm-svn: 174459

11 years agoRevert "[Support][ErrorOr] Add support for convertable types."
Andrew Trick [Tue, 5 Feb 2013 22:50:20 +0000 (22:50 +0000)]
Revert "[Support][ErrorOr] Add support for convertable types."

This reverts commit a33e1fafac7fedb1b080ef07ddf9ad6ddff3a830.

This unit test crashes on Darwon. It needs to be temporarily reverted
to unblock the test infrastructure.

llvm-svn: 174458

11 years agoConvert to storing the attribute's internals as enums, integers, and strings.
Bill Wendling [Tue, 5 Feb 2013 22:37:24 +0000 (22:37 +0000)]
Convert to storing the attribute's internals as enums, integers, and strings.

The stuff we're handing are all enums (Attribute::AttrKind), integers and
strings. Don't convert them to Constants, which is an unnecessary step here. The
rest of the changes are mostly mechanical.

llvm-svn: 174456

11 years agoChange ObjectFileMachO::ParseSymtab to read the external
Jason Molenda [Tue, 5 Feb 2013 22:31:24 +0000 (22:31 +0000)]
Change ObjectFileMachO::ParseSymtab to read the external
function stub routine addresses from an in-memory-only
MachO object file.  This was the only remaining part of
ParseSymtab() that was assuming a file exists.
<rdar://problem/13139585>

llvm-svn: 174455

11 years ago[tests] If no explicit target triple is given, try to infer it.
Daniel Dunbar [Tue, 5 Feb 2013 22:28:03 +0000 (22:28 +0000)]
[tests] If no explicit target triple is given, try to infer it.

llvm-svn: 174454

11 years ago[tests] Mark another stream input expected failure (with system libc++).
Daniel Dunbar [Tue, 5 Feb 2013 22:21:52 +0000 (22:21 +0000)]
[tests] Mark another stream input expected failure (with system libc++).

llvm-svn: 174453

11 years ago[tests] Mark another stream input expected failure (with system libc++).
Daniel Dunbar [Tue, 5 Feb 2013 22:10:28 +0000 (22:10 +0000)]
[tests] Mark another stream input expected failure (with system libc++).

llvm-svn: 174452

11 years ago[tests] Mark some string.conversions expected failures (with system libc++).
Daniel Dunbar [Tue, 5 Feb 2013 22:10:27 +0000 (22:10 +0000)]
[tests] Mark some string.conversions expected failures (with system libc++).

llvm-svn: 174451

11 years ago[tests] XFAIL a few things that require libc (?) support missing on Darwin.
Daniel Dunbar [Tue, 5 Feb 2013 22:10:25 +0000 (22:10 +0000)]
[tests] XFAIL a few things that require libc (?) support missing on Darwin.

llvm-svn: 174450

11 years agoAdd note why we used a switch.
Ted Kremenek [Tue, 5 Feb 2013 22:03:14 +0000 (22:03 +0000)]
Add note why we used a switch.

llvm-svn: 174449

11 years agoMinor tweak to install docs
Douglas Gregor [Tue, 5 Feb 2013 22:01:16 +0000 (22:01 +0000)]
Minor tweak to install docs

llvm-svn: 174448

11 years agoChange subexpressions to be visited in the CFG from left-to-right.
Ted Kremenek [Tue, 5 Feb 2013 22:00:19 +0000 (22:00 +0000)]
Change subexpressions to be visited in the CFG from left-to-right.

This is a more natural order of evaluation, and it is very important
for visualization in the static analyzer.  Within Xcode, the arrows
will not jump from right to left, which looks very visually jarring.
It also provides a more natural location for dataflow-based diagnostics.

Along the way, we found a case in the analyzer diagnostics where we
needed to indicate that a variable was "captured" by a block.

-fsyntax-only timings on sqlite3.c show no visible performance change,
although this is just one test case.

Fixes <rdar://problem/13016513>

llvm-svn: 174447

11 years agoMake sure the correct opcodes are used to SUB and ADD the stack
Eli Bendersky [Tue, 5 Feb 2013 21:53:29 +0000 (21:53 +0000)]
Make sure the correct opcodes are used to SUB and ADD the stack
pointer in function prologs/epilogs. The opcodes should depend on the
data model (LP64 vs. ILP32) rather than the architecture bit-ness.

llvm-svn: 174446

11 years agoDwarf: support for LTO where a single object file can have multiple line tables
Manman Ren [Tue, 5 Feb 2013 21:52:47 +0000 (21:52 +0000)]
Dwarf: support for LTO where a single object file can have multiple line tables

We generate one line table for each compilation unit in the object file.
Reviewed by Eric and Kevin.

rdar://problem/13067005

llvm-svn: 174445

11 years ago[tests] Mark some istream.unformatted expected failures (with system libc++).
Daniel Dunbar [Tue, 5 Feb 2013 21:43:32 +0000 (21:43 +0000)]
[tests] Mark some istream.unformatted expected failures (with system libc++).

llvm-svn: 174444

11 years ago[tests] Add an available feature that combines the triple and use_system_lib.
Daniel Dunbar [Tue, 5 Feb 2013 21:43:30 +0000 (21:43 +0000)]
[tests] Add an available feature that combines the triple and use_system_lib.

  - This is so that we can easily write XFAIL markers for tests that are known
    to fail with versions of libc++ as were shipped with a particular triple.

llvm-svn: 174443

11 years ago[mips] Do not use function CC_MipsN_VarArg unless the function being analyzed
Akira Hatanaka [Tue, 5 Feb 2013 21:18:11 +0000 (21:18 +0000)]
[mips] Do not use function CC_MipsN_VarArg unless the function being analyzed
is a vararg function.

The original code was examining flag OutputArg::IsFixed to determine whether
CC_MipsN_VarArg or CC_MipsN should be called. This is not correct, since this
flag is often set to false when the function being analyzed is a non-variadic
function.

llvm-svn: 174442

11 years agoRemove an uninteresting note
Douglas Gregor [Tue, 5 Feb 2013 21:13:55 +0000 (21:13 +0000)]
Remove an uninteresting note

llvm-svn: 174441

11 years ago[tests] Add support for REQUIRES and XFAIL lines in libc++ tests.
Daniel Dunbar [Tue, 5 Feb 2013 21:03:25 +0000 (21:03 +0000)]
[tests] Add support for REQUIRES and XFAIL lines in libc++ tests.

 - We parse up to the first non-empty non-comment (C++ style) line, otherwise
   the format and semantics match what is used for LLVM/Clang tests.

 - For now, the only interesting thing to test against is a user supplied
   target_triple test parameter.

llvm-svn: 174440

11 years ago[objdump,readobj] Document the purpose and goals of each tool.
Michael J. Spencer [Tue, 5 Feb 2013 20:27:22 +0000 (20:27 +0000)]
[objdump,readobj] Document the purpose and goals of each tool.

llvm-svn: 174439

11 years agoInstCombine: Fix and simplify the inttoptr side too.
Benjamin Kramer [Tue, 5 Feb 2013 20:22:40 +0000 (20:22 +0000)]
InstCombine: Fix and simplify the inttoptr side too.

llvm-svn: 174438

11 years agoBeing explicit about which std c++ library these test cases need to use
Enrico Granata [Tue, 5 Feb 2013 20:05:31 +0000 (20:05 +0000)]
Being explicit about which std c++ library these test cases need to use

llvm-svn: 174437

11 years ago[analyzer] Teach the analyzer to use a symbol for p when evaluating
Anna Zaks [Tue, 5 Feb 2013 19:52:28 +0000 (19:52 +0000)]
[analyzer] Teach the analyzer to use a symbol for p when evaluating
(void*)p.

Addresses the false positives similar to the test case.

llvm-svn: 174436

11 years ago[analyzer] add comment
Anna Zaks [Tue, 5 Feb 2013 19:52:26 +0000 (19:52 +0000)]
[analyzer] add comment

llvm-svn: 174435

11 years ago[analyzer] Fix typo, better doxygen as per Jordan's feedback.
Anna Zaks [Tue, 5 Feb 2013 19:52:24 +0000 (19:52 +0000)]
[analyzer] Fix typo, better doxygen as per Jordan's feedback.

llvm-svn: 174434

11 years agoAdded missing newline to end of test case.
Michael Gottesman [Tue, 5 Feb 2013 19:39:44 +0000 (19:39 +0000)]
Added missing newline to end of test case.

llvm-svn: 174433

11 years agoRemoved explicit inline as per the LLVM style guide.
Michael Gottesman [Tue, 5 Feb 2013 19:32:18 +0000 (19:32 +0000)]
Removed explicit inline as per the LLVM style guide.

llvm-svn: 174432

11 years agoReapply r174343, with a fix for a scary DAG combine bug where it failed to differenti...
Owen Anderson [Tue, 5 Feb 2013 19:24:39 +0000 (19:24 +0000)]
Reapply r174343, with a fix for a scary DAG combine bug where it failed to differentiate between the alignment of the
base point of a load, and the overall alignment of the load.  This caused infinite loops in DAG combine with the
original application of this patch.

ORIGINAL COMMIT LOG:
When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment.  However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.

This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.

llvm-svn: 174431

11 years agoInstCombine: Harden code to work with vectors of pointers and simplify it a bit.
Benjamin Kramer [Tue, 5 Feb 2013 19:21:56 +0000 (19:21 +0000)]
InstCombine: Harden code to work with vectors of pointers and simplify it a bit.

Found by running instcombine on a fabricated test case for the constant folder.

llvm-svn: 174430

11 years agoHexagon: Use TFR_cond with cmpb.[eq,gt,gtu] to handle
Jyotsna Verma [Tue, 5 Feb 2013 19:20:45 +0000 (19:20 +0000)]
Hexagon: Use TFR_cond with cmpb.[eq,gt,gtu] to handle
         zext( set[ne,eq,gt,ugt] (...) ) type of dag patterns.

llvm-svn: 174429

11 years ago[ELF][x86-64] Handle PLT32 relocations to IFUNC.
Michael J. Spencer [Tue, 5 Feb 2013 19:15:03 +0000 (19:15 +0000)]
[ELF][x86-64] Handle PLT32 relocations to IFUNC.

llvm-svn: 174428

11 years ago[ELF][Layout] Provide a proper way to get the TLS segment size.
Michael J. Spencer [Tue, 5 Feb 2013 19:14:43 +0000 (19:14 +0000)]
[ELF][Layout] Provide a proper way to get the TLS segment size.

llvm-svn: 174427

11 years ago[ELF] Implement GOTPCREL for defined atoms.
Michael J. Spencer [Tue, 5 Feb 2013 19:14:28 +0000 (19:14 +0000)]
[ELF] Implement GOTPCREL for defined atoms.

llvm-svn: 174426

11 years ago[ELF] Replace local dynamic tls access with direct access.
Michael J. Spencer [Tue, 5 Feb 2013 19:14:07 +0000 (19:14 +0000)]
[ELF] Replace local dynamic tls access with direct access.

llvm-svn: 174425

11 years agoConstantFolding: Fix a crash when encoutering a truncating inttoptr.
Benjamin Kramer [Tue, 5 Feb 2013 19:04:36 +0000 (19:04 +0000)]
ConstantFolding: Fix a crash when encoutering a truncating inttoptr.

This was introduced in r173293.

llvm-svn: 174424

11 years agoLoop Vectorizer: Refactor code to compute vectorized memory instruction cost
Arnold Schwaighofer [Tue, 5 Feb 2013 18:46:41 +0000 (18:46 +0000)]
Loop Vectorizer: Refactor code to compute vectorized memory instruction cost

Introduce a helper class that computes the cost of memory access instructions.
No functionality change intended.

llvm-svn: 174422

11 years ago<rdar://problem/12866706>
Greg Clayton [Tue, 5 Feb 2013 18:40:36 +0000 (18:40 +0000)]
<rdar://problem/12866706>

Removed asserts and replaced them with conditional code and appropriate errors that prompt for a bug to be filed.

llvm-svn: 174420

11 years agoHexagon: Add testcase for post-increment store instructions.
Jyotsna Verma [Tue, 5 Feb 2013 18:23:51 +0000 (18:23 +0000)]
Hexagon: Add testcase for post-increment store instructions.

llvm-svn: 174419

11 years ago[SjLj Prepare] When demoting an invoke instructions to the stack, if the normal
Chad Rosier [Tue, 5 Feb 2013 18:23:10 +0000 (18:23 +0000)]
[SjLj Prepare] When demoting an invoke instructions to the stack, if the normal
edge is critical, then split it so we can insert the store.
rdar://13126179

llvm-svn: 174418

11 years agoRemove liveout lists from MachineRegisterInfo.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:21:56 +0000 (18:21 +0000)]
Remove liveout lists from MachineRegisterInfo.

All targets are now adding return value registers as implicit uses on
return instructions, and there is no longer a need for the live out
lists.

llvm-svn: 174417

11 years agoRemove special-casing of return blocks for liveness.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:21:52 +0000 (18:21 +0000)]
Remove special-casing of return blocks for liveness.

Now that return value registers are return instruction uses, there is no
need for special treatment of return blocks.

llvm-svn: 174416

11 years agoMove MRI liveouts to AArch64 return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:21:49 +0000 (18:21 +0000)]
Move MRI liveouts to AArch64 return instructions.

llvm-svn: 174415

11 years agoMove MRI liveouts to XCore return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:21:46 +0000 (18:21 +0000)]
Move MRI liveouts to XCore return instructions.

llvm-svn: 174414

11 years agoMove MRI liveouts to Sparc return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:16:58 +0000 (18:16 +0000)]
Move MRI liveouts to Sparc return instructions.

llvm-svn: 174413

11 years agoHexagon: Use multiclass for absolute addressing mode stores.
Jyotsna Verma [Tue, 5 Feb 2013 18:15:34 +0000 (18:15 +0000)]
Hexagon: Use multiclass for absolute addressing mode stores.

llvm-svn: 174412

11 years agoMove MRI liveouts to MSP430 return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:12:06 +0000 (18:12 +0000)]
Move MRI liveouts to MSP430 return instructions.

llvm-svn: 174411

11 years agoMove MRI liveouts to Mips return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:12:03 +0000 (18:12 +0000)]
Move MRI liveouts to Mips return instructions.

llvm-svn: 174410

11 years agoMove MRI liveouts to PowerPC return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:12:00 +0000 (18:12 +0000)]
Move MRI liveouts to PowerPC return instructions.

llvm-svn: 174409

11 years agoMove MRI liveouts to MBlaze return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:08:45 +0000 (18:08 +0000)]
Move MRI liveouts to MBlaze return instructions.

llvm-svn: 174408

11 years agoMove MRI liveouts to Hexagon return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:08:43 +0000 (18:08 +0000)]
Move MRI liveouts to Hexagon return instructions.

llvm-svn: 174407

11 years agoMove MRI liveouts to ARM return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:08:40 +0000 (18:08 +0000)]
Move MRI liveouts to ARM return instructions.

llvm-svn: 174406

11 years agoAdd a test case for PR14750.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 18:04:15 +0000 (18:04 +0000)]
Add a test case for PR14750.

This was fixed by r174402.

llvm-svn: 174405

11 years ago[tests] Add a 'use_system_lib' parameter.
Daniel Dunbar [Tue, 5 Feb 2013 18:03:49 +0000 (18:03 +0000)]
[tests] Add a 'use_system_lib' parameter.

 - This controls whether to execute against the locally built library or
   not. The default is currently True which maps to what was already being done
   by default.

 - I'd appreciate it if someone can implement the proper handling of this flag
   on linux, I no longer remember the details of its .so handling.

llvm-svn: 174404

11 years agoCodeGen: clang-format goodness
Tobias Grosser [Tue, 5 Feb 2013 18:01:29 +0000 (18:01 +0000)]
CodeGen: clang-format goodness

The changed files are not yet clang-format clean, but we are getting close.

llvm-svn: 174403

11 years agoMove MRI liveouts to X86 return instructions.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 17:59:48 +0000 (17:59 +0000)]
Move MRI liveouts to X86 return instructions.

llvm-svn: 174402

11 years ago[MC] Bundle alignment: Invalidate relaxed fragments
Derek Schuff [Tue, 5 Feb 2013 17:55:27 +0000 (17:55 +0000)]
[MC] Bundle alignment: Invalidate relaxed fragments

Currently, when a fragment is relaxed, its size is modified, but its
offset is not (it gets laid out as a side effect of checking whether
it needs relaxation), then all subsequent fragments are invalidated
because their offsets need to change. When bundling is enabled,
relaxed fragments need to get laid out again, because the increase in
size may push it over a bundle boundary. So instead of only
invalidating subsequent fragments, also invalidate the fragment that
gets relaxed, which causes it to get laid out again.

This patch also fixes some trailing whitespace and fixes the
bundling-related debug output of MCFragments.

llvm-svn: 174401

11 years agoDon't use MRI liveouts in R600.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 17:53:52 +0000 (17:53 +0000)]
Don't use MRI liveouts in R600.

Something very strange is going on with the output registers in this
target. Its ISelLowering code is inserting dangling CopyToReg nodes,
hoping that those physregs won't get clobbered before the RETURN.

This patch adds the output registers as implicit uses on RETURN
instructions in the custom emission pass. I'd much prefer to have those
CopyToReg nodes glued to the RETURNs, but I don't see how.

llvm-svn: 174400

11 years agoAvoid using MRI::liveout_iterator for computing VRSAVEs.
Jakob Stoklund Olesen [Tue, 5 Feb 2013 17:40:36 +0000 (17:40 +0000)]
Avoid using MRI::liveout_iterator for computing VRSAVEs.

The liveout lists are about to be removed from MRI, this is the only
place they were used after register allocation.

Get the live out V registers directly from the return instructions
instead.

llvm-svn: 174399

11 years ago[analyzer] Add a doc describing the internals of RegionStore.
Jordan Rose [Tue, 5 Feb 2013 17:31:34 +0000 (17:31 +0000)]
[analyzer] Add a doc describing the internals of RegionStore.

This is a text file with Markdown-ish formatting because we haven't decided
where analyzer internal documents should go, but it's probably better to
have this in source control than sitting on my local drive forever.

llvm-svn: 174398

11 years agoSet the deployment target for Apple llvmCore builds. <rdar://problem/12712431>
Bob Wilson [Tue, 5 Feb 2013 17:29:03 +0000 (17:29 +0000)]
Set the deployment target for Apple llvmCore builds. <rdar://problem/12712431>

llvm-svn: 174397

11 years agoFormat comments & clean whitespace
Eli Bendersky [Tue, 5 Feb 2013 17:10:07 +0000 (17:10 +0000)]
Format comments & clean whitespace

llvm-svn: 174396

11 years agoR600: Fold remaining CONST_COPY after expand pseudo inst
Tom Stellard [Tue, 5 Feb 2013 17:09:16 +0000 (17:09 +0000)]
R600: Fold remaining CONST_COPY after expand pseudo inst

Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174395

11 years agoR600: improve inputs/interpolation handling
Tom Stellard [Tue, 5 Feb 2013 17:09:14 +0000 (17:09 +0000)]
R600: improve inputs/interpolation handling

Use one intrinsic for all sorts of interpolation.
Use two separate unexpanded instructions to represent INTERP_XY and _ZW -
this will allow to eliminate one part if it's not used.
Track liveness of special interpolation regs instead of reserving them -
this will allow to reuse those regs, lowering reg pressure.

Patch By: Vadim Girlin

v2[Vincent Lejeune]: Rebased against current llvm master

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174394

11 years agoR600: Add tests for instruction predicates
Tom Stellard [Tue, 5 Feb 2013 17:09:13 +0000 (17:09 +0000)]
R600: Add tests for instruction predicates

llvm-svn: 174393

11 years agoR600: Emit function name in the AsmPrinter
Tom Stellard [Tue, 5 Feb 2013 17:09:11 +0000 (17:09 +0000)]
R600: Emit function name in the AsmPrinter

Emitting the function name allows us to check for it in the FileCheck
tests so we can make sure FileCheck is checking the output of the
correct function.

llvm-svn: 174392

11 years agoR600/SI: Add patterns for fcos and fsin.
Tom Stellard [Tue, 5 Feb 2013 17:09:10 +0000 (17:09 +0000)]
R600/SI: Add patterns for fcos and fsin.

Fixes 37 piglit tests and allows e.g. FlightGear to run with radeonsi.

Patch by: Michel Dänzer

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174391

11 years agoFix comments
Eli Bendersky [Tue, 5 Feb 2013 16:53:11 +0000 (16:53 +0000)]
Fix comments

llvm-svn: 174390

11 years agoHexagon: Add V4 compare instructions. Enable relationship mapping
Jyotsna Verma [Tue, 5 Feb 2013 16:42:24 +0000 (16:42 +0000)]
Hexagon: Add V4 compare instructions. Enable relationship mapping
for the existing instructions.

llvm-svn: 174389

11 years agoFix comment formatting
Eli Bendersky [Tue, 5 Feb 2013 16:40:22 +0000 (16:40 +0000)]
Fix comment formatting

llvm-svn: 174388

11 years agoFix signed-unsigned comparison warning.
Tim Northover [Tue, 5 Feb 2013 16:40:06 +0000 (16:40 +0000)]
Fix signed-unsigned comparison warning.

llvm-svn: 174387

11 years ago[arcmt] Make sure the objc migrators work fine when used with a PCH.
Argyrios Kyrtzidis [Tue, 5 Feb 2013 16:37:00 +0000 (16:37 +0000)]
[arcmt] Make sure the objc migrators work fine when used with a PCH.

rdar://13140508

llvm-svn: 174386

11 years ago[frontend] Don't put a PCH/PTH filename into the set of includes in the preprocessor...
Argyrios Kyrtzidis [Tue, 5 Feb 2013 16:36:52 +0000 (16:36 +0000)]
[frontend] Don't put a PCH/PTH filename into the set of includes in the preprocessor options;
since only one of them is allowed in command-line, process them separately.

Otherwise, if more than one is specified in the command-line, one is processed normally
and the others are going to be treated and included as header files.

Related to radar://13140508

llvm-svn: 174385