oota-llvm.git
12 years agoDon't explicitly require RTTI and EH.
Joerg Sonnenberger [Fri, 26 Oct 2012 12:15:29 +0000 (12:15 +0000)]
Don't explicitly require RTTI and EH.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166772 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPowerPC: Fix for rldcl/rldicl/rldicr MC emission
Adhemerval Zanella [Fri, 26 Oct 2012 12:09:58 +0000 (12:09 +0000)]
PowerPC: Fix for rldcl/rldicl/rldicr MC emission

This patch fixes the rldcl/rldicl/rldicr instruction emission. The issue is
the MDForm_1 instruction defines the PowerISA MB field from 'rldicl'
with the name MBE, but RLDCL/RLDICL/RLDICR definition uses as 'MB'.

It end up by generatint the 'rldicl' enconding at
'lib/Target/PowerPC/PPCGenMCCodeEmitter.inc' to use the fourth argument as the
third. The patch changes it by adjusting to use the fourth argument as
intended.

Fixes PR14180.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166770 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMinor enhancement to build process notes for ARM platforms.
David Tweed [Fri, 26 Oct 2012 12:09:47 +0000 (12:09 +0000)]
Minor enhancement to build process notes for ARM platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166769 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdjust llvm-ar and llvm-ranlib to not depend on exception handling.
Joerg Sonnenberger [Fri, 26 Oct 2012 10:49:15 +0000 (10:49 +0000)]
Adjust llvm-ar and llvm-ranlib to not depend on exception handling.
Always use an exit code of 1, but print the help message if useful.
Remove the exception handling tag in llvm-as, llvm-dis and
llvm-bcanalyzer, where it isn't used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166767 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove GC roots that reference dead objects.
Nicolas Geoffray [Fri, 26 Oct 2012 09:15:55 +0000 (09:15 +0000)]
Remove GC roots that reference dead objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166763 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix CPP backend for method attributes by creating a block where a new AttrBuilder...
Nicolas Geoffray [Fri, 26 Oct 2012 09:14:38 +0000 (09:14 +0000)]
Fix CPP backend for method attributes by creating a block where a new AttrBuilder is defined for each attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166762 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAlphabetize the enum list.
Bill Wendling [Fri, 26 Oct 2012 07:08:58 +0000 (07:08 +0000)]
Alphabetize the enum list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166760 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement carry for subtract/add for mips16
Reed Kotler [Fri, 26 Oct 2012 04:46:26 +0000 (04:46 +0000)]
Implement carry for subtract/add for mips16

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166755 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHoist out some work done inside a loop doing a linear scan over all
Nick Lewycky [Fri, 26 Oct 2012 04:43:47 +0000 (04:43 +0000)]
Hoist out some work done inside a loop doing a linear scan over all
instructions in a block. GetUnderlyingObject is more expensive than it looks as
it can, for instance, call SimplifyInstruction.

This might have some behavioural changes in odd corner cases, but only because
of some strange artefacts of the original implementation. If you were relying
on those, we can fix that by replacing this with a smarter algorithm. Change
passes the existing tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166754 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166752 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166751 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166750 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166749 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166748 91177308-0d34-0410-b5e6-96231b3b80d8

12 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166747 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166745 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166742 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166741 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166739 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166738 91177308-0d34-0410-b5e6-96231b3b80d8

12 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]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166729 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166726 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166724 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166722 91177308-0d34-0410-b5e6-96231b3b80d8

12 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166721 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166720 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166719 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166718 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166716 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166715 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166714 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166712 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166710 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166708 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166706 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166702 91177308-0d34-0410-b5e6-96231b3b80d8

12 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166699 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166698 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166694 91177308-0d34-0410-b5e6-96231b3b80d8

12 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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166690 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166688 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166686 91177308-0d34-0410-b5e6-96231b3b80d8

12 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>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166685 91177308-0d34-0410-b5e6-96231b3b80d8

12 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166682 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166680 91177308-0d34-0410-b5e6-96231b3b80d8

12 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166678 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166677 91177308-0d34-0410-b5e6-96231b3b80d8

12 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166669 91177308-0d34-0410-b5e6-96231b3b80d8

12 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166665 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166664 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166662 91177308-0d34-0410-b5e6-96231b3b80d8

12 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>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166649 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166646 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166643 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166642 91177308-0d34-0410-b5e6-96231b3b80d8

12 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166640 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a bit of documentation on the annotated disassembly output.
Kevin Enderby [Wed, 24 Oct 2012 23:30:22 +0000 (23:30 +0000)]
Add a bit of documentation on the annotated disassembly output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166639 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Add back-end test case for r166632. Make sure we emit the
Chad Rosier [Wed, 24 Oct 2012 23:10:28 +0000 (23:10 +0000)]
[ms-inline asm] Add back-end test case for r166632.  Make sure we emit the
correct .s output as well as get the correct encoding by the integrated
assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166638 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't try to install c-index-test with BUILD_CLANG_ONLY. rdar://12492703
Bob Wilson [Wed, 24 Oct 2012 22:56:32 +0000 (22:56 +0000)]
Don't try to install c-index-test with BUILD_CLANG_ONLY. rdar://12492703

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166637 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a compiler warning with an unused variable.
Micah Villmow [Wed, 24 Oct 2012 22:32:26 +0000 (22:32 +0000)]
Fix a compiler warning with an unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166634 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Add support for parsing the '.' operator. Given,
Chad Rosier [Wed, 24 Oct 2012 22:21:50 +0000 (22:21 +0000)]
[ms-inline asm] Add support for parsing the '.' operator.  Given,

[register].field

The operator returns the value at the location pointed to by register plus the
offset of field within its structure or union.  This patch only handles
immediate fields (i.e., [eax].4).  The original displacement has to be a
MCConstantExpr as well.
Part of rdar://12470415 and rdar://12470514

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166632 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTidy up. No functional change intended.
Chad Rosier [Wed, 24 Oct 2012 22:13:37 +0000 (22:13 +0000)]
Tidy up.  No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166630 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't use stack unwinding to provide the location information for
Joerg Sonnenberger [Wed, 24 Oct 2012 22:03:59 +0000 (22:03 +0000)]
Don't use stack unwinding to provide the location information for
SetTheory, but pass down the location explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166629 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate GVN to support vectors of pointers.
Hal Finkel [Wed, 24 Oct 2012 21:22:30 +0000 (21:22 +0000)]
Update GVN to support vectors of pointers.

GVN will now generate ptrtoint instructions for vectors of pointers.
Fixes PR14166.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166624 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake LegalizeKind public so that we can use it outside of TargetLowering.
Nadav Rotem [Wed, 24 Oct 2012 20:59:17 +0000 (20:59 +0000)]
Make LegalizeKind public so that we can use it outside of TargetLowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166623 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agowhitespace
Nadav Rotem [Wed, 24 Oct 2012 20:58:40 +0000 (20:58 +0000)]
whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166622 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocument the -force-vector-width flag.
Nadav Rotem [Wed, 24 Oct 2012 20:47:55 +0000 (20:47 +0000)]
Document the -force-vector-width flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166621 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLoopVectorizer: Add a basic cost model which uses the VTTI interface.
Nadav Rotem [Wed, 24 Oct 2012 20:36:32 +0000 (20:36 +0000)]
LoopVectorizer: Add a basic cost model which uses the VTTI interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166620 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a miscompilation caused by a typo. When turning a adde with negative value
Evan Cheng [Wed, 24 Oct 2012 19:53:01 +0000 (19:53 +0000)]
Fix a miscompilation caused by a typo. When turning a adde with negative value
into a sbc with a positive number, the immediate should be complemented, not
negated. Also added a missing pattern for ARM codegen.

rdar://12559385

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166613 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agogetSmallConstantTripMultiple should never return zero.
Hal Finkel [Wed, 24 Oct 2012 19:46:44 +0000 (19:46 +0000)]
getSmallConstantTripMultiple should never return zero.

When the trip count is -1, getSmallConstantTripMultiple could return zero,
and this would cause runtime loop unrolling to assert. Instead of returning
zero, one is now returned (consistent with the existing overflow cases).
Fixes PR14167.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166612 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake ~Operator() protected so subclasses can inherit it and not have
Kaelyn Uhrain [Wed, 24 Oct 2012 19:17:42 +0000 (19:17 +0000)]
Make ~Operator() protected so subclasses can inherit it and not have
a bunch of errors for all the Operator subclasses such as:

include/llvm/Operator.h:76:7: error: deleted function 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()'
include/llvm/Operator.h:43:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()'
include/llvm/Operator.h:76:7: error: 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()' is implicitly deleted because the default definition would be ill-formed:
include/llvm/Operator.h:43:3: error: 'virtual llvm::Operator::~Operator()' is private
include/llvm/Operator.h:76:7: error: within this context

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166611 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImprove DenseMap checks for power of 2 growth. Thanks for the tip Jakob
Pete Cooper [Wed, 24 Oct 2012 18:50:44 +0000 (18:50 +0000)]
Improve DenseMap checks for power of 2 growth.  Thanks for the tip Jakob

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166609 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd some cleanup to the DataLayout changes requested by Chandler.
Micah Villmow [Wed, 24 Oct 2012 18:36:13 +0000 (18:36 +0000)]
Add some cleanup to the DataLayout changes requested by Chandler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166607 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOpt does not need to initialize the Asm printer/parser
Nadav Rotem [Wed, 24 Oct 2012 17:55:53 +0000 (17:55 +0000)]
Opt does not need to initialize the Asm printer/parser

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166602 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDelete the empty directory that was accidently added in 166578.
Micah Villmow [Wed, 24 Oct 2012 17:27:47 +0000 (17:27 +0000)]
Delete the empty directory that was accidently added in 166578.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166597 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBack out r166591, not sure why this made it through since I cancelled the command...
Micah Villmow [Wed, 24 Oct 2012 17:25:11 +0000 (17:25 +0000)]
Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166596 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOpt needs to initialize the different targets.
Nadav Rotem [Wed, 24 Oct 2012 17:23:50 +0000 (17:23 +0000)]
Opt needs to initialize the different targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166595 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement a basic VectorTargetTransformInfo interface to be used by the loop and...
Nadav Rotem [Wed, 24 Oct 2012 17:22:41 +0000 (17:22 +0000)]
Implement a basic VectorTargetTransformInfo interface to be used by the loop and bb vectorizers for modeling the cost of instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166593 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Create a register operand, rather than a memory operand when we
Chad Rosier [Wed, 24 Oct 2012 17:22:29 +0000 (17:22 +0000)]
[ms-inline asm] Create a register operand, rather than a memory operand when we
see the offsetof operator.  Previously, we were matching something like MOVrm
in the front-end and later matching MOVrr in the back-end.  This change makes
things more consistent.  It also fixes cases where we can't match against a
memory operand as the source (test cases coming).
Part of rdar://12470317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166592 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDelete a directory that wasn't supposed to be checked in yet.
Micah Villmow [Wed, 24 Oct 2012 17:20:04 +0000 (17:20 +0000)]
Delete a directory that wasn't supposed to be checked in yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166591 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd in support for getIntPtrType to get the pointer type based on the address space.
Micah Villmow [Wed, 24 Oct 2012 15:52:52 +0000 (15:52 +0000)]
Add in support for getIntPtrType to get the pointer type based on the address space.
This checkin also adds in some tests that utilize these paths and updates some of the
clients.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166578 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSpecial calling conventions for Intel OpenCL built-in library.
Elena Demikhovsky [Wed, 24 Oct 2012 14:46:16 +0000 (14:46 +0000)]
Special calling conventions for Intel OpenCL built-in library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166566 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[CMake] Introduce LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR.
NAKAMURA Takumi [Wed, 24 Oct 2012 12:26:08 +0000 (12:26 +0000)]
[CMake] Introduce LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166552 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a testcase that would have noticed the typo fixed in commit 166475.
Duncan Sands [Wed, 24 Oct 2012 07:17:20 +0000 (07:17 +0000)]
Add a testcase that would have noticed the typo fixed in commit 166475.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166547 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach DAG combine to fold (buildvec (Xint2fp x)) to (Xint2fp (buildvec x))
Michael Liao [Wed, 24 Oct 2012 04:14:18 +0000 (04:14 +0000)]
Teach DAG combine to fold (buildvec (Xint2fp x)) to (Xint2fp (buildvec x))

- If more than 1 elemennts are defined and target supports the vectorized
  conversion, use the vectorized one instead to reduce the strength on
  conversion operation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166546 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd custom conversion from v2u32 to v2f32 in 32-bit mode
Michael Liao [Wed, 24 Oct 2012 04:09:32 +0000 (04:09 +0000)]
Add custom conversion from v2u32 to v2f32 in 32-bit mode

- As there's no 64-bit GPRs in 32-bit mode, a custom conversion from v2u32 to
  v2f32 is added to improve the efficiency of the code generated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166545 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[mips] Make sure sret argument is returned in register V0.
Akira Hatanaka [Wed, 24 Oct 2012 02:10:54 +0000 (02:10 +0000)]
[mips] Make sure sret argument is returned in register V0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166539 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange x86_fastcallcc to require inreg markers. This allows it to known
Rafael Espindola [Wed, 24 Oct 2012 01:58:48 +0000 (01:58 +0000)]
Change x86_fastcallcc to require inreg markers. This allows it to known
the difference from "int x" (which should go in registers and
"struct y {int x;}" (which should not).

Clang will be updated in the next patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166536 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoKeep coding standard. Don't evaluate getNumOperands() every time.
Jakub Staszak [Wed, 24 Oct 2012 00:38:25 +0000 (00:38 +0000)]
Keep coding standard. Don't evaluate getNumOperands() every time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166531 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix ODR violations: a virtual function must be defined, even if it's never
Richard Smith [Wed, 24 Oct 2012 00:30:41 +0000 (00:30 +0000)]
Fix ODR violations: a virtual function must be defined, even if it's never
called. Provide an (asserting) definition of Operator's private destructor.
Remove destructors from all classes derived from Operator. We don't need them
for safety, because their implicit definitions would be ill-formed (they'd call
Operator's private destructor), and we don't need them to avoid emitting
vtables, because we don't do anything with Operator subclasses which would
trigger vtable instantiation.

The Operator hierarchy is still a complete disaster with regard to undefined
behavior, but this at least allows LLVM to link when using Clang's
-fcatch-undefined-behavior with a new vptr-based type checking mechanism.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166530 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Offset operator - the size should be based on the size of a
Chad Rosier [Tue, 23 Oct 2012 23:42:06 +0000 (23:42 +0000)]
[ms-inline asm] Offset operator - the size should be based on the size of a
pointer, not the size of the variable.
Part of rdar://12470317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166526 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Clean up comment.
Chad Rosier [Tue, 23 Oct 2012 23:34:28 +0000 (23:34 +0000)]
[ms-inline asm] Clean up comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166525 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] When parsing inline assembly we set the base register to a
Chad Rosier [Tue, 23 Oct 2012 23:31:33 +0000 (23:31 +0000)]
[ms-inline asm] When parsing inline assembly we set the base register to a
non-zero value as we don't know the actual value at this point.  This is
necessary to get the matching correct in some cases.  However, the actual value
set as the base register doesn't matter, since we're just matching not emitting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166523 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoClean up code and put transformation on (build_vec (ext x)) into a helper func
Michael Liao [Tue, 23 Oct 2012 23:06:52 +0000 (23:06 +0000)]
Clean up code and put transformation on (build_vec (ext x)) into a helper func

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166519 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[Support/StringSet] Fix memory leak when inserted key already exists.
Michael J. Spencer [Tue, 23 Oct 2012 22:55:54 +0000 (22:55 +0000)]
[Support/StringSet] Fix memory leak when inserted key already exists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166517 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake branch heavy code for generating marked up disassembly simpler
Kevin Enderby [Tue, 23 Oct 2012 22:52:52 +0000 (22:52 +0000)]
Make branch heavy code for generating marked up disassembly simpler
and easier to read by adding a couple helper functions.  Suggestion by
Chandler Carruth and seconded by Meador Inge!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166515 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix PR14161
Michael Liao [Tue, 23 Oct 2012 21:40:15 +0000 (21:40 +0000)]
Fix PR14161

- Check index being extracted to be constant 0 before simplfiying.
  Otherwise, retain the original sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166504 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCMake: Include private headers / tablegen files in generated Xcode projects.
Jordan Rose [Tue, 23 Oct 2012 21:36:55 +0000 (21:36 +0000)]
CMake: Include private headers / tablegen files in generated Xcode projects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166503 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake the indirect branch optimization deterministic. No functionality change.
Nadav Rotem [Tue, 23 Oct 2012 21:05:33 +0000 (21:05 +0000)]
Make the indirect branch optimization deterministic. No functionality change.

Patch by Daniel Reynaud.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166501 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSilence -Wsign-compare
Matt Beaumont-Gay [Tue, 23 Oct 2012 19:46:36 +0000 (19:46 +0000)]
Silence -Wsign-compare

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166494 91177308-0d34-0410-b5e6-96231b3b80d8