platform/upstream/llvm.git
11 years agoAdd a line that got missed off somehow. Sorry about that!
Joey Gouly [Fri, 19 Jul 2013 16:45:16 +0000 (16:45 +0000)]
Add a line that got missed off somehow. Sorry about that!

llvm-svn: 186692

11 years agoImplement generic upsample()
Aaron Watry [Fri, 19 Jul 2013 16:44:37 +0000 (16:44 +0000)]
Implement generic upsample()

Reduces all vector upsamples down to its scalar components, so probably
not the most efficient thing in the world, but it does what the
spec says it needs to do.

Another possible implementation would be to convert/cast everything as
unsigned if necessary, upsample the input vectors, create the upsampled
value, and then cast back to signed if required.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
llvm-svn: 186691

11 years ago[SystemZ] Add tests for ALHSIK and ALGHSIK
Richard Sandiford [Fri, 19 Jul 2013 16:44:32 +0000 (16:44 +0000)]
[SystemZ] Add tests for ALHSIK and ALGHSIK

The insn definitions themselves crept into r186689, sorry.
This should be the last of the distinct-ops instructions.

llvm-svn: 186690

11 years ago[SystemZ] Add ALRK, AGLRK, SLRK and SGLRK
Richard Sandiford [Fri, 19 Jul 2013 16:37:00 +0000 (16:37 +0000)]
[SystemZ] Add ALRK, AGLRK, SLRK and SGLRK

Follows the same lines as r186686, but much more limited, since we only
use ADD LOGICAL for multi-i64 additions.

llvm-svn: 186689

11 years ago[ARMv8] Implement the NEON instructions VRINT{N, X, A, Z, M, P}.
Joey Gouly [Fri, 19 Jul 2013 16:34:16 +0000 (16:34 +0000)]
[ARMv8] Implement the NEON instructions VRINT{N, X, A, Z, M, P}.

llvm-svn: 186688

11 years ago[SystemZ] Add AHIK and AGHIK
Richard Sandiford [Fri, 19 Jul 2013 16:32:12 +0000 (16:32 +0000)]
[SystemZ] Add AHIK and AGHIK

I did these as a separate patch because it uses a slightly different
form of RIE layout.

llvm-svn: 186687

11 years ago[SystemZ] Add ARK, AGRK, SRK and SGRK
Richard Sandiford [Fri, 19 Jul 2013 16:26:39 +0000 (16:26 +0000)]
[SystemZ] Add ARK, AGRK, SRK and SGRK

The testsuite changes follow the same lines as for r186683.

llvm-svn: 186686

11 years ago[SystemZ] Add NGRK, OGRK and XGRK
Richard Sandiford [Fri, 19 Jul 2013 16:24:22 +0000 (16:24 +0000)]
[SystemZ] Add NGRK, OGRK and XGRK

Like r186683, but for 64 bits.

llvm-svn: 186685

11 years agoInitialize TempFileHandle.
Serge Pavlov [Fri, 19 Jul 2013 16:23:54 +0000 (16:23 +0000)]
Initialize TempFileHandle.

llvm-svn: 186684

11 years ago[SystemZ] Add NRK, ORK and XRK
Richard Sandiford [Fri, 19 Jul 2013 16:21:55 +0000 (16:21 +0000)]
[SystemZ] Add NRK, ORK and XRK

The atomic tests assume the two-operand forms, so I've restricted them to z10.

Running and-01.ll, or-01.ll and xor-01.ll for z196 as well as z10 shows why
using convertToThreeAddress() is better than exposing the three-operand forms
first and then converting back to two operands where possible (which is what
I'd originally tried).  Using the three-operand form first stops us from
taking advantage of NG, OG and XG for spills.

llvm-svn: 186683

11 years agoARM: Add instruction aliases for the Thumb2 PLD/PLDW (literal) alternate form.
Tilmann Scheller [Fri, 19 Jul 2013 16:18:56 +0000 (16:18 +0000)]
ARM: Add instruction aliases for the Thumb2 PLD/PLDW (literal) alternate form.

See A8.8.127 in ARM DDI 0406C.b.

Related to <rdar://problem/14403733>.

llvm-svn: 186682

11 years ago[SystemZ] Use SLLK, SRLK and SRAK for codegen
Richard Sandiford [Fri, 19 Jul 2013 16:12:08 +0000 (16:12 +0000)]
[SystemZ] Use SLLK, SRLK and SRAK for codegen

This patch uses the instructions added in r186680 for codegen.

llvm-svn: 186681

11 years ago[SystemZ] Start adding z196 and zEC12 support
Richard Sandiford [Fri, 19 Jul 2013 16:09:03 +0000 (16:09 +0000)]
[SystemZ] Start adding z196 and zEC12 support

This first step just adds definitions for SLLK, SRLK and SRAK.
The next patch will actually make use of them during codegen.

insn-bad.s tests that some form of error is reported when using these
instructions on z10.  More work is needed to get the "instruction requires:
distinct-ops" that we'd ideally like, so I've stubbed that part out for now.
I'll come back and make it mandatory once the necessary changes are in.

llvm-svn: 186680

11 years agoSplit openFileForWrite into windows and unix versions.
Rafael Espindola [Fri, 19 Jul 2013 15:02:03 +0000 (15:02 +0000)]
Split openFileForWrite into windows and unix versions.

It is similar to 186511, but for creating files for writing.

llvm-svn: 186679

11 years agoAdd a unit test for checking that we respect the F_Binary flag.
Rafael Espindola [Fri, 19 Jul 2013 14:41:25 +0000 (14:41 +0000)]
Add a unit test for checking that we respect the F_Binary flag.

llvm-svn: 186676

11 years agoFixed some formatting issues with clang-format to get a baseline.
John Thompson [Fri, 19 Jul 2013 14:19:31 +0000 (14:19 +0000)]
Fixed some formatting issues with clang-format to get a baseline.

llvm-svn: 186675

11 years ago[SystemZ] Enable frame-pointer elimination for -O1 and above
Richard Sandiford [Fri, 19 Jul 2013 14:06:49 +0000 (14:06 +0000)]
[SystemZ] Enable frame-pointer elimination for -O1 and above

Copies the x86 behavior.

llvm-svn: 186674

11 years agoRevert r186672 - turns out ASan supports Mac OS 10.6 yet.
Alexey Samsonov [Fri, 19 Jul 2013 12:53:04 +0000 (12:53 +0000)]
Revert r186672 - turns out ASan supports Mac OS 10.6 yet.

llvm-svn: 186673

11 years ago[ASan] Reflect the dropped Mac OS 10.6 support in docs
Alexey Samsonov [Fri, 19 Jul 2013 12:33:30 +0000 (12:33 +0000)]
[ASan] Reflect the dropped Mac OS 10.6 support in docs

llvm-svn: 186672

11 years agoAllow clang tools to display an overview when using the CommonOptionsParser.
Manuel Klimek [Fri, 19 Jul 2013 12:20:59 +0000 (12:20 +0000)]
Allow clang tools to display an overview when using the CommonOptionsParser.

Patch by Guillaume Papin.

llvm-svn: 186671

11 years agoAdds overlapsWith and contains predicates on tooling::Range.
Manuel Klimek [Fri, 19 Jul 2013 12:12:36 +0000 (12:12 +0000)]
Adds overlapsWith and contains predicates on tooling::Range.

Patch by Guillaume Papin.

llvm-svn: 186670

11 years agoAdds ctorInitializer and forEachConstructorInitializer matchers.
Manuel Klimek [Fri, 19 Jul 2013 11:50:54 +0000 (11:50 +0000)]
Adds ctorInitializer and forEachConstructorInitializer matchers.

llvm-svn: 186668

11 years agoCleanup the stats counters for the new implementation. These actually
Chandler Carruth [Fri, 19 Jul 2013 10:57:36 +0000 (10:57 +0000)]
Cleanup the stats counters for the new implementation. These actually
count the right things and have the right names.

llvm-svn: 186667

11 years agoFix another assert failure very similar to PR16651's test case. This
Chandler Carruth [Fri, 19 Jul 2013 10:57:32 +0000 (10:57 +0000)]
Fix another assert failure very similar to PR16651's test case. This
test case came from Benjamin and found the parallel bug in the vector
promotion code.

llvm-svn: 186666

11 years agoStmtOpenMP.h: Prune a stray \param in the comment of OMPExecutableDirective(). [...
NAKAMURA Takumi [Fri, 19 Jul 2013 10:31:05 +0000 (10:31 +0000)]
StmtOpenMP.h: Prune a stray \param in the comment of OMPExecutableDirective(). [-Wdocumentation]

-  /// \param Clauses A list of clauses.

llvm-svn: 186665

11 years agoStmtOpenMP.h: Fix bogus \param(s). [-Wdocumentation]
NAKAMURA Takumi [Fri, 19 Jul 2013 10:30:58 +0000 (10:30 +0000)]
StmtOpenMP.h: Fix bogus \param(s). [-Wdocumentation]

llvm-svn: 186664

11 years agoARM: delete two tests now integrated into the larger files
Tim Northover [Fri, 19 Jul 2013 10:23:15 +0000 (10:23 +0000)]
ARM: delete two tests now integrated into the larger files

Somehow forgot to git rm these two files. I believe I left the remaining
invalid* tests intentionally, though whether my reasons were sound is a
different matter.

llvm-svn: 186663

11 years agoARM: remove invalid invalid tests
Tim Northover [Fri, 19 Jul 2013 10:19:56 +0000 (10:19 +0000)]
ARM: remove invalid invalid tests

The tests were checking for barriers which the ARM ARM says they must execute
as a full system DMB/DSB, rather than that they're UNDEFINED and LLVM does in
fact represent them.

The tests happened to be passing because they were using a non-versioned ARM
triple which didn't have *any* DMB/DSB instructions.

llvm-svn: 186662

11 years agoImprove llvm-mc disassembler mode and refactor ARM tests to use it
Tim Northover [Fri, 19 Jul 2013 10:05:04 +0000 (10:05 +0000)]
Improve llvm-mc disassembler mode and refactor ARM tests to use it

This allows "llvm-mc -disassemble" to accept two new features:
  + Using comma as a byte separator
  + Grouping bytes with '[' and ']' pairs.

The behaviour outside a [...] group is unchanged. But within the group once
llvm-mc encounters a true error, it stops rather than trying to resynchronise
the stream at the next byte. This is more useful for disassembly tests, where
we have an almost-instruction in mind and don't care what the misaligned
interpretation would be. Particularly if it means llvm-mc won't actually see
the next intended almost-instruction.

As a side effect, this means llvm-mc can disassemble its own -show-encoding
output if copy-pasted.

llvm-svn: 186661

11 years agoImprove clang-format vim integration.
Daniel Jasper [Fri, 19 Jul 2013 09:30:44 +0000 (09:30 +0000)]
Improve clang-format vim integration.

The previous line-by-line replacement causes vim to take a long time if
the foldmethod is set to 'syntax'. This should significantly improve
performance in that case.

llvm-svn: 186660

11 years agoTry to move to a more reasonable set of naming conventions given the new
Chandler Carruth [Fri, 19 Jul 2013 09:13:58 +0000 (09:13 +0000)]
Try to move to a more reasonable set of naming conventions given the new
implementation of the SROA algorithm. We were using the term 'partition'
in many places that no longer ever represented an actual partition, but
rather just an arbitrary slice of an alloca.

No functionality change intended here. Mostly just renaming of types,
functions, variables, and rewording of comments. Several comments were
rewritten to make a lot more sense in the new structure of things.

The stats are still weird and not reflective of how this really works.
I'll fix those up in a separate patch as it is a touch more semantic of
a change...

llvm-svn: 186659

11 years agoFix uninitialized memory read found by MemorySanitizer: always set output parameter...
Alexey Samsonov [Fri, 19 Jul 2013 08:55:18 +0000 (08:55 +0000)]
Fix uninitialized memory read found by MemorySanitizer: always set output parameter of ConvergingScheduler::SchedBoundary::getOtherResourceCount

llvm-svn: 186658

11 years agoSimplify the CodeGenFunction::Build*Virtual*Call family of functions
Timur Iskhodzhanov [Fri, 19 Jul 2013 08:14:45 +0000 (08:14 +0000)]
Simplify the CodeGenFunction::Build*Virtual*Call family of functions

llvm-svn: 186657

11 years agoA long overdue cleanup in SROA to use 'DL' instead of 'TD' for the
Chandler Carruth [Fri, 19 Jul 2013 07:21:28 +0000 (07:21 +0000)]
A long overdue cleanup in SROA to use 'DL' instead of 'TD' for the
DataLayout variables.

llvm-svn: 186656

11 years agoFix PR16651, an assert introduced in my recent re-work of the innards of
Chandler Carruth [Fri, 19 Jul 2013 07:12:23 +0000 (07:12 +0000)]
Fix PR16651, an assert introduced in my recent re-work of the innards of
SROA.

The crux of the issue is that now we track uses of a partition of the
alloca in two places: the iterators over the partitioning uses and the
previously collected split uses vector. We weren't accounting for the
fact that the split uses might invalidate integer widening in ways other
than due to their width (in this case due to being volatile).

Further reduced testcase added to the tests.

llvm-svn: 186655

11 years ago[PECOFF][Driver] Process "LINK" environment variable.
Rui Ueyama [Fri, 19 Jul 2013 05:06:20 +0000 (05:06 +0000)]
[PECOFF][Driver] Process "LINK" environment variable.

llvm-svn: 186654

11 years agoTry to appease the bots.
Manman Ren [Fri, 19 Jul 2013 04:56:51 +0000 (04:56 +0000)]
Try to appease the bots.

llvm-svn: 186653

11 years agoRemove trailing whitespace.
Craig Topper [Fri, 19 Jul 2013 04:46:31 +0000 (04:46 +0000)]
Remove trailing whitespace.

llvm-svn: 186652

11 years agoDon't use a function-scope static varaibles in
Jason Molenda [Fri, 19 Jul 2013 04:39:22 +0000 (04:39 +0000)]
Don't use a function-scope static varaibles in
RegisterContextLLDB::SavedLocationForRegister to cache the pc and
sp register numbers -- if lldb is debugging multiple Targets of
different architectures, this will be incorrect.  If these were
to be cached anywhere, it would have to be up in the Target.

llvm-svn: 186651

11 years ago[PECOFF][Driver] Add -defaultlib command line option.
Rui Ueyama [Fri, 19 Jul 2013 04:11:37 +0000 (04:11 +0000)]
[PECOFF][Driver] Add -defaultlib command line option.

llvm-svn: 186650

11 years agoRemove unnecessary IsFirst variable from debug codde in GetDiagInfo.
Craig Topper [Fri, 19 Jul 2013 03:59:51 +0000 (03:59 +0000)]
Remove unnecessary IsFirst variable from debug codde in GetDiagInfo.

llvm-svn: 186649

11 years ago[PECOFF][Driver] Interpret "LIB" environment variable.
Rui Ueyama [Fri, 19 Jul 2013 03:27:03 +0000 (03:27 +0000)]
[PECOFF][Driver] Interpret "LIB" environment variable.

llvm-svn: 186648

11 years agoOpenMP: basic support for #pragma omp parallel
Alexey Bataev [Fri, 19 Jul 2013 03:13:43 +0000 (03:13 +0000)]
OpenMP: basic support for #pragma omp parallel

llvm-svn: 186647

11 years agoTurn off fast stepping for ARM till the MC's MayAffectControlFlow gets more accurate.
Jim Ingham [Fri, 19 Jul 2013 02:18:31 +0000 (02:18 +0000)]
Turn off fast stepping for ARM till the MC's MayAffectControlFlow gets more accurate.

rdar://problem/14488761

llvm-svn: 186646

11 years ago[PECOFF] Use library search path when looking for a .lib file.
Rui Ueyama [Fri, 19 Jul 2013 02:18:25 +0000 (02:18 +0000)]
[PECOFF] Use library search path when looking for a .lib file.

llvm-svn: 186645

11 years ago[PECOFF][Driver] Add -libpath command line option.
Rui Ueyama [Fri, 19 Jul 2013 01:38:49 +0000 (01:38 +0000)]
[PECOFF][Driver] Add -libpath command line option.

The logic to search a library from the library paths will be implemented
in a different patch.

llvm-svn: 186644

11 years agollvm/test/MC/AsmParser/secure_log_unique.s: Use env(1) here. Then r186611 can be...
NAKAMURA Takumi [Fri, 19 Jul 2013 01:26:08 +0000 (01:26 +0000)]
llvm/test/MC/AsmParser/secure_log_unique.s: Use env(1) here. Then r186611 can be reverted.

llvm-svn: 186643

11 years ago[mips] Delete MFC1_FT_CCR, MTC1_FT_CCR and MOVCCRToCCR.
Akira Hatanaka [Fri, 19 Jul 2013 01:19:52 +0000 (01:19 +0000)]
[mips] Delete MFC1_FT_CCR, MTC1_FT_CCR and MOVCCRToCCR.

No functionality change.

llvm-svn: 186642

11 years agoObjectiveC migrator: add support to migrate to
Fariborz Jahanian [Fri, 19 Jul 2013 01:05:49 +0000 (01:05 +0000)]
ObjectiveC migrator: add support to migrate to
NS_OPTIONS.

llvm-svn: 186641

11 years agoAdd -help option to Darwin Driver. Use grouping in Options table to better format...
Nick Kledzik [Fri, 19 Jul 2013 01:02:49 +0000 (01:02 +0000)]
Add -help option to Darwin Driver.  Use grouping in Options table to better format help output

llvm-svn: 186640

11 years ago[analyzer] Include analysis stack in crash traces.
Jordan Rose [Fri, 19 Jul 2013 00:59:08 +0000 (00:59 +0000)]
[analyzer] Include analysis stack in crash traces.

Sample output:

0.     Program arguments: ...
1.     <eof> parser at end of file
2.     While analyzing stack:
       #0 void inlined()
       #1 void test()
3.     crash-trace.c:6:3: Error evaluating statement

llvm-svn: 186639

11 years agoUpdate createCompileUnit call for llvm changes.
Eric Christopher [Fri, 19 Jul 2013 00:51:58 +0000 (00:51 +0000)]
Update createCompileUnit call for llvm changes.

llvm-svn: 186638

11 years agoRemove DIBuilder cache of variable TheCU and change the few
Eric Christopher [Fri, 19 Jul 2013 00:51:47 +0000 (00:51 +0000)]
Remove DIBuilder cache of variable TheCU and change the few
uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.

llvm-svn: 186637

11 years agoClarify comment for extension().
Rui Ueyama [Fri, 19 Jul 2013 00:51:17 +0000 (00:51 +0000)]
Clarify comment for extension().

llvm-svn: 186636

11 years agoMI Sched: test case fix for previous checkin.
Andrew Trick [Fri, 19 Jul 2013 00:31:31 +0000 (00:31 +0000)]
MI Sched: test case fix for previous checkin.

llvm-svn: 186635

11 years agoDebug Info: enable verifying by default and disable testing cases that fail.
Manman Ren [Fri, 19 Jul 2013 00:31:03 +0000 (00:31 +0000)]
Debug Info: enable verifying by default and disable testing cases that fail.

1> Use DebugInfoFinder to find debug info MDNodes.
2> Add disable-debug-info-verifier to disable verifying debug info.
3> Disable verifying for testing cases that fail (will update the testing cases
   later on).
4> MDNodes generated by clang can have empty filename for TAG_inheritance and
   TAG_friend, so DIType::Verify is modified accordingly.

Note that DebugInfoFinder does not list all debug info MDNode.
For example, clang can generate:
metadata !{i32 786468}, which will fail to verify.
This MDNode is used by debug info but not included in DebugInfoFinder.
This MDNode is generated as a temporary node in DIBuilder::createFunction
  Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
  MDNode::getTemporary(VMContext, TElts)

llvm-svn: 186634

11 years agoelf-core: handle core with a single NT_PRPSINFO (not one per thread)
Ed Maste [Fri, 19 Jul 2013 00:25:02 +0000 (00:25 +0000)]
elf-core: handle core with a single NT_PRPSINFO (not one per thread)

On FreeBSD we have only one NT_PRPSINFO in a core file, regardless of the
number of threads.  Consider a new thread to start whenever we see another
instance of either NT_PRPSINFO or NT_PRSTATUS.

Thanks to Samuel Jacob for testing this patch on Linux cores.

llvm-svn: 186633

11 years agoMI Sched: Update the way resources are tracked so the current heuristics make more...
Andrew Trick [Fri, 19 Jul 2013 00:20:07 +0000 (00:20 +0000)]
MI Sched: Update the way resources are tracked so the current heuristics make more sense.

llvm-svn: 186632

11 years agoFix crash-on-invalid with inheriting constructor.
Eli Friedman [Thu, 18 Jul 2013 23:59:50 +0000 (23:59 +0000)]
Fix crash-on-invalid with inheriting constructor.

Fixes PR16656.

llvm-svn: 186631

11 years agoCheck the return value from parse()
Nick Kledzik [Thu, 18 Jul 2013 23:47:22 +0000 (23:47 +0000)]
Check the return value from parse()

llvm-svn: 186630

11 years agoClean up diagnostics for inheriting constructors.
Eli Friedman [Thu, 18 Jul 2013 23:29:14 +0000 (23:29 +0000)]
Clean up diagnostics for inheriting constructors.

No new diagnostics, just better wording and notes pointing at more
relevant locations.

llvm-svn: 186629

11 years agoFix FileCheck CHECK-LABEL documentation wording slightly; also mention that it allows...
Stephen Lin [Thu, 18 Jul 2013 23:26:58 +0000 (23:26 +0000)]
Fix FileCheck CHECK-LABEL documentation wording slightly; also mention that it allows error recovery.

llvm-svn: 186628

11 years agoRevert "COFFDumper: Dump data directory entries."
Rui Ueyama [Thu, 18 Jul 2013 23:15:50 +0000 (23:15 +0000)]
Revert "COFFDumper: Dump data directory entries."

Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623.

llvm-svn: 186627

11 years agoAdd support for -all_load. Enhance DarwinLdDriverTest unit test test cases to test...
Nick Kledzik [Thu, 18 Jul 2013 23:13:13 +0000 (23:13 +0000)]
Add support for -all_load. Enhance DarwinLdDriverTest unit test test cases to test all options parsed so far

llvm-svn: 186626

11 years agoAdded -lines X:Y option to specify line range to process. This is a more human-friend...
Alexander Kornienko [Thu, 18 Jul 2013 22:54:56 +0000 (22:54 +0000)]
Added -lines X:Y option to specify line range to process. This is a more human-friendly alternative to -offset and -length.

Differential Revision: http://llvm-reviews.chandlerc.com/D1160

llvm-svn: 186625

11 years agoUpdate to more CodeGen tests to use CHECK-LABEL for labels corresponding to function...
Stephen Lin [Thu, 18 Jul 2013 22:47:09 +0000 (22:47 +0000)]
Update to more CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error  messages. No functionality change.

All changes were made by the following bash script:

  find test/CodeGen -name "*.ll" | \
  while read NAME; do
    echo "$NAME"
    grep -q "^; *RUN: *llc.*debug" $NAME && continue
    grep -q "^; *RUN:.*llvm-objdump" $NAME && continue
    grep -q "^; *RUN: *opt.*" $NAME && continue
    TEMP=`mktemp -t temp`
    cp $NAME $TEMP
    sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
    while read FUNC; do
      sed -i '' "s/;\([A-Za-z0-9_-]*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC[:]* *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP
    done
    sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP
    sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP
    sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP
    sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP
    mv $TEMP $NAME
  done

This script catches a superset of the cases caught by the script associated with commit r186280. It initially found some false positives due to unusual constructs in a minority of tests; all such cases were disambiguated first in commit r186621.

llvm-svn: 186624

11 years agoCOFFDumper: Dump data directory entries.
Rui Ueyama [Thu, 18 Jul 2013 22:44:20 +0000 (22:44 +0000)]
COFFDumper: Dump data directory entries.

Summary:
Dump optional data directory entries in the PE/COFF header, so that
we can test the output of LLD linker. This patch updates the test binary
file, but the source of the binary is the same. I just re-linked the file.
I don't know how the previous file was linked, but the previous file did
not have any data directory entries for some reason.

Reviewers: rafael

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1148

llvm-svn: 186623

11 years agoClean up some of this code a tiny bit, no functionality change.
Nick Lewycky [Thu, 18 Jul 2013 22:32:32 +0000 (22:32 +0000)]
Clean up some of this code a tiny bit, no functionality change.

llvm-svn: 186622

11 years agoDisambiguate function names in some CodeGen tests. (Some tests were using function...
Stephen Lin [Thu, 18 Jul 2013 22:29:15 +0000 (22:29 +0000)]
Disambiguate function names in some CodeGen tests. (Some tests were using function names that also were names of instructions and/or doing other unusual things that were making the test not amenable to otherwise scriptable pattern matching.) No functionality change.

llvm-svn: 186621

11 years agoARM: Make sure the instruction alias for PLI uses the right subtarget features.
Tilmann Scheller [Thu, 18 Jul 2013 22:19:59 +0000 (22:19 +0000)]
ARM: Make sure the instruction alias for PLI uses the right subtarget features.

PLI requires both the Thumb2 and the ARMv7 feature.

Related to <rdar://problem/14403733>.

llvm-svn: 186620

11 years agoObjectiveC migrator: Remove semicolon after the typedef
Fariborz Jahanian [Thu, 18 Jul 2013 22:17:33 +0000 (22:17 +0000)]
ObjectiveC migrator: Remove semicolon after the typedef
declaration when converting to NS_ENUM. This required
some code refactoring.

llvm-svn: 186619

11 years agoThis commit does two things. One, it converts the return value of the QueueThreadPlanXXX
Jim Ingham [Thu, 18 Jul 2013 21:48:26 +0000 (21:48 +0000)]
This commit does two things.  One, it converts the return value of the QueueThreadPlanXXX
plan providers from a "ThreadPlan *" to a "lldb::ThreadPlanSP".  That was needed to fix
a bug where the ThreadPlanStepInRange wasn't checking with its sub-plans to make sure they
succeed before trying to proceed further.  If the sub-plan failed and as a result didn't make
any progress, you could end up retrying the same failing algorithm in an infinite loop.

<rdar://problem/14043602>

llvm-svn: 186618

11 years agoAddress -Wreorder warning in Driver.cpp
Hans Wennborg [Thu, 18 Jul 2013 21:45:42 +0000 (21:45 +0000)]
Address -Wreorder warning in Driver.cpp

llvm-svn: 186617

11 years agoR600/SI: Fix crash with VSELECT
Tom Stellard [Thu, 18 Jul 2013 21:43:53 +0000 (21:43 +0000)]
R600/SI: Fix crash with VSELECT

https://bugs.freedesktop.org/show_bug.cgi?id=66175

llvm-svn: 186616

11 years agoR600/SI: Add support for v2f32 loads
Tom Stellard [Thu, 18 Jul 2013 21:43:48 +0000 (21:43 +0000)]
R600/SI: Add support for v2f32 loads

llvm-svn: 186615

11 years agoR600/SI: Add support for v2f32 stores
Tom Stellard [Thu, 18 Jul 2013 21:43:42 +0000 (21:43 +0000)]
R600/SI: Add support for v2f32 stores

llvm-svn: 186614

11 years agoR600: Expand VSELECT for all types
Tom Stellard [Thu, 18 Jul 2013 21:43:35 +0000 (21:43 +0000)]
R600: Expand VSELECT for all types

llvm-svn: 186613

11 years ago[PECOFF] Use replace_extension() instead of doing it myself.
Rui Ueyama [Thu, 18 Jul 2013 21:38:44 +0000 (21:38 +0000)]
[PECOFF] Use replace_extension() instead of doing it myself.

llvm-svn: 186612

11 years agotest/MC/AsmParser/secure_log_unique.s requires shell
Hans Wennborg [Thu, 18 Jul 2013 21:34:13 +0000 (21:34 +0000)]
test/MC/AsmParser/secure_log_unique.s requires shell

This should fix the chapuni bots.

llvm-svn: 186611

11 years agoFix build with LLVM 3.4
Aaron Watry [Thu, 18 Jul 2013 21:24:35 +0000 (21:24 +0000)]
Fix build with LLVM 3.4

F_Binary and friends were moved to include/Support/FileSystem.h

v2: Maintain compatibility with LLVM 3.3

Signed-off-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 186610

11 years agoFix another instance of -ccc-cxx vs. --driver-mode=g++
Hans Wennborg [Thu, 18 Jul 2013 21:09:03 +0000 (21:09 +0000)]
Fix another instance of -ccc-cxx vs. --driver-mode=g++

llvm-svn: 186609

11 years agoFix -Wdocumentation warning
Hans Wennborg [Thu, 18 Jul 2013 21:00:12 +0000 (21:00 +0000)]
Fix -Wdocumentation warning

s/Tokenize/Tokenizer/ to make the comment correspond to the
parameter name

llvm-svn: 186608

11 years agoUse --driver-mode=g++ instead of -ccc-cxx; required after Clang r186605
Hans Wennborg [Thu, 18 Jul 2013 20:48:50 +0000 (20:48 +0000)]
Use --driver-mode=g++ instead of -ccc-cxx; required after Clang r186605

llvm-svn: 186607

11 years agoAdd a test for .secure_log_unique.
Rafael Espindola [Thu, 18 Jul 2013 20:34:26 +0000 (20:34 +0000)]
Add a test for .secure_log_unique.

It also doubles a test that F_Append works.

llvm-svn: 186606

11 years agoTurn Driver::CCCIsCXX and CCCIsCPP into a single Mode enum,
Hans Wennborg [Thu, 18 Jul 2013 20:29:38 +0000 (20:29 +0000)]
Turn Driver::CCCIsCXX and CCCIsCPP into a single Mode enum,
and add a new option --driver-mode= to control it explicitly.

The CCCIsCXX and CCCIsCPP flags were non-overlapping, i.e. there
are currently really three modes that Clang can run in: gcc, g++
or cpp, so it makes sense to represent them as an enum.

Having a command line flag to control it helps testing.

llvm-svn: 186605

11 years agoObjectiveC migration. migration to NS_ENUM/SN_OPTION
Fariborz Jahanian [Thu, 18 Jul 2013 20:11:45 +0000 (20:11 +0000)]
ObjectiveC migration. migration to NS_ENUM/SN_OPTION
- wip.

llvm-svn: 186604

11 years ago[Driver] Use LLVM's response file parser because it can read UTF-16
Reid Kleckner [Thu, 18 Jul 2013 20:00:53 +0000 (20:00 +0000)]
[Driver] Use LLVM's response file parser because it can read UTF-16

MSBuild writes response files as UTF-16 little endian with a byte order
mark.  With this change, clang will be able to read them, although we
still can't parse any of their flags.

Adds a UTF-16-LE response file with a BOM for testing.

Differential Revision: http://llvm-reviews.chandlerc.com/D1137

llvm-svn: 186603

11 years agoSeparate the notion of 'context' when recursing down in the parser and actual errors.
Samuel Benzaquen [Thu, 18 Jul 2013 19:47:59 +0000 (19:47 +0000)]
Separate the notion of 'context' when recursing down in the parser and actual errors.

Summary:
Change how error messages are constructed and stored in Diagnostics.
Separate the notion of 'context' when recursing down in the parser and actual errors.
This will simplify adding some new features, like argument overloading and error recovery.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1168

llvm-svn: 186602

11 years agoRevert "Remove DIBuilder cache of variable TheCU and change the few"
Eric Christopher [Thu, 18 Jul 2013 19:13:06 +0000 (19:13 +0000)]
Revert "Remove DIBuilder cache of variable TheCU and change the few"

This reverts commit r186599 as I didn't want to commit this yet.

llvm-svn: 186601

11 years agoEqual means ==, not !=. Thanks to Benjamin for catching.
Eric Christopher [Thu, 18 Jul 2013 19:11:41 +0000 (19:11 +0000)]
Equal means ==, not !=. Thanks to Benjamin for catching.

llvm-svn: 186600

11 years agoRemove DIBuilder cache of variable TheCU and change the few
Eric Christopher [Thu, 18 Jul 2013 19:11:29 +0000 (19:11 +0000)]
Remove DIBuilder cache of variable TheCU and change the few
uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.

llvm-svn: 186599

11 years agoChanged declarations from Attr to InheritableAttr as they are already being processed...
Aaron Ballman [Thu, 18 Jul 2013 19:11:29 +0000 (19:11 +0000)]
Changed declarations from Attr to InheritableAttr as they are already being processed that way semantically.

Patch thanks to Dean Sutherland!  Reviewed by Eli Friedman.

llvm-svn: 186598

11 years agoUse the correct call to close down the lockdown connection.
Jim Ingham [Thu, 18 Jul 2013 18:48:57 +0000 (18:48 +0000)]
Use the correct call to close down the lockdown connection.

<rdar://problem/14460024>

llvm-svn: 186597

11 years agoDidn't get the right version of these files in the checkin for r186132.
Jim Ingham [Thu, 18 Jul 2013 18:42:57 +0000 (18:42 +0000)]
Didn't get the right version of these files in the checkin for r186132.

llvm-svn: 186596

11 years agoSmall improvement to the use of GetFileType:
Rafael Espindola [Thu, 18 Jul 2013 18:42:52 +0000 (18:42 +0000)]
Small improvement to the use of GetFileType:

* assert that the return value is one of the documented values on msdn.
* on FILE_TYPE_UNKNOWN, check GetLastError.

Unfortunately I can't think of a way to get a FILE_TYPE_UNKNOWN on a test.

llvm-svn: 186595

11 years agoUpdate to CodeGen tests to use CHECK-LABEL for labels corresponding to function defin...
Stephen Lin [Thu, 18 Jul 2013 18:35:22 +0000 (18:35 +0000)]
Update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change.

llvm-svn: 186594

11 years agoHandle constants without going through SCEV.
Nadav Rotem [Thu, 18 Jul 2013 18:34:21 +0000 (18:34 +0000)]
Handle constants without going through SCEV.

llvm-svn: 186593

11 years agoSLPVectorizer: Speedup isConsecutive by manually checking GEPs with multiple indices.
Nadav Rotem [Thu, 18 Jul 2013 18:20:45 +0000 (18:20 +0000)]
SLPVectorizer: Speedup isConsecutive by manually checking GEPs with multiple indices.
This brings the compile time of the SLP-Vectorizer to about 2.5% of OPT for my testcase.

llvm-svn: 186592

11 years agoSwitching to use checkAttributeNumArgs for trivial cases. No functional changes...
Aaron Ballman [Thu, 18 Jul 2013 18:01:48 +0000 (18:01 +0000)]
Switching to use checkAttributeNumArgs for trivial cases.  No functional changes intended.

llvm-svn: 186591

11 years agoTest contents were somehow duplicated, resulting in any testcase that fails automatic...
Aaron Ballman [Thu, 18 Jul 2013 17:41:26 +0000 (17:41 +0000)]
Test contents were somehow duplicated, resulting in any testcase that fails automatically failing twice.  Removing the duplicates.

llvm-svn: 186590