platform/upstream/llvm.git
11 years agoUse VTTI->getNumberOfParts in BBVectorize.
Hal Finkel [Fri, 26 Oct 2012 04:28:06 +0000 (04:28 +0000)]
Use VTTI->getNumberOfParts in BBVectorize.

This change reflects VTTI refactoring; no functionality change intended.

llvm-svn: 166752

11 years agoAdd VectorTargetTransform::getNumberOfParts.
Hal Finkel [Fri, 26 Oct 2012 04:28:02 +0000 (04:28 +0000)]
Add VectorTargetTransform::getNumberOfParts.

As discussed on IRC, add VectorTargetTransform::getNumberOfParts
to provide a stable interface to the vector legalization splitting factor.

llvm-svn: 166751

11 years agoFix typo in comment.
Nick Lewycky [Fri, 26 Oct 2012 04:27:49 +0000 (04:27 +0000)]
Fix typo in comment.

llvm-svn: 166750

11 years agoimplement large (>16 bit) constant loading.
Reed Kotler [Fri, 26 Oct 2012 03:09:34 +0000 (03:09 +0000)]
implement large (>16 bit) constant loading.

llvm-svn: 166749

11 years agoFix unexpected passes. These test do work with LTO on linux. I tested both
Rafael Espindola [Fri, 26 Oct 2012 02:19:02 +0000 (02:19 +0000)]
Fix unexpected passes. These test do work with LTO on linux. I tested both
a cmake and an autoconf build.

llvm-svn: 166748

11 years agofix test setgek.ll so that it will not give false "make check"
Reed Kotler [Fri, 26 Oct 2012 01:29:42 +0000 (01:29 +0000)]
fix test setgek.ll so that it will not give false "make check"
failure in some cases

llvm-svn: 166747

11 years agoDeclare type of flags to be used in a __block (byref)
Fariborz Jahanian [Fri, 26 Oct 2012 01:13:38 +0000 (01:13 +0000)]
Declare type of flags to be used in a __block (byref)
variable descriptor captured by a block.

llvm-svn: 166746

11 years agolibLTO has a bug in that it will keep every symbol if none is needed. We used
Rafael Espindola [Fri, 26 Oct 2012 00:29:57 +0000 (00:29 +0000)]
libLTO has a bug in that it will keep every symbol if none is needed. We used
to hack around this in the gold plugin by deleting a module if no symbol was
needed. Unfortunately, the hack is wrong in the case of o module having no
visible symbols but still having side effects via static constructors.

The bug will have to be fixed in libLTO itself.

llvm-svn: 166745

11 years agoOz optimization level sets ForceSizeOpt attribute for each function
Quentin Colombet [Fri, 26 Oct 2012 00:29:48 +0000 (00:29 +0000)]
Oz optimization level sets ForceSizeOpt attribute for each function

llvm-svn: 166744

11 years agoX86 SSE Intrinsics: update header for sqrt_ss, rsqrt_ss and rcp_ss.
Manman Ren [Fri, 26 Oct 2012 00:25:10 +0000 (00:25 +0000)]
X86 SSE Intrinsics: update header for sqrt_ss, rsqrt_ss and rcp_ss.

There intrinsics pass through the upper FP values from the input.
rdar://12558838

llvm-svn: 166743

11 years agoPort testcase to FileCheck.
Rafael Espindola [Fri, 26 Oct 2012 00:14:11 +0000 (00:14 +0000)]
Port testcase to FileCheck.

llvm-svn: 166742

11 years agoDisable generation of pointer vectors by BBVectorize.
Hal Finkel [Fri, 26 Oct 2012 00:05:26 +0000 (00:05 +0000)]
Disable generation of pointer vectors by BBVectorize.

Once vector-of-pointer support works, then this can be reverted.

llvm-svn: 166741

11 years agoAdd a teardown function to TestAbbreviations so it doesn't error out when running...
Filipe Cabecinhas [Thu, 25 Oct 2012 23:52:28 +0000 (23:52 +0000)]
Add a teardown function to TestAbbreviations so it doesn't error out when running for two archs.

llvm-svn: 166740

11 years agoRevert 166726 because it may have broken a number of SPEC tests. PR14183.
Nadav Rotem [Thu, 25 Oct 2012 23:51:48 +0000 (23:51 +0000)]
Revert 166726 because it may have broken a number of SPEC tests. PR14183.

llvm-svn: 166739

11 years agoBBVectorize, when using VTTI, should not form types that will be split.
Hal Finkel [Thu, 25 Oct 2012 23:47:16 +0000 (23:47 +0000)]
BBVectorize, when using VTTI, should not form types that will be split.

This is needed so that perl's SHA can be compiled (otherwise
BBVectorize takes far too long to find its fixed point).

I'll try to come up with a reduced test case.

llvm-svn: 166738

11 years agoRecommit Eric's code to validate ASM string's constraints and modifiers.
Bill Wendling [Thu, 25 Oct 2012 23:28:48 +0000 (23:28 +0000)]
Recommit Eric's code to validate ASM string's constraints and modifiers.

This code checks the ASM string to see if the output size is able to fit within
the variable specified as the output. For instance, scalar-to-vector conversions
may not really work. It's on by default, but can be turned off with a flag if
you think you know what you're doing.

This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm').

<rdar://problem/12284092>

llvm-svn: 166737

11 years agoFix the other occurrence of the problem fixed by r166731.
Richard Smith [Thu, 25 Oct 2012 23:05:00 +0000 (23:05 +0000)]
Fix the other occurrence of the problem fixed by r166731.

llvm-svn: 166735

11 years agoChanging name of enum for block literal flags to represent
Fariborz Jahanian [Thu, 25 Oct 2012 22:55:52 +0000 (22:55 +0000)]
Changing name of enum for block literal flags to represent
what it is meant for.

llvm-svn: 166734

11 years ago<rdar://problem/12570550>
Greg Clayton [Thu, 25 Oct 2012 22:45:35 +0000 (22:45 +0000)]
<rdar://problem/12570550>

TOT lldb broke finding App in app bundles when launching with shell.

llvm-svn: 166733

11 years agoFound a couple more places where we need to run all threads when stepping.
Jim Ingham [Thu, 25 Oct 2012 22:30:09 +0000 (22:30 +0000)]
Found a couple more places where we need to run all threads when stepping.

llvm-svn: 166732

11 years agoLLVM's hashing routines produce a size_t, and thus generate different values for...
Richard Smith [Thu, 25 Oct 2012 22:27:30 +0000 (22:27 +0000)]
LLVM's hashing routines produce a size_t, and thus generate different values for 32- and 64-bit host compilers. This really needs to be fixed -- the IR generated should not depend on the host -- but this change will get the bots green again. Proper fix to follow.

llvm-svn: 166731

11 years agoFix anonymous namespace issue introduced by r166714:
Kaelyn Uhrain [Thu, 25 Oct 2012 22:09:49 +0000 (22:09 +0000)]
Fix anonymous namespace issue introduced by r166714:
include/llvm/MC/MCTargetAsmParser.h:46:8: error: 'llvm::ParseInstructionInfo' has a field 'llvm::ParseInstructionInfo::AsmRewrites' whose type uses the anonymous namespace [-Werror]

llvm-svn: 166729

11 years agoTrackConstraintBRVisitor and ConditionBRVisitor can emit similar
Ted Kremenek [Thu, 25 Oct 2012 22:07:10 +0000 (22:07 +0000)]
TrackConstraintBRVisitor and ConditionBRVisitor can emit similar
path notes for cases where a value may be assumed to be null, etc.
Instead of having redundant diagnostics, do a pass over the generated
PathDiagnostic pieces and remove notes from TrackConstraintBRVisitor
that are already covered by ConditionBRVisitor, whose notes tend
to be better.

Fixes <rdar://problem/12252783>

llvm-svn: 166728

11 years agoAdd a more direct test for r166661.
Richard Smith [Thu, 25 Oct 2012 21:59:45 +0000 (21:59 +0000)]
Add a more direct test for r166661.

llvm-svn: 166727

11 years agoFix a crash in ValueTracking. Add support for vectors of pointers.
Nadav Rotem [Thu, 25 Oct 2012 21:52:52 +0000 (21:52 +0000)]
Fix a crash in ValueTracking. Add support for vectors of pointers.

llvm-svn: 166726

11 years ago[ms-inline asm] Add a test case for r166723 and r166724.
Chad Rosier [Thu, 25 Oct 2012 21:52:03 +0000 (21:52 +0000)]
[ms-inline asm] Add a test case for r166723 and r166724.

llvm-svn: 166725

11 years ago[ms-inline asm] Perform field lookups with the dot operator.
Chad Rosier [Thu, 25 Oct 2012 21:51:10 +0000 (21:51 +0000)]
[ms-inline asm] Perform field lookups with the dot operator.

llvm-svn: 166724

11 years ago[ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.
Chad Rosier [Thu, 25 Oct 2012 21:49:22 +0000 (21:49 +0000)]
[ms-inline asm] Add support for field lookup in the SemaCallback.  Patch by Eli.

llvm-svn: 166723

11 years agoFix the cost-model test.
Nadav Rotem [Thu, 25 Oct 2012 21:42:50 +0000 (21:42 +0000)]
Fix the cost-model test.

llvm-svn: 166722

11 years agoimplement mips16 patterns for select nodes
Reed Kotler [Thu, 25 Oct 2012 21:33:30 +0000 (21:33 +0000)]
implement mips16 patterns for select nodes

llvm-svn: 166721

11 years agoAdd CPU model to BBVectorize cost-model tests.
Hal Finkel [Thu, 25 Oct 2012 21:31:51 +0000 (21:31 +0000)]
Add CPU model to BBVectorize cost-model tests.

llvm-svn: 166720

11 years agoDon't return false when the function's return type is a pointer.
Kaelyn Uhrain [Thu, 25 Oct 2012 21:25:08 +0000 (21:25 +0000)]
Don't return false when the function's return type is a pointer.

llvm-svn: 166719

11 years agoAdd the cpu model to the test.
Nadav Rotem [Thu, 25 Oct 2012 21:18:42 +0000 (21:18 +0000)]
Add the cpu model to the test.

llvm-svn: 166718

11 years agoAdd some new types in preparation of encoding of captured block variable
Fariborz Jahanian [Thu, 25 Oct 2012 21:15:04 +0000 (21:15 +0000)]
Add some new types in preparation of encoding of captured block variable
layout meta-data work. wip.

llvm-svn: 166717

11 years agoBegin incorporating target information into BBVectorize.
Hal Finkel [Thu, 25 Oct 2012 21:12:23 +0000 (21:12 +0000)]
Begin incorporating target information into BBVectorize.

This is the first of several steps to incorporate information from the new
TargetTransformInfo infrastructure into BBVectorize. Two things are done here:

 1. Target information is used to determine if it is profitable to fuse two
    instructions. This means that the cost of the vector operation must not
    be more expensive than the cost of the two original operations. Pairs that
    are not profitable are no longer considered (because current cost information
    is incomplete, for intrinsics for example, equal-cost pairs are still
    considered).

 2. The 'cost savings' computed for the profitability check are also used to
    rank the DAGs that represent the potential vectorization plans. Specifically,
    for nodes of non-trivial depth, the cost savings is used as the node
    weight.

The next step will be to incorporate the shuffle costs into the DAG weighting;
this will give the edges of the DAG weights as well. Once that is done, when
target information is available, we should be able to dispense with the
depth heuristic.

llvm-svn: 166716

11 years agoLoopVectorize: Teach the cost model to query scalar costs as scalar types and not...
Nadav Rotem [Thu, 25 Oct 2012 21:03:48 +0000 (21:03 +0000)]
LoopVectorize: Teach the cost model to query scalar costs as scalar types and not vectors of 1.

llvm-svn: 166715

11 years ago[ms-inline asm] Add support for creating AsmRewrites in the target specific
Chad Rosier [Thu, 25 Oct 2012 20:41:34 +0000 (20:41 +0000)]
[ms-inline asm] Add support for creating AsmRewrites in the target specific
AsmParser logic.  To be used/tested in a subsequent commit.

llvm-svn: 166714

11 years agoDon't require exception handling for clang-tblgen.
Joerg Sonnenberger [Thu, 25 Oct 2012 20:34:00 +0000 (20:34 +0000)]
Don't require exception handling for clang-tblgen.

llvm-svn: 166713

11 years agoRemove exception handling usage from tblgen.
Joerg Sonnenberger [Thu, 25 Oct 2012 20:33:17 +0000 (20:33 +0000)]
Remove exception handling usage from tblgen.

Most places can use PrintFatalError as the unwinding mechanism was not
used for anything other than printing the error. The single exception
was CodeGenDAGPatterns.cpp, where intermediate errors during type
resolution were ignored to simplify incremental platform development.
This use is replaced by an error flag in TreePattern and bailout earlier
in various places if it is set.

llvm-svn: 166712

11 years agoMove the input files for test/PCH/badpch.c under test/PCH/Inputs/.
Kaelyn Uhrain [Thu, 25 Oct 2012 19:43:57 +0000 (19:43 +0000)]
Move the input files for test/PCH/badpch.c under test/PCH/Inputs/.

llvm-svn: 166711

11 years agoAlso optimize large switch statements.
Jakob Stoklund Olesen [Thu, 25 Oct 2012 18:51:15 +0000 (18:51 +0000)]
Also optimize large switch statements.

The isValueEqualityComparison() guard at the top of SimplifySwitch()
only applies to some of the possible transformations.

The newer transformations work just fine on large switches, and the
check on predecessor count is nonsensical.

llvm-svn: 166710

11 years agoWhen capturing 'this' in a lambda, make sure to update the set of
Douglas Gregor [Thu, 25 Oct 2012 18:39:16 +0000 (18:39 +0000)]
When capturing 'this' in a lambda, make sure to update the set of
array-index starting values for the 'this' capture. Fixes
<rdar://problem/12426831>.

llvm-svn: 166709

11 years agoAdd 'const' qualifier on member functions not changing its fields.
Michael Liao [Thu, 25 Oct 2012 18:35:04 +0000 (18:35 +0000)]
Add 'const' qualifier on member functions not changing its fields.

llvm-svn: 166708

11 years agoComment to XML conversion: avoid memory allocation while pretty-printing the
Dmitri Gribenko [Thu, 25 Oct 2012 18:28:26 +0000 (18:28 +0000)]
Comment to XML conversion: avoid memory allocation while pretty-printing the
declaration.

llvm-svn: 166707

11 years agoMinor cleanups.
Nadav Rotem [Thu, 25 Oct 2012 18:17:48 +0000 (18:17 +0000)]
Minor cleanups.

llvm-svn: 166706

11 years agoCommentDumper: reorder members and add a comment.
Dmitri Gribenko [Thu, 25 Oct 2012 18:16:02 +0000 (18:16 +0000)]
CommentDumper: reorder members and add a comment.

llvm-svn: 166705

11 years agoAdd text to the help to explain how to set user defined variables.
Jim Ingham [Thu, 25 Oct 2012 18:11:24 +0000 (18:11 +0000)]
Add text to the help to explain how to set user defined variables.

llvm-svn: 166704

11 years agoProvide comment describing what buildBlockDescriptor does.
Fariborz Jahanian [Thu, 25 Oct 2012 18:06:53 +0000 (18:06 +0000)]
Provide comment describing what buildBlockDescriptor does.

llvm-svn: 166703

11 years agoUpdate the release notes to note the change from TargetData to DataLayout.
Micah Villmow [Thu, 25 Oct 2012 18:06:47 +0000 (18:06 +0000)]
Update the release notes to note the change from TargetData to DataLayout.

llvm-svn: 166702

11 years agoAllow operating system plug-ins to specify the address for registers so we don't...
Greg Clayton [Thu, 25 Oct 2012 17:56:31 +0000 (17:56 +0000)]
Allow operating system plug-ins to specify the address for registers so we don't have to create data up front.

llvm-svn: 166701

11 years agoThis patch changes the following:
Sid Manning [Thu, 25 Oct 2012 17:53:04 +0000 (17:53 +0000)]
This patch changes the following:
  * Use conventional naming for KindHandlers.
  * Add X86 relocation routines.
  * Use std::function instead of function pointers in _fixupHandler map.
  * Change _fixupHandler map from std::map to llvm::DenseMap.
  * Add simple testcase for x86 relocations.

llvm-svn: 166700

11 years agoAdd test for ATOM ISA SSSE3
Michael Liao [Thu, 25 Oct 2012 17:50:05 +0000 (17:50 +0000)]
Add test for ATOM ISA SSSE3

- Remove SSE4.1 feature in other ATOM-based test cases

llvm-svn: 166699

11 years ago[ms-inline asm] Add error handling to the ParseIntelDotOperator() function.
Chad Rosier [Thu, 25 Oct 2012 17:37:43 +0000 (17:37 +0000)]
[ms-inline asm] Add error handling to the ParseIntelDotOperator() function.

llvm-svn: 166698

11 years agoAdd section on creating convenience variables.
Jim Ingham [Thu, 25 Oct 2012 17:35:53 +0000 (17:35 +0000)]
Add section on creating convenience variables.

llvm-svn: 166697

11 years agoRemove unused member & unnecessary semicolon.
David Blaikie [Thu, 25 Oct 2012 17:04:55 +0000 (17:04 +0000)]
Remove unused member & unnecessary semicolon.

llvm-svn: 166694

11 years agoChanged the V1 and V2 runtimes to be able to detect when the ISA hash table has chang...
Greg Clayton [Thu, 25 Oct 2012 16:54:22 +0000 (16:54 +0000)]
Changed the V1 and V2 runtimes to be able to detect when the ISA hash table has changed, and auto update as needed.

llvm-svn: 166693

11 years agoDon't throw exceptions in clang-tblgen by switching to PrintFatalError.
Joerg Sonnenberger [Thu, 25 Oct 2012 16:37:08 +0000 (16:37 +0000)]
Don't throw exceptions in clang-tblgen by switching to PrintFatalError.
Add locations in a number of places, where they are available for free.

llvm-svn: 166691

11 years agoIn preparation for removing exception handling in tablegen, add
Joerg Sonnenberger [Thu, 25 Oct 2012 16:35:18 +0000 (16:35 +0000)]
In preparation for removing exception handling in tablegen, add
PrintFatalError, which combines PrintError with exit(1).

llvm-svn: 166690

11 years agoDependenceAnalysis: Push #includes down into the implementation.
Benjamin Kramer [Thu, 25 Oct 2012 16:15:22 +0000 (16:15 +0000)]
DependenceAnalysis: Push #includes down into the implementation.

llvm-svn: 166688

11 years agollvm/utils/TableGen/CMakeLists.txt: Update corresponding to r166685.
NAKAMURA Takumi [Thu, 25 Oct 2012 15:57:56 +0000 (15:57 +0000)]
llvm/utils/TableGen/CMakeLists.txt: Update corresponding to r166685.

llvm-svn: 166686

11 years agoadd TableGen support to create relationship maps between instructions
Sebastian Pop [Thu, 25 Oct 2012 15:54:06 +0000 (15:54 +0000)]
add TableGen support to create relationship maps between instructions

Relationship maps are represented as InstrMapping records which are parsed by
TableGen and the information is used to construct mapping tables to represent
appropriate relations between instructions. These tables are emitted into
XXXGenInstrInfo.inc file along with the functions to query them.

Patch by Jyotsna Verma <jverma@codeaurora.org>.

llvm-svn: 166685

11 years agoCleanup some clang code to use new type functions instead of using cast<>.
Micah Villmow [Thu, 25 Oct 2012 15:39:14 +0000 (15:39 +0000)]
Cleanup some clang code to use new type functions instead of using cast<>.

llvm-svn: 166684

11 years agoclang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due...
NAKAMURA Takumi [Thu, 25 Oct 2012 14:43:34 +0000 (14:43 +0000)]
clang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due to failing on i686-*-*.

llvm-svn: 166683

11 years agoThis patch fixes the MC object emission of 'nop' for external function calls
Adhemerval Zanella [Thu, 25 Oct 2012 14:29:13 +0000 (14:29 +0000)]
This patch fixes the MC object emission of 'nop' for external function calls
and also fixes the R_PPC64_TOC16 and R_PPC64_TOC16_DS relocation offset.
The 'nop' is needed so a restore TOC instruction (ld r2,40(r1)) can be placed
by the linker to correct restore the TOC of previous function.

Current code has two issues: it defines in PPCInstr64Bit.td file a LDinto_toc
and LDtoc_restore as a DSForm_1 with DS_RA=0 where it should be
DS=2 (the 8 bytes displacement of the TOC saving). It also wrongly emits a
MC intruction using an uint32_t value while the PPC::BL8_NOP_ELF
and PPC::BLA8_NOP_ELF are both uint64_t (because of the following 'nop').

This patch corrects the remaining ExecutionEngine using MCJIT:

ExecutionEngine/2002-12-16-ArgTest.ll
ExecutionEngine/2003-05-07-ArgumentTest.ll
ExecutionEngine/2005-12-02-TailCallBug.ll
ExecutionEngine/hello.ll
ExecutionEngine/hello2.ll
ExecutionEngine/test-call.ll

llvm-svn: 166682

11 years agoCorrect test inovocations to use %clang_cc1 rather than direct invocation (so that...
David Tweed [Thu, 25 Oct 2012 13:56:30 +0000 (13:56 +0000)]
Correct test inovocations to use %clang_cc1 rather than direct invocation (so that it can have additional options set when trying to debug issues causing regressions).

llvm-svn: 166681

11 years agoThis patch addresses a PPC64 ELF issue with passing parameters consisting of
Bill Schmidt [Thu, 25 Oct 2012 13:38:09 +0000 (13:38 +0000)]
This patch addresses a PPC64 ELF issue with passing parameters consisting of
structs having size 3, 5, 6, or 7.  Such a struct must be passed and received
as right-justified within its register or memory slot.  The problem is only
present for structs that are passed in registers.

Previously, as part of a patch handling all structs of size less than 8, I
added logic to rotate the incoming register so that the struct was left-
justified prior to storing the whole register.  This was incorrect because
the address of the parameter had already been adjusted earlier to point to
the right-adjusted value in the storage slot.  Essentially I had accidentally
accounted for the right-adjustment twice.

In this patch, I removed the incorrect logic and reorganized the code to make
the flow clearer.

The removal of the rotates changes the expected code generation, so test case
structsinregs.ll has been modified to reflect this.  I also added a new test
case, jaggedstructs.ll, to demonstrate that structs of these sizes can now
be properly received and passed.

I've built and tested the code on powerpc64-unknown-linux-gnu with no new
regressions.  I also ran the GCC compatibility test suite and verified that
earlier problems with these structs are now resolved, with no new regressions.

llvm-svn: 166680

11 years agoModify the targets to set appropriate calling convention defaults and C variables...
David Tweed [Thu, 25 Oct 2012 13:33:01 +0000 (13:33 +0000)]
Modify the targets to set appropriate calling convention defaults and C variables when using a gnueabihf or aapcs-vfp target.

Tested by me and Wei-Ren Chen.

llvm-svn: 166679

11 years agoPowerPC: Initial support for PowerPC64 MCJIT
Adhemerval Zanella [Thu, 25 Oct 2012 13:13:48 +0000 (13:13 +0000)]
PowerPC: Initial support for PowerPC64 MCJIT

This patch adds initial support for MCJIT for PPC64-elf-abi. The TOC
relocation and ODP handling is implemented.

It fixes the following ExecutionEngine testcases:

ExecutionEngine/2003-01-04-ArgumentBug.ll
ExecutionEngine/2003-01-04-LoopTest.ll
ExecutionEngine/2003-01-04-PhiTest.ll
ExecutionEngine/2003-01-09-SARTest.ll
ExecutionEngine/2003-01-10-FUCOM.ll
ExecutionEngine/2003-01-15-AlignmentTest.ll
ExecutionEngine/2003-05-11-PHIRegAllocBug.ll
ExecutionEngine/2003-06-04-bzip2-bug.ll
ExecutionEngine/2003-06-05-PHIBug.ll
ExecutionEngine/2003-08-15-AllocaAssertion.ll
ExecutionEngine/2003-08-21-EnvironmentTest.ll
ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
ExecutionEngine/simplesttest.ll
ExecutionEngine/simpletest.ll
ExecutionEngine/stubs.ll
ExecutionEngine/test-arith.ll
ExecutionEngine/test-branch.ll
ExecutionEngine/test-call-no-external-funcs.ll
ExecutionEngine/test-cast.ll
ExecutionEngine/test-common-symbols.ll
ExecutionEngine/test-constantexpr.ll
ExecutionEngine/test-fp-no-external-funcs.ll
ExecutionEngine/test-fp.ll
ExecutionEngine/test-global-init-nonzero.ll
ExecutionEngine/test-global.ll
ExecutionEngine/test-loadstore.ll
ExecutionEngine/test-local.ll
ExecutionEngine/test-logical.ll
ExecutionEngine/test-loop.ll
ExecutionEngine/test-phi.ll
ExecutionEngine/test-ret.ll
ExecutionEngine/test-return.ll
ExecutionEngine/test-setcond-fp.ll
ExecutionEngine/test-setcond-int.ll
ExecutionEngine/test-shift.ll

llvm-svn: 166678

11 years agoInitial TOC support for PowerPC64 object creation
Adhemerval Zanella [Thu, 25 Oct 2012 12:27:42 +0000 (12:27 +0000)]
Initial TOC support for PowerPC64 object creation

This patch adds initial PPC64 TOC MC object creation using the small mcmodel
(a single 64K TOC) adding the some TOC relocations (R_PPC64_TOC,
R_PPC64_TOC16, and R_PPC64_TOC16DS).

The addition of 'undefinedExplicitRelSym' hook on 'MCELFObjectTargetWriter'
is meant to avoid the creation of an unreferenced ".TOC." symbol (used in
the .odp creation) as well to set the R_PPC64_TOC relocation target as the
temporary ".TOC." symbol. On PPC64 ABI, the R_PPC64_TOC relocation should
not point to any symbol.

llvm-svn: 166677

11 years agoInitialize debug info for special cases of functions that lack declarations and are...
Alexey Samsonov [Thu, 25 Oct 2012 10:18:50 +0000 (10:18 +0000)]
Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.

llvm-svn: 166676

11 years agounittests/ToolingTest.cpp: Suppress newFrontendActionFactory.InjectsEndOfSourceFileCa...
NAKAMURA Takumi [Thu, 25 Oct 2012 09:38:41 +0000 (09:38 +0000)]
unittests/ToolingTest.cpp: Suppress newFrontendActionFactory.InjectsEndOfSourceFileCallback on Win32 for now. Investigating.

llvm-svn: 166674

11 years agoAdds the possibility to inject a callback that's called after each translation unit...
Manuel Klimek [Thu, 25 Oct 2012 08:49:11 +0000 (08:49 +0000)]
Adds the possibility to inject a callback that's called after each translation unit is processed.

This is important when one wants to deduplicate results during one run over a translation unit by pointer identity of AST nodes.

llvm-svn: 166671

11 years agoAnother speculative commit to try to fix Polly's build. This is more delta than
Chandler Carruth [Thu, 25 Oct 2012 08:43:18 +0000 (08:43 +0000)]
Another speculative commit to try to fix Polly's build. This is more delta than
I like to make w/o being able to build, but I don't have the dependencies to
build and test polly. I'll revert if the build bots don't like it.

llvm-svn: 166670

11 years agoThe test avx-intel-ocl.ll failed. I can't reproduce on any of my machines. I added...
Elena Demikhovsky [Thu, 25 Oct 2012 08:38:42 +0000 (08:38 +0000)]
The test avx-intel-ocl.ll failed. I can't reproduce on any of my machines. I added -mcpu flag, may be it will fix the problem

llvm-svn: 166669

11 years agoAnother fix for a build-bot reported API mismatch.
Chandler Carruth [Thu, 25 Oct 2012 07:42:03 +0000 (07:42 +0000)]
Another fix for a build-bot reported API mismatch.

llvm-svn: 166668

11 years agoTry to revive the Polly builders after this LLVM API change.
Chandler Carruth [Thu, 25 Oct 2012 07:25:56 +0000 (07:25 +0000)]
Try to revive the Polly builders after this LLVM API change.

llvm-svn: 166666

11 years agoAtom has SIMD instruction set extension up to SSSE3
Michael Liao [Thu, 25 Oct 2012 07:06:48 +0000 (07:06 +0000)]
Atom has SIMD instruction set extension up to SSSE3

llvm-svn: 166665

11 years agoClean up where SlotSize should be used instead of pointer size.
Michael Liao [Thu, 25 Oct 2012 06:29:14 +0000 (06:29 +0000)]
Clean up where SlotSize should be used instead of pointer size.

llvm-svn: 166664

11 years agoTeach SROA how to split whole-alloca integer loads and stores into
Chandler Carruth [Thu, 25 Oct 2012 04:37:07 +0000 (04:37 +0000)]
Teach SROA how to split whole-alloca integer loads and stores into
smaller integer loads and stores.

The high-level motivation is that the frontend sometimes generates
a single whole-alloca integer load or store during ABI lowering of
splittable allocas. We need to be able to break this apart in order to
see the underlying elements and properly promote them to SSA values. The
hope is that this fixes some performance regressions on x86-32 with the
new SROA pass.

Unfortunately, this causes quite a bit of churn in the test cases, and
bloats some IR that comes out. When we see an alloca that consists soley
of bits and bytes being extracted and re-inserted, we now do some
splitting first, before building widened integer "bucket of bits"
representations. These are always well folded by instcombine however, so
this shouldn't actually result in missed opportunities.

If this splitting of all-integer allocas does cause problems (perhaps
due to smaller SSA values going into the RA), we could potentially go to
some extreme measures to only do this integer splitting trick when there
are non-integer component accesses of an alloca, but discovering this is
quite expensive: it adds yet another complete walk of the recursive use
tree of the alloca.

Either way, I will be watching build bots and LNT bots to see what
fallout there is here. If anyone gets x86-32 numbers before & after this
change, I would be very interested.

llvm-svn: 166662

11 years ago-fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.
Richard Smith [Thu, 25 Oct 2012 02:14:12 +0000 (02:14 +0000)]
-fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.

llvm-svn: 166661

11 years ago-fcatch-undefined-behavior checking for appropriate vptr value: library side.
Richard Smith [Thu, 25 Oct 2012 02:07:02 +0000 (02:07 +0000)]
-fcatch-undefined-behavior checking for appropriate vptr value: library side.

llvm-svn: 166660

11 years agoTake into account that there may be a BOM at the beginning of the file,
Argyrios Kyrtzidis [Thu, 25 Oct 2012 01:51:45 +0000 (01:51 +0000)]
Take into account that there may be a BOM at the beginning of the file,
when computing the size of the precompiled preamble.

llvm-svn: 166659

11 years agoUpdated LLDB's use of the DiagnosticsEngine to
Sean Callanan [Thu, 25 Oct 2012 01:00:25 +0000 (01:00 +0000)]
Updated LLDB's use of the DiagnosticsEngine to
reflect a change to the initializer.

llvm-svn: 166657

11 years agoUpdate warning-flag test
Douglas Gregor [Thu, 25 Oct 2012 00:34:38 +0000 (00:34 +0000)]
Update warning-flag test

llvm-svn: 166656

11 years agoRevert r166647 to rethink the patch...
Bill Wendling [Thu, 25 Oct 2012 00:32:44 +0000 (00:32 +0000)]
Revert r166647 to rethink the patch...

llvm-svn: 166655

11 years agoRemove the old predefines-buffer diffing code completely. It's been
Douglas Gregor [Thu, 25 Oct 2012 00:30:23 +0000 (00:30 +0000)]
Remove the old predefines-buffer diffing code completely. It's been
replaced by the more efficient, cleaner preprocessor-option version
that occurs earlier in PCH validation.

llvm-svn: 166654

11 years agoFix computation of predefines buffer from the preprocessor-option
Douglas Gregor [Thu, 25 Oct 2012 00:25:27 +0000 (00:25 +0000)]
Fix computation of predefines buffer from the preprocessor-option
checking, and disable the old predefines-buffer-diff'ing code path.

llvm-svn: 166653

11 years agoIdentify a kdp session that is connecting to an EFI monitor,
Jason Molenda [Thu, 25 Oct 2012 00:25:13 +0000 (00:25 +0000)]
Identify a kdp session that is connecting to an EFI monitor,
use a DynamicLoaderStatic dynamic loader for the session
instead of a kernel or user dynamic loader.

llvm-svn: 166652

11 years agoWhen we're devirtualizing a method call, make sure the method has the correct IR...
Eli Friedman [Thu, 25 Oct 2012 00:12:49 +0000 (00:12 +0000)]
When we're devirtualizing a method call, make sure the method has the correct IR type.

Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev.

llvm-svn: 166651

11 years agoASTUnit doesn't actually care about the predefines; don't record them.
Douglas Gregor [Thu, 25 Oct 2012 00:09:28 +0000 (00:09 +0000)]
ASTUnit doesn't actually care about the predefines; don't record them.

llvm-svn: 166650

11 years agoAdd support for additional reduction variables: AND, OR, XOR.
Nadav Rotem [Thu, 25 Oct 2012 00:08:41 +0000 (00:08 +0000)]
Add support for additional reduction variables: AND, OR, XOR.

Patch by Paul Redmond <paul.redmond@intel.com>.

llvm-svn: 166649

11 years agoThe the preprocessor option validator to compute suggested
Douglas Gregor [Thu, 25 Oct 2012 00:07:54 +0000 (00:07 +0000)]
The the preprocessor option validator to compute suggested
predefines. We're not quite ready to cut over to these suggested
predefines yet, however.

llvm-svn: 166648

11 years agoAdd some support for diagnosing possibly mismatched constraint, type size and
Bill Wendling [Thu, 25 Oct 2012 00:05:55 +0000 (00:05 +0000)]
Add some support for diagnosing possibly mismatched constraint, type size and
modifiers. (From an idea by Eric...)
<rdar://problem/12284092>

llvm-svn: 166647

11 years agoStop running the machine code verifier unconditionally.
Jakob Stoklund Olesen [Thu, 25 Oct 2012 00:05:39 +0000 (00:05 +0000)]
Stop running the machine code verifier unconditionally.

llvm-svn: 166646

11 years ago'constexpr' and 'friend' are both declaration specifiers. Teach the parser this,...
Richard Smith [Thu, 25 Oct 2012 00:00:53 +0000 (00:00 +0000)]
'constexpr' and 'friend' are both declaration specifiers. Teach the parser this, for better error recovery.

llvm-svn: 166645

11 years agoPR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclarator
Richard Smith [Wed, 24 Oct 2012 23:51:56 +0000 (23:51 +0000)]
PR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclarator
rebuilds a function type, and that function type has parens around its name.

llvm-svn: 166644

11 years agorevert accidental change
Nadav Rotem [Wed, 24 Oct 2012 23:48:57 +0000 (23:48 +0000)]
revert accidental change

llvm-svn: 166643

11 years agoImplement a basic cost model for vector and scalar instructions.
Nadav Rotem [Wed, 24 Oct 2012 23:47:38 +0000 (23:47 +0000)]
Implement a basic cost model for vector and scalar instructions.

llvm-svn: 166642

11 years agoTeach the PCH validator to check the preprocessor options, especially
Douglas Gregor [Wed, 24 Oct 2012 23:41:50 +0000 (23:41 +0000)]
Teach the PCH validator to check the preprocessor options, especially
the macros that are #define'd or #undef'd on the command line. This
checking happens much earlier than the current macro-definition
checking and is far cleaner, because it does a direct comparison
rather than a diff of the predefines buffers. Moreover, it allows us
to use the result of this check to skip over PCH files within a
directory that have non-matching -D's or -U's on the command
line. Finally, it improves the diagnostics a bit for mismatches,
fixing <rdar://problem/8612222>.

The old predefines-buffer diff'ing will go away in a subsequent commit.

llvm-svn: 166641

11 years agoTell llvm-mc we're using intel syntax, so we don't have to use directives.
Chad Rosier [Wed, 24 Oct 2012 23:34:38 +0000 (23:34 +0000)]
Tell llvm-mc we're using intel syntax, so we don't have to use directives.

llvm-svn: 166640