platform/upstream/llvm.git
11 years agoCodeGen support for function-local static thread_local variables with
Richard Smith [Sun, 14 Apr 2013 23:01:42 +0000 (23:01 +0000)]
CodeGen support for function-local static thread_local variables with
non-constant constructors or non-trivial destructors. Plus bugfixes for
thread_local references bound to temporaries (the temporaries themselves are
lifetime-extended to become thread_local), and the corresponding case for
std::initializer_list.

llvm-svn: 179496

11 years agoRemoved #if 0 code that doesn't compiled if uncommented.
Rafael Espindola [Sun, 14 Apr 2013 22:08:07 +0000 (22:08 +0000)]
Removed #if 0 code that doesn't compiled if uncommented.

llvm-svn: 179495

11 years agoUse object file specific section type for initial text section
Nico Rieck [Sun, 14 Apr 2013 21:18:36 +0000 (21:18 +0000)]
Use object file specific section type for initial text section

llvm-svn: 179494

11 years agoReorders two transforms that collide with each other
David Majnemer [Sun, 14 Apr 2013 21:15:43 +0000 (21:15 +0000)]
Reorders two transforms that collide with each other

One performs: (X == 13 | X == 14) -> X-13 <u 2
The other: (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1

The problem is that there are certain values of C1 and C2 that
trigger both transforms but the first one blocks out the second,
this generates suboptimal code.

Reordering the transforms should be better in every case and
allows us to do interesting stuff like turn:
  %shr = lshr i32 %X, 4
  %and = and i32 %shr, 15
  %add = add i32 %and, -14
  %tobool = icmp ne i32 %add, 0

into:
  %and = and i32 %X, 240
  %tobool = icmp ne i32 %and, 224

llvm-svn: 179493

11 years agoMake the command line triple match the module triple.
Nadav Rotem [Sun, 14 Apr 2013 20:13:05 +0000 (20:13 +0000)]
Make the command line triple match the module triple.

llvm-svn: 179492

11 years agoDiagnose if a __thread or _Thread_local variable has a non-constant initializer
Richard Smith [Sun, 14 Apr 2013 20:11:31 +0000 (20:11 +0000)]
Diagnose if a __thread or _Thread_local variable has a non-constant initializer
or non-trivial destructor.

llvm-svn: 179491

11 years ago[analyzer] Add a link to the Building a Checker in 24 Hours talk to the developer...
Anna Zaks [Sun, 14 Apr 2013 18:36:51 +0000 (18:36 +0000)]
[analyzer] Add a link to the Building a Checker in 24 Hours talk to the developer manual

llvm-svn: 179490

11 years ago[Mips] Support -mmicromips / -mno-micromips command line options.
Simon Atanasyan [Sun, 14 Apr 2013 14:07:51 +0000 (14:07 +0000)]
[Mips] Support -mmicromips / -mno-micromips command line options.

llvm-svn: 179489

11 years ago[Mips] Fix indentation.
Simon Atanasyan [Sun, 14 Apr 2013 14:07:41 +0000 (14:07 +0000)]
[Mips] Fix indentation.

llvm-svn: 179488

11 years ago[Mips] Follow-up to r179481. Reduce code duplication. Use
Simon Atanasyan [Sun, 14 Apr 2013 14:07:36 +0000 (14:07 +0000)]
[Mips] Follow-up to r179481. Reduce code duplication. Use
AddTargetFeature() routine to handle -msingle-float / -mdouble-float
options.

llvm-svn: 179487

11 years ago[Mips] Follow-up to r179481. Consider "single-float" as a separate
Simon Atanasyan [Sun, 14 Apr 2013 14:07:30 +0000 (14:07 +0000)]
[Mips] Follow-up to r179481. Consider "single-float" as a separate
independent of float ABI feature in the MipsTargetInfoBase class.

llvm-svn: 179486

11 years agoSCEVValidator: Correctly store 'k * p' as a parameter
Tobias Grosser [Sun, 14 Apr 2013 13:15:59 +0000 (13:15 +0000)]
SCEVValidator: Correctly store 'k * p' as a parameter

We do not only need to understand that 'k * p' is a parameter expression, but
also need to store this expression in the set of parameters. Before this patch
we wrongly stored the two individual parameters %k and %p.

Reported by: Sebastian Pop <spop@codeaurora.org>

llvm-svn: 179485

11 years agoAdd driver support for fedora 18 on ARM.
Rafael Espindola [Sun, 14 Apr 2013 10:14:21 +0000 (10:14 +0000)]
Add driver support for fedora 18 on ARM.

llvm-svn: 179484

11 years agoMiscellaneous cleanups for VecUtils.h
Benjamin Kramer [Sun, 14 Apr 2013 09:33:08 +0000 (09:33 +0000)]
Miscellaneous cleanups for VecUtils.h

llvm-svn: 179483

11 years agoHandle incompatible redeclarations of library builtins better.
John McCall [Sun, 14 Apr 2013 08:50:55 +0000 (08:50 +0000)]
Handle incompatible redeclarations of library builtins better.
Invalid redeclarations of valid explicit declarations shouldn't
take the same path as redeclarations of implicit declarations,
and invalid local extern declarations shouldn't foul things up
for everybody else.

llvm-svn: 179482

11 years ago[Mips] Remove "single" from the list of valid MIPS float ABI names. Add
Simon Atanasyan [Sun, 14 Apr 2013 08:37:15 +0000 (08:37 +0000)]
[Mips] Remove "single" from the list of valid MIPS float ABI names. Add
two new options –msingle-float and –mdouble-float. These options can be
used simultaneously with float ABI selection options (-mfloat-abi,
-mhard-float, -msoft-float). They mark whether a floating-point
coprocessor supports double-precision operations.

llvm-svn: 179481

11 years agoDocument the SLP infrastructure.
Nadav Rotem [Sun, 14 Apr 2013 07:42:25 +0000 (07:42 +0000)]
Document the SLP infrastructure.

llvm-svn: 179480

11 years agoSLP: Document the scalarization cost method.
Nadav Rotem [Sun, 14 Apr 2013 07:22:22 +0000 (07:22 +0000)]
SLP: Document the scalarization cost method.

llvm-svn: 179479

11 years agoDocument the decision to assume that the cost of floats is twice as much as integers.
Nadav Rotem [Sun, 14 Apr 2013 05:55:18 +0000 (05:55 +0000)]
Document the decision to assume that the cost of floats is twice as much as integers.

llvm-svn: 179478

11 years agoUse i32 for all SPARC shift amounts, even in 64-bit mode.
Jakob Stoklund Olesen [Sun, 14 Apr 2013 05:48:50 +0000 (05:48 +0000)]
Use i32 for all SPARC shift amounts, even in 64-bit mode.

Test case by llvm-stress.

llvm-svn: 179477

11 years agoRemove unused function attributes.
Nadav Rotem [Sun, 14 Apr 2013 05:47:04 +0000 (05:47 +0000)]
Remove unused function attributes.

llvm-svn: 179476

11 years agoSLPVectorizer: Add support for trees that don't start at binary operators, and add...
Nadav Rotem [Sun, 14 Apr 2013 05:15:53 +0000 (05:15 +0000)]
SLPVectorizer: Add support for trees that don't start at binary operators, and add the cost of extracting values from the roots of the tree.

llvm-svn: 179475

11 years agoAdd support for the abs64 SPARC v9 code model.
Jakob Stoklund Olesen [Sun, 14 Apr 2013 05:10:36 +0000 (05:10 +0000)]
Add support for the abs64 SPARC v9 code model.

For when 16 TB just isn't enough.

llvm-svn: 179474

11 years agoAdd support for the SPARC v9 abs44 code model.
Jakob Stoklund Olesen [Sun, 14 Apr 2013 04:57:51 +0000 (04:57 +0000)]
Add support for the SPARC v9 abs44 code model.

This is the default model for non-PIC 64-bit code. It supports
text+data+bss linked anywhere in the low 16 TB of the address space.

llvm-svn: 179473

11 years agoUse target flags for printing SPARC asm operands.
Jakob Stoklund Olesen [Sun, 14 Apr 2013 04:35:19 +0000 (04:35 +0000)]
Use target flags for printing SPARC asm operands.

64-bit code models need multiple relocations that can't be inferred from
the opcode like they can in 32-bit code.

llvm-svn: 179472

11 years agoAlso put target flags on SPARC constant pool references.
Jakob Stoklund Olesen [Sun, 14 Apr 2013 04:35:16 +0000 (04:35 +0000)]
Also put target flags on SPARC constant pool references.

Constant pool entries are accessed exactly the same way as global
variables.

llvm-svn: 179471

11 years agoSLPVectorizer: add initial support for reduction variable vectorization.
Nadav Rotem [Sun, 14 Apr 2013 03:22:20 +0000 (03:22 +0000)]
SLPVectorizer: add initial support for reduction variable vectorization.

llvm-svn: 179470

11 years agoFix patterns for 64-bit pointers.
Jakob Stoklund Olesen [Sun, 14 Apr 2013 01:53:23 +0000 (01:53 +0000)]
Fix patterns for 64-bit pointers.

This fixes the pic32 code model for SPARC v9.

llvm-svn: 179469

11 years agoAdd target flags to SPARC address operands.
Jakob Stoklund Olesen [Sun, 14 Apr 2013 01:33:32 +0000 (01:33 +0000)]
Add target flags to SPARC address operands.

SDNodes and MachineOperands get target flags representing the %hi() and
%lo() assembly annotations that eventually become relocations.

Also define flags to be used by the 64-bit code models.

llvm-svn: 179468

11 years agoAccidentally disallowed explicit tuple conversions when all elements of the tuple...
Howard Hinnant [Sun, 14 Apr 2013 00:01:13 +0000 (00:01 +0000)]
Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.

llvm-svn: 179467

11 years agoFixed issues with the way ELF symbols are parsed:
Greg Clayton [Sat, 13 Apr 2013 23:17:23 +0000 (23:17 +0000)]
Fixed issues with the way ELF symbols are parsed:
- Do not add symbols with no names
- Make sure that symbols from ELF symbol tables know that the byte size is correct. Previously the symbols would calculate their sizes by looking for the next symbol and take symbols that had zero size and make them have invalid sizes.
- Added the ability to dump raw ELF symbols by adding a Dump method to ELFSymbol

Also removed some unused code from lldb_private::Symtab.

llvm-svn: 179466

11 years agoMark all PPC CR registers to be spilled as live-in and tag MFCR appropriately
Hal Finkel [Sat, 13 Apr 2013 23:06:15 +0000 (23:06 +0000)]
Mark all PPC CR registers to be spilled as live-in and tag MFCR appropriately

Leaving MFCR has having unmodeled side effects is not enough to prevent
unwanted instruction reordering post-RA. We could probably apply a stronger
barrier attribute, but there is a better way: Add all (not just the first) CR
to be spilled as live-in to the entry block, and add all CRs to the MFCR
instruction as implicitly killed.

Unfortunately, I don't have a small test case.

llvm-svn: 179465

11 years agoSimplify test so that it is more portable.
Rafael Espindola [Sat, 13 Apr 2013 22:26:02 +0000 (22:26 +0000)]
Simplify test so that it is more portable.

I have checked that the test still fails when the "|| !P.isRegularFile()" from
the original patch is removed.

llvm-svn: 179464

11 years agoDefine SPARC code models.
Jakob Stoklund Olesen [Sat, 13 Apr 2013 19:02:23 +0000 (19:02 +0000)]
Define SPARC code models.

Currently, only abs32 and pic32 are implemented. Add a test case for
abs32 with 64-bit code. 64-bit PIC code is currently broken.

llvm-svn: 179463

11 years agoUse the correct types when matching ADDRri patterns from frame indexes.
Jakob Stoklund Olesen [Sat, 13 Apr 2013 19:02:16 +0000 (19:02 +0000)]
Use the correct types when matching ADDRri patterns from frame indexes.

It doesn't seem like anybody is checking types this late in isel, so no
test case.

llvm-svn: 179462

11 years agoSet failbit when strtold sets errno to ERANGE when parsing floating point values.
Howard Hinnant [Sat, 13 Apr 2013 18:19:25 +0000 (18:19 +0000)]
Set failbit when strtold sets errno to ERANGE when parsing floating point values.

llvm-svn: 179461

11 years agoGlobalDCE: Fix an oversight in my last commit that could lead to crashes.
Benjamin Kramer [Sat, 13 Apr 2013 16:11:14 +0000 (16:11 +0000)]
GlobalDCE: Fix an oversight in my last commit that could lead to crashes.

There is a Constant with non-constant operands: blockaddress.

llvm-svn: 179460

11 years agoRemove the useless SRCROOT declaration from the call of build-swig-wrapper-classes...
Sylvestre Ledru [Sat, 13 Apr 2013 13:20:12 +0000 (13:20 +0000)]
Remove the useless SRCROOT declaration from the call of build-swig-wrapper-classes.sh & finish-swig-wrapper-classes.sh

Two reasons for that:
* the declaration is not used. the LLDB_SOURCE_DIR is provided as the first argument in the script ($1) (called SRC_ROOT in the source code)
* add_custom_command is quoting the first argument of the command. Usually, it is the script itself (and then the full path to the script) but, here, it is the declaration of a variable.
It was failing with:
cd "/llvm-toolchain-3.3~svn179457/build-llvm/tools/lldb/scripts" && "SRCROOT=/llvm-toolchain-3.3~svn179457/tools/lldb" /llvm-toolchain-3.3~svn179457/tools/lldb/scripts/build-swig-wrapper-classes.sh /llvm-toolchain-3.3~svn179457/tools/lldb /llvm-toolchain-3.3~svn179457/build-llvm/tools/lldb/scripts /llvm-toolchain-3.3~svn179457/build-llvm/tools/lldb/scripts /llvm-toolchain-3.3~svn179457/build-llvm -m
/bin/sh: 1: SRCROOT=/llvm-toolchain-3.3~svn179457/tools/lldb: not found

llvm-svn: 179459

11 years agoFix a scalability issue with complex ConstantExprs.
Benjamin Kramer [Sat, 13 Apr 2013 12:53:18 +0000 (12:53 +0000)]
Fix a scalability issue with complex ConstantExprs.

This is basically the same fix in three different places. We use a set to avoid
walking the whole tree of a big ConstantExprs multiple times.

For example: (select cmp, (add big_expr 1), (add big_expr 2))
We don't want to visit big_expr twice here, it may consist of thousands of
nodes.

The testcase exercises this by creating an insanely large ConstantExprs out of
a loop. It's questionable if the optimizer should ever create those, but this
can be triggered with real C code. Fixes PR15714.

llvm-svn: 179458

11 years agoSpill and restore PPC CR registers using the FP when we have one
Hal Finkel [Sat, 13 Apr 2013 08:09:20 +0000 (08:09 +0000)]
Spill and restore PPC CR registers using the FP when we have one

For functions that need to spill CRs, and have dynamic stack allocations, the
value of the SP during the restore is not what it was during the save, and so
we need to use the FP in these cases (as for all of the other spills and
restores, but the CR restore has a special code path because its reserved slot,
like the link register, is specified directly relative to the adjusted SP).

llvm-svn: 179457

11 years agoFurther generalize this scheduler test.
Andrew Trick [Sat, 13 Apr 2013 07:37:27 +0000 (07:37 +0000)]
Further generalize this scheduler test.

The order of copies depends on queue order, which is not very stable.

llvm-svn: 179456

11 years agoFix a dislexic regex.
Andrew Trick [Sat, 13 Apr 2013 07:29:21 +0000 (07:29 +0000)]
Fix a dislexic regex.

llvm-svn: 179455

11 years agoRemove duplicated comment.
Simon Atanasyan [Sat, 13 Apr 2013 06:43:15 +0000 (06:43 +0000)]
Remove duplicated comment.

llvm-svn: 179454

11 years agoAdd a missing REQUIRES: asserts
Andrew Trick [Sat, 13 Apr 2013 06:12:46 +0000 (06:12 +0000)]
Add a missing REQUIRES: asserts

llvm-svn: 179453

11 years agoMI-Sched: DEBUG formatting.
Andrew Trick [Sat, 13 Apr 2013 06:07:49 +0000 (06:07 +0000)]
MI-Sched: DEBUG formatting.

llvm-svn: 179452

11 years agoMI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check...
Andrew Trick [Sat, 13 Apr 2013 06:07:45 +0000 (06:07 +0000)]
MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check for a variant.

llvm-svn: 179451

11 years agoX86 machine model: reduce SandyBridge and Haswell ILPWindow.
Andrew Trick [Sat, 13 Apr 2013 06:07:43 +0000 (06:07 +0000)]
X86 machine model: reduce SandyBridge and Haswell ILPWindow.

The initial values were arbitrary. I want them to be more
conservative. This represents the number of latency cycles hidden by
OOO execution. In practice, I think it should be within a small factor
of the complex floating point operation latency so the scheduler can
make some attempt to hide latency even for smallish blocks.

These are by no means the best values, just a starting point for
tuning heuristics. Some benchmarks such as TSVC run faster with this
lower value for SandyBridge. I haven't run anything on Haswell, but
it's shouldn't be 2x SB.

llvm-svn: 179450

11 years agoMI-Sched: schedule physreg copies.
Andrew Trick [Sat, 13 Apr 2013 06:07:40 +0000 (06:07 +0000)]
MI-Sched: schedule physreg copies.

The register allocator expects minimal physreg live ranges. Schedule
physreg copies accordingly. This is slightly tricky when they occur in
the middle of the scheduling region. For now, this is handled by
rescheduling the copy when its associated instruction is
scheduled. Eventually we may instead bundle them, but only if we can
preserve the bundles as parallel copies during regalloc.

llvm-svn: 179449

11 years agoCatch another case where SD fails to propagate node order.
Andrew Trick [Sat, 13 Apr 2013 06:07:36 +0000 (06:07 +0000)]
Catch another case where SD fails to propagate node order.

I need to handle this for the test case in my following scheduler
commit.

Work is already under way to redesign the mechanism for node order
propagation because this case by case approach is unmaintainable.

llvm-svn: 179448

11 years agoAnnotate flavor of TLS variable (statically or dynamically initialized) onto the...
Richard Smith [Sat, 13 Apr 2013 02:43:54 +0000 (02:43 +0000)]
Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST.

llvm-svn: 179447

11 years agoAdd typenames to see if bot goes green.
Rafael Espindola [Sat, 13 Apr 2013 02:31:34 +0000 (02:31 +0000)]
Add typenames to see if bot goes green.

I hope this brings http://lab.llvm.org:8011/builders/clang-x86_64-darwin11-self-mingw32 back.

llvm-svn: 179446

11 years agoAdded symbol materialization support to the new
Sean Callanan [Sat, 13 Apr 2013 02:25:02 +0000 (02:25 +0000)]
Added symbol materialization support to the new
Materializer.

llvm-svn: 179445

11 years ago[mips] Move MipsTargetLowering::lowerINTRINSIC_W_CHAIN and
Akira Hatanaka [Sat, 13 Apr 2013 02:13:30 +0000 (02:13 +0000)]
[mips] Move MipsTargetLowering::lowerINTRINSIC_W_CHAIN and
lowerINTRINSIC_WO_CHAIN into MipsSETargetLowering.

No functionality changes.

llvm-svn: 179444

11 years agoNow that ValueObjects permit writing, made the
Sean Callanan [Sat, 13 Apr 2013 02:06:42 +0000 (02:06 +0000)]
Now that ValueObjects permit writing, made the
Materializer use that API when dematerializing
variables.

llvm-svn: 179443

11 years agoI don't know how I managed to build with that missing
Sean Callanan [Sat, 13 Apr 2013 01:58:06 +0000 (01:58 +0000)]
I don't know how I managed to build with that missing
semicolon.

llvm-svn: 179442

11 years agoSome versions of gcc don't like typenames in these places.
Rafael Espindola [Sat, 13 Apr 2013 01:55:34 +0000 (01:55 +0000)]
Some versions of gcc don't like typenames in these places.

Should fix the bots.

llvm-svn: 179441

11 years agoFinish templating MachObjectFile over endianness.
Rafael Espindola [Sat, 13 Apr 2013 01:45:40 +0000 (01:45 +0000)]
Finish templating MachObjectFile over endianness.

We are now able to handle big endian macho files in llvm-readobject. Thanks to
David Fang for providing the object files.

llvm-svn: 179440

11 years agoMake sure we expose SetData() through the Python
Sean Callanan [Sat, 13 Apr 2013 01:28:33 +0000 (01:28 +0000)]
Make sure we expose SetData() through the Python
interface.

llvm-svn: 179439

11 years agoUse MapVector rather than simulating it.
Richard Smith [Sat, 13 Apr 2013 01:28:18 +0000 (01:28 +0000)]
Use MapVector rather than simulating it.

llvm-svn: 179438

11 years agoAdded a SetData() method to ValueObject. This
Sean Callanan [Sat, 13 Apr 2013 01:21:23 +0000 (01:21 +0000)]
Added a SetData() method to ValueObject.  This
lets a ValueObject's contents be set from raw
data.  This has certain limitations (notably,
registers can only be set to data that is as
large as the register) but will be useful for
the new Materializer.

I also exposed this interface through SBValue.
I have added a testcase that exercises various
special cases of SBValue::SetData().

llvm-svn: 179437

11 years agoSpeed-up ObjCMethodDecl::getOverriddenMethods().
Argyrios Kyrtzidis [Sat, 13 Apr 2013 01:04:01 +0000 (01:04 +0000)]
Speed-up ObjCMethodDecl::getOverriddenMethods().

Use an newly introduce ASTContext::getBaseObjCCategoriesAfterInterface() which caches its
results instead of re-calculating the categories multiple times.

llvm-svn: 179436

11 years agoIntroduce SourceManager::getDecomposedIncludedLoc, that returns the "included/expande...
Argyrios Kyrtzidis [Sat, 13 Apr 2013 01:03:57 +0000 (01:03 +0000)]
Introduce SourceManager::getDecomposedIncludedLoc, that returns the "included/expanded in" decomposed location of the given FileID.

The main benefit is to speed-up SourceManager::isBeforeInTranslationUnit which is common to query
the included/expanded location of the same FileID multiple times.

llvm-svn: 179435

11 years ago[mips] Reapply r179420 and r179421.
Akira Hatanaka [Sat, 13 Apr 2013 00:55:41 +0000 (00:55 +0000)]
[mips] Reapply r179420 and r179421.

llvm-svn: 179434

11 years ago[mips] Override TargetLoweringBase::isShuffleMaskLegal.
Akira Hatanaka [Sat, 13 Apr 2013 00:45:02 +0000 (00:45 +0000)]
[mips] Override TargetLoweringBase::isShuffleMaskLegal.

llvm-svn: 179433

11 years agoGive this test a triple so that its use of thread_local doesn't make it fail on the...
Richard Smith [Sat, 13 Apr 2013 00:34:48 +0000 (00:34 +0000)]
Give this test a triple so that its use of thread_local doesn't make it fail on the MSVC bot.

llvm-svn: 179432

11 years agoHandle an edge case where we step into a function whose UnwindPlan
Jason Molenda [Sat, 13 Apr 2013 00:29:13 +0000 (00:29 +0000)]
Handle an edge case where we step into a function whose UnwindPlan
defines a Return Address register (e.g. lr on arm) but the RA register
hasn't been saved anywhere yet -- it is still in a live reg.
<rdar://problem/13503130>

llvm-svn: 179431

11 years agoDon't replace an existing decl in the scope chains with its
John McCall [Sat, 13 Apr 2013 00:20:21 +0000 (00:20 +0000)]
Don't replace an existing decl in the scope chains with its
local-extern redeclaration;  type refinements, default arguments,
etc. must all be locally scoped.

rdar://13535367

llvm-svn: 179430

11 years agoHeaders: Don't try to use RSIZE_MAX unless we are freestanding.
Daniel Dunbar [Fri, 12 Apr 2013 23:41:08 +0000 (23:41 +0000)]
Headers: Don't try to use RSIZE_MAX unless we are freestanding.
 - We don't want to depend on the platforms stdint.h.

llvm-svn: 179429

11 years ago[analyzer] Enable NewDelete checker if NewDeleteLeaks checker is enabled.
Anton Yartsev [Fri, 12 Apr 2013 23:25:40 +0000 (23:25 +0000)]
[analyzer] Enable NewDelete checker if NewDeleteLeaks checker is enabled.

llvm-svn: 179428

11 years agoHeaders: Add support for ISO9899:2011 rsize_t.
Daniel Dunbar [Fri, 12 Apr 2013 23:24:56 +0000 (23:24 +0000)]
Headers: Add support for ISO9899:2011 rsize_t.

llvm-svn: 179427

11 years agoNewDeleteLeaks is a subchecker of NewDelete checker; it is tested in NewDelete-checke...
Anton Yartsev [Fri, 12 Apr 2013 23:18:46 +0000 (23:18 +0000)]
NewDeleteLeaks is a subchecker of NewDelete checker; it is tested in NewDelete-checker-test.cpp

llvm-svn: 179426

11 years ago[ms-inline asm] Simplify the logic by using parsePrimaryExpr. No functional
Chad Rosier [Fri, 12 Apr 2013 23:03:20 +0000 (23:03 +0000)]
[ms-inline asm] Simplify the logic by using parsePrimaryExpr.  No functional
change intended.  Test case previously added in r178568.
Part of rdar://13611297

llvm-svn: 179425

11 years agoParsing support for thread_local and _Thread_local. We give them the same
Richard Smith [Fri, 12 Apr 2013 22:46:28 +0000 (22:46 +0000)]
Parsing support for thread_local and _Thread_local. We give them the same
semantics as __thread for now.

llvm-svn: 179424

11 years agoRevert r179420 and r179421.
Akira Hatanaka [Fri, 12 Apr 2013 22:40:07 +0000 (22:40 +0000)]
Revert r179420 and r179421.

llvm-svn: 179422

11 years ago[mips] Instruction selection patterns for carry-setting and using add
Akira Hatanaka [Fri, 12 Apr 2013 22:24:52 +0000 (22:24 +0000)]
[mips] Instruction selection patterns for carry-setting and using add
instructions.

llvm-svn: 179421

11 years ago[mips] v4i8 and v2i16 add, sub and mul instruction selection patterns.
Akira Hatanaka [Fri, 12 Apr 2013 22:14:24 +0000 (22:14 +0000)]
[mips] v4i8 and v2i16 add, sub and mul instruction selection patterns.

llvm-svn: 179420

11 years agotl;dr: Teach Clang to work around g++ changing its workaround to glibc's
Richard Smith [Fri, 12 Apr 2013 22:11:07 +0000 (22:11 +0000)]
tl;dr: Teach Clang to work around g++ changing its workaround to glibc's
implementation of C99's attempt to control the C++ standard. *sigh*

The C99 standard says that certain macros in <stdint.h>, such as SIZE_MAX,
should not be defined when the header is included in C++ mode, unless
__STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS are defined. The C++11 standard
says "Thanks, but no thanks" and C11 removed this rule, but various C library
implementations (such as glibc) follow C99 anyway.

g++ prior to 4.8 worked around the C99 / glibc behavior by defining
__STDC_*_MACROS in <cstdint>, which was incorrect, because <stdint.h> is
supposed to provide these macros too. g++ 4.8 works around it by defining
__STDC_*_MACROS in its builtin <stdint.h> header.

This change makes Clang act like g++ 4.8 in this regard: our <stdint.h> now
countermands any attempt by the C library to implement the undesired C99 rules,
by defining the __STDC_*_MACROS first. Unlike g++, we do this even in C++98
mode, since that was the intent of the C++ committee, matches the behavior
required in C11, and matches our built-in implementation of <stdint.h>.

llvm-svn: 179419

11 years agoRevert r179409 because it caused some warnings and some of the build bots fail.
Nadav Rotem [Fri, 12 Apr 2013 22:02:26 +0000 (22:02 +0000)]
Revert r179409 because it caused some warnings and some of the build bots fail.

llvm-svn: 179418

11 years agoInstCombine: Check the operand types before merging fcmp ord & fcmp ord.
Benjamin Kramer [Fri, 12 Apr 2013 21:56:23 +0000 (21:56 +0000)]
InstCombine: Check the operand types before merging fcmp ord & fcmp ord.

Fixes PR15737.

llvm-svn: 179417

11 years agoImplemented materialization and dematerialization
Sean Callanan [Fri, 12 Apr 2013 21:40:34 +0000 (21:40 +0000)]
Implemented materialization and dematerialization
for variables in the new Materializer.  This is
much easier now that the ValueObject API is solid.

I still have to implement reading bytes into a
ValueObject, but committing what I have so far.

This code is not yet used, so there will be fixes
when I switch the expression parser over to use the
new Materializer.

llvm-svn: 179416

11 years agoSketch test case improvements:
Enrico Granata [Fri, 12 Apr 2013 21:31:02 +0000 (21:31 +0000)]
Sketch test case improvements:
- use the TestCase option parsing
- dump output to stdout when no file is provided

llvm-svn: 179415

11 years agoSLPVectorizer: add support for vectorization of diamond shaped trees. We now perform...
Nadav Rotem [Fri, 12 Apr 2013 21:16:54 +0000 (21:16 +0000)]
SLPVectorizer: add support for vectorization of diamond shaped trees. We now perform a preliminary traversal of the graph to collect values with multiple users and check where the users came from.

llvm-svn: 179414

11 years agoCostModel: increase the default cost of supported floating point operations from...
Nadav Rotem [Fri, 12 Apr 2013 21:15:03 +0000 (21:15 +0000)]
CostModel: increase the default cost of supported floating point operations from 1 to two. Fixed a few tests that changes because now the cost of one insert + a vector operation on two doubles is lower than two scalar operations on doubles.

llvm-svn: 179413

11 years agoAdd debug prints.
Nadav Rotem [Fri, 12 Apr 2013 21:11:14 +0000 (21:11 +0000)]
Add debug prints.

llvm-svn: 179412

11 years ago<rdar://problem/13643854> Only emit ambiguous-expansion warnings when at least one...
Douglas Gregor [Fri, 12 Apr 2013 21:00:54 +0000 (21:00 +0000)]
<rdar://problem/13643854> Only emit ambiguous-expansion warnings when at least one of the macro definitions comes from a non-system header.

This slightly weakens the heuristic introduced in r178109.

llvm-svn: 179411

11 years ago[analyzer] Makes NewDeleteLeaks checker work independently from NewDelete.
Anton Yartsev [Fri, 12 Apr 2013 20:48:49 +0000 (20:48 +0000)]
[analyzer] Makes NewDeleteLeaks checker work independently from NewDelete.

llvm-svn: 179410

11 years agoAdd support for additional vector instructions in the interpreter.
Nadav Rotem [Fri, 12 Apr 2013 20:45:20 +0000 (20:45 +0000)]
Add support for additional vector instructions in the interpreter.

patch by Veselov, Yuri <Yuri.Veselov@intel.com>.

llvm-svn: 179409

11 years agoRuben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros...
Howard Hinnant [Fri, 12 Apr 2013 20:22:57 +0000 (20:22 +0000)]
Ruben Van Boxem:  Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.

llvm-svn: 179408

11 years ago[ms-inline asm] Move this logic into a static function as it's only applicable
Chad Rosier [Fri, 12 Apr 2013 20:20:54 +0000 (20:20 +0000)]
[ms-inline asm] Move this logic into a static function as it's only applicable
when parsing MS-style inline assembly.  No functional change intended.

llvm-svn: 179407

11 years agoDefine Neon intrinsics as "static inline" to avoid warning. rdar://13108414
Bob Wilson [Fri, 12 Apr 2013 20:17:20 +0000 (20:17 +0000)]
Define Neon intrinsics as "static inline" to avoid warning. rdar://13108414

We had been defining Neon intrinsics as "static" with always_inline attributes.
If you use them from an extern inline function, you get a warning, e.g.:

static function 'vadd_u8' is used in an inline function with external linkage

This change simply adds the inline keyword to avoid that warning.

llvm-svn: 179406

11 years ago<rdar://problem/13491977>
Greg Clayton [Fri, 12 Apr 2013 20:07:46 +0000 (20:07 +0000)]
<rdar://problem/13491977>

Made some fixes to the OperatingSystemPython class:
- If any thread dictionary contains any "core=N" key/value pairs then the threads obtained from the lldb_private::Process itself will be placed inside the ThreadMemory threads and will be used to get the information for a thread.
- Cleaned up all the places where a thread inside a thread was causing problems

llvm-svn: 179405

11 years agoAdd test case for r179403.
Chad Rosier [Fri, 12 Apr 2013 19:52:07 +0000 (19:52 +0000)]
Add test case for r179403.

llvm-svn: 179404

11 years ago[ms-inline asm] Address the FIXME for ImmDisp before brackets. This
Chad Rosier [Fri, 12 Apr 2013 19:51:49 +0000 (19:51 +0000)]
[ms-inline asm] Address the FIXME for ImmDisp before brackets. This
is a follow on to r179393 and r179399.  Test case to be added on
the clang side.
Part of rdar://13453209

llvm-svn: 179403

11 years agolit: Fix infinite recursion when an out-of-tree test root is located inside the sourc...
Daniel Dunbar [Fri, 12 Apr 2013 19:09:09 +0000 (19:09 +0000)]
lit: Fix infinite recursion when an out-of-tree test root is located inside the source test root.

llvm-svn: 179402

11 years agolit: Add a test for discovery w/ test_exec_root (out-of-tree test root).
Daniel Dunbar [Fri, 12 Apr 2013 19:08:57 +0000 (19:08 +0000)]
lit: Add a test for discovery w/ test_exec_root (out-of-tree test root).

llvm-svn: 179401

11 years agoAdd test case for r179399.
Chad Rosier [Fri, 12 Apr 2013 18:54:40 +0000 (18:54 +0000)]
Add test case for r179399.

llvm-svn: 179400

11 years ago[ms-inline asm] Have the [ Symbol ] case fall into the more general logic. This
Chad Rosier [Fri, 12 Apr 2013 18:54:20 +0000 (18:54 +0000)]
[ms-inline asm] Have the [ Symbol ] case fall into the more general logic. This
is a follow on to r179393.  Test case to be added on the clang side.
Part of rdar://13453209

llvm-svn: 179399

11 years agoARM: Correct printing of pre-indexed operands.
Quentin Colombet [Fri, 12 Apr 2013 18:47:25 +0000 (18:47 +0000)]
ARM: Correct printing of pre-indexed operands.
According to the ARM reference manual, constant offsets are mandatory for pre-indexed addressing modes.
The MC disassembler was not obeying this when the offset is 0.
It was producing instructions like: str r0, [r1]!.
Correct syntax is: str r0, [r1, #0]!.

This change modifies the dumping of operands so that the offset is always printed, regardless of its value, when pre-indexed addressing mode is used.

Patch by Mihail Popa <Mihail.Popa@arm.com>

llvm-svn: 179398

11 years ago[Core] Add parallel infrastructure to lld.
Michael J. Spencer [Fri, 12 Apr 2013 18:40:39 +0000 (18:40 +0000)]
[Core] Add parallel infrastructure to lld.

Uses ConcRT and PPL on Windows.

llvm-svn: 179397

11 years ago[analyzer] Print a diagnostic note even if the region cannot be printed.
Anna Zaks [Fri, 12 Apr 2013 18:40:27 +0000 (18:40 +0000)]
[analyzer] Print a diagnostic note even if the region cannot be printed.

There are few cases where we can track the region, but cannot print the note,
which makes the testing limited. (Though, I’ve tested this manually by making
all regions non-printable.) Even though the applicability is limited now, the enhancement
will be more relevant as we start tracking more regions.

llvm-svn: 179396