platform/upstream/llvm.git
11 years agoRemove the RelaxAll overrule in MCAssembler::fixupNeedsRelaxation,
Eli Bendersky [Tue, 11 Dec 2012 17:16:00 +0000 (17:16 +0000)]
Remove the RelaxAll overrule in MCAssembler::fixupNeedsRelaxation,
because that method is only getting called for MCInstFragment. These
fragments aren't even generated when RelaxAll is set, which is why the
flag reference here is superfluous. Removing it simplifies the code
with no harmful effects.

An assertion is added higher up to make sure this path is never
reached.

llvm-svn: 169886

11 years ago[driver] Add the -fvectorize flag to enable the loop vectorization passes.
Chad Rosier [Tue, 11 Dec 2012 17:12:28 +0000 (17:12 +0000)]
[driver] Add the -fvectorize flag to enable the loop vectorization passes.
rdar://12839978

llvm-svn: 169885

11 years agoUse an ArrayRef instead of a std::vector&.
Rafael Espindola [Tue, 11 Dec 2012 16:36:02 +0000 (16:36 +0000)]
Use an ArrayRef instead of a std::vector&.

llvm-svn: 169881

11 years agoAdd comment for load folding
Joel Jones [Tue, 11 Dec 2012 16:10:25 +0000 (16:10 +0000)]
Add comment for load folding

llvm-svn: 169880

11 years agoDocumentation: convert Passes.html to reST.
Dmitri Gribenko [Tue, 11 Dec 2012 15:29:37 +0000 (15:29 +0000)]
Documentation: convert Passes.html to reST.

Since now we have an autogenerated TOC, a manually written table of all passes
was removed.

Patch by Anthony Mykhailenko with small fixes by me.

llvm-svn: 169867

11 years agoStmtDumper coding style changes
Alexander Kornienko [Tue, 11 Dec 2012 15:28:09 +0000 (15:28 +0000)]
StmtDumper coding style changes

Summary:
A few small coding style changes for StmtDumper, including:
- rename Dump* methods to dump*
- uninline some methods
- comment fixes
- whitespace fixes

Please review and commit if okay.

Reviewers: alexfh

Reviewed By: alexfh

CC: cfe-commits, alexfh, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D190

llvm-svn: 169866

11 years agoRename StmtDumper::DumpSubTree() to dumpStmt()
Alexander Kornienko [Tue, 11 Dec 2012 15:20:44 +0000 (15:20 +0000)]
Rename StmtDumper::DumpSubTree() to dumpStmt()

Summary:
Also rename DumpDeclarator() to dumpDecl(). Once Decl dumping is added, these will be the two main methods of the class, so this is just for consistency in naming.

There was a DumpStmt() method already, but there was no point in having it, so I have merged it into VisitStmt(). Similarly, DumpExpr() is merged into VisitExpr().

Reviewers: alexfh

Reviewed By: alexfh

CC: cfe-commits, alexfh
Differential Revision: http://llvm-reviews.chandlerc.com/D156

llvm-svn: 169865

11 years ago[asan] more code for asan_allocator2: basic Allocate/Deallocate code
Kostya Serebryany [Tue, 11 Dec 2012 14:41:31 +0000 (14:41 +0000)]
[asan] more code for asan_allocator2: basic Allocate/Deallocate code

llvm-svn: 169864

11 years agollvm/test/TableGen: Remove XFAIL:vg_leak in dozen of tests, according to llvm-x86_64...
NAKAMURA Takumi [Tue, 11 Dec 2012 13:14:16 +0000 (13:14 +0000)]
llvm/test/TableGen: Remove XFAIL:vg_leak in dozen of tests, according to llvm-x86_64-linux-vg_leak.

llvm-svn: 169862

11 years agoAdd MemorySanitizer runtime to check_lint.sh.
Evgeniy Stepanov [Tue, 11 Dec 2012 12:52:38 +0000 (12:52 +0000)]
Add MemorySanitizer runtime to check_lint.sh.

llvm-svn: 169861

11 years ago[msan] Add a missing file from r169858.
Evgeniy Stepanov [Tue, 11 Dec 2012 12:44:43 +0000 (12:44 +0000)]
[msan] Add a missing file from r169858.

llvm-svn: 169860

11 years ago[msan] Use explicitely aligned stores and loads with function argument shadow.
Evgeniy Stepanov [Tue, 11 Dec 2012 12:34:09 +0000 (12:34 +0000)]
[msan] Use explicitely aligned stores and loads with function argument shadow.

Use explicitely aligned store and load instructions to deal with argument and
retval shadow. This matters when an argument's alignment is higher than
__msan_param_tls alignment (which is the case with __m128i).

llvm-svn: 169859

11 years ago[msan] MemorySanitizer runtime.
Evgeniy Stepanov [Tue, 11 Dec 2012 12:27:27 +0000 (12:27 +0000)]
[msan] MemorySanitizer runtime.

Initial commit of the MemorySanitizer runtime library.

llvm-svn: 169858

11 years agoASan: fix lint problems introduced
Timur Iskhodzhanov [Tue, 11 Dec 2012 12:24:41 +0000 (12:24 +0000)]
ASan: fix lint problems introduced

llvm-svn: 169857

11 years agoHopefully fix the Windows build (2)
Timur Iskhodzhanov [Tue, 11 Dec 2012 12:23:00 +0000 (12:23 +0000)]
Hopefully fix the Windows build (2)

llvm-svn: 169856

11 years agoHopefully fix the Windows build by not including intrin.h
Timur Iskhodzhanov [Tue, 11 Dec 2012 12:03:06 +0000 (12:03 +0000)]
Hopefully fix the Windows build by not including intrin.h

llvm-svn: 169855

11 years agoRevert EVT->MVT changes, r169836-169851, due to buildbot failures.
Patrik Hagglund [Tue, 11 Dec 2012 11:14:33 +0000 (11:14 +0000)]
Revert EVT->MVT changes, r169836-169851, due to buildbot failures.

llvm-svn: 169854

11 years agoHolding my nose and moving the accumulation routine to GEPOperator
Chandler Carruth [Tue, 11 Dec 2012 11:05:15 +0000 (11:05 +0000)]
Holding my nose and moving the accumulation routine to GEPOperator
instead of the instruction. I've left a forwarding wrapper for the
instruction so users with the instruction don't need to create
a GEPOperator themselves.

This lets us remove the copy of this code in instsimplify.

I've looked at most of the other copies of similar code, and this is the
only one I've found that is actually exactly the same. The one in
InlineCost is very close, but it requires re-mapping non-constant
indices through the cost analysis value simplification map. I could add
direct support for this to the generic routine, but it seems overly
specific.

llvm-svn: 169853

11 years agoHoist the GEP constant address offset computation to a common home on
Chandler Carruth [Tue, 11 Dec 2012 10:29:10 +0000 (10:29 +0000)]
Hoist the GEP constant address offset computation to a common home on
the GEP instruction class.

This is part of the continued refactoring and cleaning of the
infrastructure used by SROA. This particular operation is also done in
a few other places which I'll try to refactor to share this
implementation.

llvm-svn: 169852

11 years agoChange RegVT in BitTestBlock and RegsForValue, to contain MVTs,
Patrik Hagglund [Tue, 11 Dec 2012 10:24:48 +0000 (10:24 +0000)]
Change RegVT in BitTestBlock and RegsForValue, to contain MVTs,
instead of EVTs.

llvm-svn: 169851

11 years agoChange TargetLowering::getTypeForExtArgOrReturn to take and return
Patrik Hagglund [Tue, 11 Dec 2012 10:20:51 +0000 (10:20 +0000)]
Change TargetLowering::getTypeForExtArgOrReturn to take and return
MVTs, instead of EVTs.

Accordingly, add bitsLT (and similar) to MVT.

llvm-svn: 169850

11 years agoChange a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
Patrik Hagglund [Tue, 11 Dec 2012 10:16:19 +0000 (10:16 +0000)]
Change a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
from EVT.

llvm-svn: 169849

11 years agoChange TargetLowering::RegisterTypeForVT to contain MVTs, instead of
Patrik Hagglund [Tue, 11 Dec 2012 10:09:23 +0000 (10:09 +0000)]
Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.

llvm-svn: 169848

11 years agoChange TargetLowering::TransformToType to contain MVTs, instead of
Patrik Hagglund [Tue, 11 Dec 2012 10:05:04 +0000 (10:05 +0000)]
Change TargetLowering::TransformToType to contain MVTs, instead of
EVTs.

llvm-svn: 169847

11 years agoChange TargetLowering::getRepRegClassCostFor, getIndexedLoadAction,
Patrik Hagglund [Tue, 11 Dec 2012 10:00:35 +0000 (10:00 +0000)]
Change TargetLowering::getRepRegClassCostFor, getIndexedLoadAction,
getIndexedStoreAction, and addRegisterClass to take an MVT, instead
of EVT.

llvm-svn: 169846

11 years agoChange TargetLowering::findRepresentativeClass to take an MVT, instead
Patrik Hagglund [Tue, 11 Dec 2012 09:57:18 +0000 (09:57 +0000)]
Change TargetLowering::findRepresentativeClass to take an MVT, instead
of EVT.

llvm-svn: 169845

11 years agoChange TargetLowering::getTypeToPromoteTo to take and return MVTs,
Patrik Hagglund [Tue, 11 Dec 2012 09:54:23 +0000 (09:54 +0000)]
Change TargetLowering::getTypeToPromoteTo to take and return MVTs,
instead of EVTs.

llvm-svn: 169844

11 years agoChange TargetLowering::isCondCodeLegal to take an MVT, instead of EVT.
Patrik Hagglund [Tue, 11 Dec 2012 09:51:27 +0000 (09:51 +0000)]
Change TargetLowering::isCondCodeLegal to take an MVT, instead of EVT.

llvm-svn: 169843

11 years agoChange TargetLowering::getCondCodeAction to take an MVT, instead of
Patrik Hagglund [Tue, 11 Dec 2012 09:48:14 +0000 (09:48 +0000)]
Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT.

llvm-svn: 169842

11 years agoChange TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.
Patrik Hagglund [Tue, 11 Dec 2012 09:42:24 +0000 (09:42 +0000)]
Change TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.

llvm-svn: 169841

11 years agoChange TargetLowering::getLoadExtAction to take an MVT, instead of EVT.
Patrik Hagglund [Tue, 11 Dec 2012 09:39:09 +0000 (09:39 +0000)]
Change TargetLowering::getLoadExtAction to take an MVT, instead of EVT.

llvm-svn: 169840

11 years agoChange TargetLowering::setTypeAction to take an MVT, instead fo EVT.
Patrik Hagglund [Tue, 11 Dec 2012 09:32:56 +0000 (09:32 +0000)]
Change TargetLowering::setTypeAction to take an MVT, instead fo EVT.

llvm-svn: 169839

11 years agoChange TargetLowering::getRepRegClassFor to take an MVT, instead of
Patrik Hagglund [Tue, 11 Dec 2012 09:31:43 +0000 (09:31 +0000)]
Change TargetLowering::getRepRegClassFor to take an MVT, instead of
EVT.

Accordingly, change RegDefIter to contain MVTs instead of EVTs.

llvm-svn: 169838

11 years agoChange TargetLowering::getRegClassFor to take an MVT, instead of EVT.
Patrik Hagglund [Tue, 11 Dec 2012 09:10:33 +0000 (09:10 +0000)]
Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.

Accordingly, add helper funtions getSimpleValueType (in parallel to
getValueType) in SDValue, SDNode, and TargetLowering.

This is the first, in a series of patches.

llvm-svn: 169837

11 years ago[asan] more sceleton code for asan_allocator2
Kostya Serebryany [Tue, 11 Dec 2012 09:02:36 +0000 (09:02 +0000)]
[asan] more sceleton code for asan_allocator2

llvm-svn: 169836

11 years agoExtend stat query APIs to explicitly specify if the query is for
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:23 +0000 (07:48 +0000)]
Extend stat query APIs to explicitly specify if the query is for
a file or directory, allowing just a stat call if a file descriptor
is not needed.

Doing just 'stat' is faster than 'open/fstat/close'.
This has the effect of cutting down system time for validating the input files of a PCH.

llvm-svn: 169831

11 years ago[PCH] Remove redundant stat call when validating the input files.
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:14 +0000 (07:48 +0000)]
[PCH] Remove redundant stat call when validating the input files.

This became redundant after we removed the stat cache.

llvm-svn: 169830

11 years ago[PCH] When writing out the list of input files, avoid emitting duplicate
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:08 +0000 (07:48 +0000)]
[PCH] When writing out the list of input files, avoid emitting duplicate
entries of the same file.

This can happen because the file was "included" multiple times and is
referenced by multiple SLocEntries.

llvm-svn: 169829

11 years ago[asan] fix the Windows build
Kostya Serebryany [Tue, 11 Dec 2012 07:27:59 +0000 (07:27 +0000)]
[asan] fix the Windows build

llvm-svn: 169828

11 years agoclang/test/Driver/linker-opts.c: Fix XFAIL that I removed win32.
NAKAMURA Takumi [Tue, 11 Dec 2012 07:23:52 +0000 (07:23 +0000)]
clang/test/Driver/linker-opts.c: Fix XFAIL that I removed win32.

Sorry for my 3rd commit :(

llvm-svn: 169827

11 years agoclang/test/Driver/debug-options-as.c: Fixup not to use prefix=S. I didn't know "REQUI...
NAKAMURA Takumi [Tue, 11 Dec 2012 07:16:15 +0000 (07:16 +0000)]
clang/test/Driver/debug-options-as.c: Fixup not to use prefix=S. I didn't know "REQUIRES:" would match --check-prefix=S ...

llvm-svn: 169826

11 years agoclang/test/Driver: Introduce the feature "clang-driver", set if gcc driver is not...
NAKAMURA Takumi [Tue, 11 Dec 2012 07:06:09 +0000 (07:06 +0000)]
clang/test/Driver: Introduce the feature "clang-driver", set if gcc driver is not used.

It is not set at targetting cygming. See PR12920.

llvm-svn: 169824

11 years agorevert the test change
Hao Liu [Tue, 11 Dec 2012 06:25:18 +0000 (06:25 +0000)]
revert the test change

llvm-svn: 169823

11 years ago[asan] make ThreadNamesTest more flexible
Kostya Serebryany [Tue, 11 Dec 2012 06:23:10 +0000 (06:23 +0000)]
[asan] make ThreadNamesTest more flexible

llvm-svn: 169822

11 years agoA newbie try a test commit
Hao Liu [Tue, 11 Dec 2012 06:22:54 +0000 (06:22 +0000)]
A newbie try a test commit

llvm-svn: 169821

11 years ago[CMake] Remove dependencies to intrinsics_gen I introduced in r169724.
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:54 +0000 (05:53 +0000)]
[CMake] Remove dependencies to intrinsics_gen I introduced in r169724.

llvm-svn: 169819

11 years agollvm/Target/TargetMachine.h: Remove two dependent headers.
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:43 +0000 (05:53 +0000)]
llvm/Target/TargetMachine.h: Remove two dependent headers.

-#include "llvm/Target/TargetTransformImpl.h"
-#include "llvm/TargetTransformInfo.h"

llvm-svn: 169818

11 years agollvm/tools: Add #include "llvm/TargetTransformInfo.h"
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:37 +0000 (05:53 +0000)]
llvm/tools: Add #include "llvm/TargetTransformInfo.h"

llvm-svn: 169817

11 years agoBackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:24 +0000 (05:53 +0000)]
BackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"

llvm/Target/TargetMachine.h will not provide "llvm/TargetTransformInfo.h" any more.

llvm-svn: 169816

11 years agoAdd tests for a corner case of when to relax all instructions:
Rafael Espindola [Tue, 11 Dec 2012 05:52:24 +0000 (05:52 +0000)]
Add tests for a corner case of when to relax all instructions:

We don't want to relax all instructions in

$ clang -c test.s

since most users don't pass -O when using the driver to assemble.

On the other hand, -save-temps should not change the output unnecessary, so in

$ clang -c test.c -save-temps

we should relax all instructions.

llvm-svn: 169815

11 years agoUse multiclass for new-value store instructions with MEMri operand.
Jyotsna Verma [Tue, 11 Dec 2012 05:12:25 +0000 (05:12 +0000)]
Use multiclass for new-value store instructions with MEMri operand.

llvm-svn: 169814

11 years agoFix PR14565. Don't if-convert loops that have switch statements in them.
Nadav Rotem [Tue, 11 Dec 2012 04:55:10 +0000 (04:55 +0000)]
Fix PR14565. Don't if-convert loops that have switch statements in them.

llvm-svn: 169813

11 years agoChange some functions to take const pointers.
Rafael Espindola [Tue, 11 Dec 2012 03:10:43 +0000 (03:10 +0000)]
Change some functions to take const pointers.

llvm-svn: 169812

11 years agoStylistic tweak.
Evan Cheng [Tue, 11 Dec 2012 02:31:57 +0000 (02:31 +0000)]
Stylistic tweak.

llvm-svn: 169811

11 years agoBroadcast an event when the selected thread is changed.
Jim Ingham [Tue, 11 Dec 2012 02:31:48 +0000 (02:31 +0000)]
Broadcast an event when the selected thread is changed.

<rdar://problem/10976636>

llvm-svn: 169810

11 years ago<rdar://problem/12639506>
Enrico Granata [Tue, 11 Dec 2012 02:17:22 +0000 (02:17 +0000)]
<rdar://problem/12639506>

Make sure that the user's choice of a format for dumping aggregate types is persisted to child members

llvm-svn: 169809

11 years agoUpdate comments around ABISysV_x86_64::RegisterIsCalleeSaved to
Jason Molenda [Tue, 11 Dec 2012 01:20:57 +0000 (01:20 +0000)]
Update comments around ABISysV_x86_64::RegisterIsCalleeSaved to
make it clear that this is the list of callee-saved registers,
add reference to the ABI doc that this comes from.

llvm-svn: 169807

11 years ago<rdar://problem/12842032>
Greg Clayton [Tue, 11 Dec 2012 01:20:51 +0000 (01:20 +0000)]
<rdar://problem/12842032>

Don't load __LINKEDIT segments when dynamically loading kexts.

llvm-svn: 169806

11 years agoPR14558: Compute triviality of special members (etc) at the end of the class
Richard Smith [Tue, 11 Dec 2012 01:14:52 +0000 (01:14 +0000)]
PR14558: Compute triviality of special members (etc) at the end of the class
definition, rather than at the end of the definition of the set of nested
classes. We still defer checking of the user-specified exception specification
to the end of the nesting -- we can't check that until we've parsed the
in-class initializers for non-static data members.

llvm-svn: 169805

11 years agoAdd a triple to this test.
Chad Rosier [Tue, 11 Dec 2012 00:51:36 +0000 (00:51 +0000)]
Add a triple to this test.

llvm-svn: 169803

11 years agoFix a miscompile in the DAG combiner. Previously, we would incorrectly
Chandler Carruth [Tue, 11 Dec 2012 00:36:57 +0000 (00:36 +0000)]
Fix a miscompile in the DAG combiner. Previously, we would incorrectly
try to reduce the width of this load, and would end up transforming:

  (truncate (lshr (sextload i48 <ptr> as i64), 32) to i32)
to
  (truncate (zextload i32 <ptr+4> as i64) to i32)

We lost the sext attached to the load while building the narrower i32
load, and replaced it with a zext because lshr always zext's the
results. Instead, bail out of this combine when there is a conflict
between a sextload and a zext narrowing. The rest of the DAG combiner
still optimize the code down to the proper single instruction:

  movswl 6(...),%eax

Which is exactly what we wanted. Previously we read past the end *and*
missed the sign extension:

  movl 6(...), %eax

llvm-svn: 169802

11 years agomove X86-specific test
Paul Redmond [Tue, 11 Dec 2012 00:36:43 +0000 (00:36 +0000)]
move X86-specific test

This test case uses -mcpu=corei7 so it belongs in CodeGen/X86

Reviewed by: Nadav

llvm-svn: 169801

11 years agoRemoved debugging code.
Han Ming Ong [Tue, 11 Dec 2012 00:24:58 +0000 (00:24 +0000)]
Removed debugging code.

llvm-svn: 169799

11 years agoFix grammar-o.
Bill Wendling [Tue, 11 Dec 2012 00:23:07 +0000 (00:23 +0000)]
Fix grammar-o.

llvm-svn: 169798

11 years agoFall back to the selection dag isel to select tail calls.
Chad Rosier [Tue, 11 Dec 2012 00:18:02 +0000 (00:18 +0000)]
Fall back to the selection dag isel to select tail calls.

This shouldn't affect codegen for -O0 compiles as tail call markers are not
emitted in unoptimized compiles.  Testing with the external/internal nightly
test suite reveals no change in compile time performance.  Testing with -O1,
-O2 and -O3 with fast-isel enabled did not cause any compile-time or
execution-time failures.  All tests were performed on my x86 machine.
I'll monitor our arm testers to ensure no regressions occur there.

In an upcoming clang patch I will be marking the objc_autoreleaseReturnValue
and objc_retainAutoreleaseReturnValue as tail calls unconditionally.  While
it's theoretically true that this is just an optimization, it's an
optimization that we very much want to happen even at -O0, or else ARC
applications become substantially harder to debug.

Part of rdar://12553082

llvm-svn: 169796

11 years ago[analyzer] Don't generate a summary for "freeWhenDone" if method is
Anna Zaks [Tue, 11 Dec 2012 00:17:53 +0000 (00:17 +0000)]
[analyzer] Don't generate a summary for "freeWhenDone" if method is
inlined.

Fixes a false positive that occurs if a user writes their own
initWithBytesNoCopy:freeWhenDone wrapper.

llvm-svn: 169795

11 years ago[CMake] Fix external llvm build. It needs to know where llvm-tblgen is.
Michael J. Spencer [Mon, 10 Dec 2012 23:52:34 +0000 (23:52 +0000)]
[CMake] Fix external llvm build. It needs to know where llvm-tblgen is.

llvm-svn: 169794

11 years agoRefactor out the abbreviation handling into a separate class that
Eric Christopher [Mon, 10 Dec 2012 23:34:43 +0000 (23:34 +0000)]
Refactor out the abbreviation handling into a separate class that
controls each of the abbreviation sets (only a single one at the
moment) and computes offsets separately as well for each set
of DIEs.

No real function change, ordering of abbreviations for the skeleton
CU changed but only because we're computing in a separate order. Fix
the testcase not to care.

llvm-svn: 169793

11 years ago<rdar://problem/12709976>
Enrico Granata [Mon, 10 Dec 2012 23:30:25 +0000 (23:30 +0000)]
<rdar://problem/12709976>

Adding a summary for NSError

llvm-svn: 169792

11 years agoSome enhancements for memcpy / memset inline expansion.
Evan Cheng [Mon, 10 Dec 2012 23:21:26 +0000 (23:21 +0000)]
Some enhancements for memcpy / memset inline expansion.
1. Teach it to use overlapping unaligned load / store to copy / set the trailing
   bytes. e.g. On 86, use two pairs of movups / movaps for 17 - 31 byte copies.
2. Use f64 for memcpy / memset on targets where i64 is not legal but f64 is. e.g.
   x86 and ARM.
3. When memcpy from a constant string, do *not* replace the load with a constant
   if it's not possible to materialize an integer immediate with a single
   instruction (required a new target hook: TLI.isIntImmLegal()).
4. Use unaligned load / stores more aggressively if target hooks indicates they
   are "fast".
5. Update ARM target hooks to use unaligned load / stores. e.g. vld1.8 / vst1.8.
   Also increase the threshold to something reasonable (8 for memset, 4 pairs
   for memcpy).

This significantly improves Dhrystone, up to 50% on ARM iOS devices.

rdar://12760078

llvm-svn: 169791

11 years agoOptimistically analyse Phi cycles
Arnold Schwaighofer [Mon, 10 Dec 2012 23:02:41 +0000 (23:02 +0000)]
Optimistically analyse Phi cycles

Analyse Phis under the starting assumption that they are NoAlias. Recursively
look at their inputs.
If they MayAlias/MustAlias there must be an input that makes them so.

Addresses bug 14351.

llvm-svn: 169788

11 years ago<rdar://problem/12850287>
Han Ming Ong [Mon, 10 Dec 2012 23:02:33 +0000 (23:02 +0000)]
<rdar://problem/12850287>

When there is XPC connection error, we will report it now.

llvm-svn: 169787

11 years agoDefer call to InitSections until after MCContext has been initialized. If
Lang Hames [Mon, 10 Dec 2012 22:49:11 +0000 (22:49 +0000)]
Defer call to InitSections until after MCContext has been initialized. If
InitSections is called before the MCContext is initialized it could cause
duplicate temporary symbols to be emitted later (after context initialization
resets the temporary label counter).

llvm-svn: 169785

11 years agoFix PR14568: Avoid the DFA packetizer from making an invalid read
Anshuman Dasgupta [Mon, 10 Dec 2012 22:45:57 +0000 (22:45 +0000)]
Fix PR14568: Avoid the DFA packetizer from making an invalid read
beyond array bounds.

No test case since I cannot reproduce an ICE with this bug. According
to Carlos -- the bug reporter -- a segfault occurs only when LLVM is
compiled with a specific version of GCC.

llvm-svn: 169783

11 years ago<rdar://problem/11844604>
Greg Clayton [Mon, 10 Dec 2012 22:26:34 +0000 (22:26 +0000)]
<rdar://problem/11844604>

When displaying function.name-with-args format will now print "varname=<unavailable>" instead of omitting argument names and values when there is an error reading the value.

llvm-svn: 169781

11 years agoRearrange vars and make comments more obvious.
Eric Christopher [Mon, 10 Dec 2012 22:25:41 +0000 (22:25 +0000)]
Rearrange vars and make comments more obvious.

llvm-svn: 169780

11 years agoRemove blank line at top of file.
Eric Christopher [Mon, 10 Dec 2012 22:25:38 +0000 (22:25 +0000)]
Remove blank line at top of file.

llvm-svn: 169779

11 years agoRemove until I can fix this.
Bill Wendling [Mon, 10 Dec 2012 22:10:53 +0000 (22:10 +0000)]
Remove until I can fix this.

llvm-svn: 169778

11 years agoFix a coding style nit.
Eric Christopher [Mon, 10 Dec 2012 22:00:20 +0000 (22:00 +0000)]
Fix a coding style nit.

llvm-svn: 169776

11 years agoAdd support to Darwin for the -export_dynamic' flag to the linker.
Bill Wendling [Mon, 10 Dec 2012 21:48:41 +0000 (21:48 +0000)]
Add support to Darwin for the -export_dynamic' flag to the linker.

llvm-svn: 169775

11 years agoEnable the loop vectorizer only on O2 and above. (Still disabled by default)
Nadav Rotem [Mon, 10 Dec 2012 21:45:01 +0000 (21:45 +0000)]
Enable the loop vectorizer only on O2 and above. (Still disabled by default)

llvm-svn: 169774

11 years agoLegalizeDAG: Allow type promotion of scalar loads
Tom Stellard [Mon, 10 Dec 2012 21:41:58 +0000 (21:41 +0000)]
LegalizeDAG: Allow type promotion of scalar loads

llvm-svn: 169773

11 years agoLegalizeDAG: Allow type promotion for scalar stores
Tom Stellard [Mon, 10 Dec 2012 21:41:54 +0000 (21:41 +0000)]
LegalizeDAG: Allow type promotion for scalar stores

llvm-svn: 169772

11 years agoSplit the LoopVectorizer into H and CPP.
Nadav Rotem [Mon, 10 Dec 2012 21:39:02 +0000 (21:39 +0000)]
Split the LoopVectorizer into H and CPP.

llvm-svn: 169771

11 years agoRevert r169656.
Bill Wendling [Mon, 10 Dec 2012 21:33:45 +0000 (21:33 +0000)]
Revert r169656.

The linker will call `lto_codegen_add_must_preserve_symbol' on all globals that
should be kept around. The linker will pretend that a dylib is being created.
<rdar://problem/12528059>

llvm-svn: 169770

11 years agoUse correct flags for this test.
Bill Wendling [Mon, 10 Dec 2012 21:15:22 +0000 (21:15 +0000)]
Use correct flags for this test.

llvm-svn: 169768

11 years agoEnable RTTI for liblldbCore.a when GCC is the compiler
Daniel Malea [Mon, 10 Dec 2012 21:05:57 +0000 (21:05 +0000)]
Enable RTTI for liblldbCore.a when GCC is the compiler
- gcc does not like -fno-rtti mixed with dynamic_cast<> (in cxa_demangle.cpp)

llvm-svn: 169767

11 years agoAdd a test for explicitly exercising the mc-relax-all flag.
Eli Bendersky [Mon, 10 Dec 2012 20:36:01 +0000 (20:36 +0000)]
Add a test for explicitly exercising the mc-relax-all flag.

llvm-svn: 169764

11 years agoFixup test case from r169755. These are driver options, not frontend options.
Chad Rosier [Mon, 10 Dec 2012 20:16:17 +0000 (20:16 +0000)]
Fixup test case from r169755.  These are driver options, not frontend options.
Also, add the -S option.

llvm-svn: 169763

11 years agoCleanup formatting, comments and naming.
Eli Bendersky [Mon, 10 Dec 2012 20:13:43 +0000 (20:13 +0000)]
Cleanup formatting, comments and naming.

llvm-svn: 169762

11 years agoReturn true from HeaderSearch::isFileMultipleIncludeGuarded if the file
Argyrios Kyrtzidis [Mon, 10 Dec 2012 20:08:37 +0000 (20:08 +0000)]
Return true from HeaderSearch::isFileMultipleIncludeGuarded if the file
was #import'ed.

llvm-svn: 169761

11 years ago[mips] Set HWEncoding field of registers. Use delete function
Akira Hatanaka [Mon, 10 Dec 2012 20:04:40 +0000 (20:04 +0000)]
[mips] Set HWEncoding field of registers. Use delete function
getMipsRegisterNumbering and use MCRegisterInfo::getEncodingValue instead.

llvm-svn: 169760

11 years ago<rdar://problem/12848118>
Enrico Granata [Mon, 10 Dec 2012 19:55:53 +0000 (19:55 +0000)]
<rdar://problem/12848118>

Making MightHaveChildren() always return true regardless for our own data formatters
This is meant to optimize performance for common most-often-not-empty container classes

llvm-svn: 169759

11 years agoUse the somewhat semantic term "split dwarf" it more matches what's
Eric Christopher [Mon, 10 Dec 2012 19:51:21 +0000 (19:51 +0000)]
Use the somewhat semantic term "split dwarf" it more matches what's
going on and makes a lot of the terminology in comments make more sense.

llvm-svn: 169758

11 years agoDelete the FissionCU.
Eric Christopher [Mon, 10 Dec 2012 19:51:18 +0000 (19:51 +0000)]
Delete the FissionCU.

llvm-svn: 169757

11 years agoReorder fission variables.
Eric Christopher [Mon, 10 Dec 2012 19:51:13 +0000 (19:51 +0000)]
Reorder fission variables.

llvm-svn: 169756

11 years agoSpecify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.
Bill Wendling [Mon, 10 Dec 2012 19:47:53 +0000 (19:47 +0000)]
Specify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.

This prevents the functions generated by that pass from using the red zone.
<rdar://problem/12843084>

llvm-svn: 169755

11 years agoDon't use a red zone for code coverage if the user specified `-mno-red-zone'.
Bill Wendling [Mon, 10 Dec 2012 19:46:49 +0000 (19:46 +0000)]
Don't use a red zone for code coverage if the user specified `-mno-red-zone'.

The `-mno-red-zone' flag wasn't being propagated to the functions that code
coverage generates. This allowed some of them to use the red zone when that
wasn't allowed.
<rdar://problem/12843084>

llvm-svn: 169754

11 years ago<rdar://problem/12827031>
Greg Clayton [Mon, 10 Dec 2012 19:43:43 +0000 (19:43 +0000)]
<rdar://problem/12827031>

Fix the OptionValueFileSpec option value to correctly get the file path when trailing spaces are on the path. The "settings set" command uses the OptionValueFileSpec class to set file paths and if extra spaces are at the end it will include those in the paths. Now we chop up the value send to to OptionValueFileSpec::SetValueFromCString(...) function with "lldb_private::Args" and give an appropriate error if more than one path is used. It also allows for quotes to be used when specifying the path.

llvm-svn: 169753

11 years agoAdd support for reverse induction variables. For example:
Nadav Rotem [Mon, 10 Dec 2012 19:25:06 +0000 (19:25 +0000)]
Add support for reverse induction variables. For example:

while (i--)
 sum+=A[i];

llvm-svn: 169752