oota-llvm.git
11 years agoEric thought that Darwin was right to use -1 consistently rather than
Chandler Carruth [Sat, 5 Jan 2013 00:42:50 +0000 (00:42 +0000)]
Eric thought that Darwin was right to use -1 consistently rather than
leaving this undefined, and despite the sentence in the standard that
seems to require it, I'll cede the point and assume its a bug in the
wording. Other parts of POSIX regularly allow for things to be -1
instead of undefined, this should too. Makes things more consistent too.

This should have to real impact for folks though.

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

11 years agoFix a stray 'dnl' that my editor line-wrapped into this comment. Thanks
Chandler Carruth [Sat, 5 Jan 2013 00:34:40 +0000 (00:34 +0000)]
Fix a stray 'dnl' that my editor line-wrapped into this comment. Thanks
to filcab on IRC for spotting.

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

11 years agoMake this an integer so we have enumeral types in the conditional
Eric Christopher [Sat, 5 Jan 2013 00:32:04 +0000 (00:32 +0000)]
Make this an integer so we have enumeral types in the conditional
expression.

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

11 years agoFinally, fix the autoconf setup to allow for a missing clock_gettime;
Chandler Carruth [Sat, 5 Jan 2013 00:29:06 +0000 (00:29 +0000)]
Finally, fix the autoconf setup to allow for a missing clock_gettime;
the source code should now be set up to handle this.

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

11 years agoProvide a default constructor for TimeValue. This was used, but only in
Chandler Carruth [Sat, 5 Jan 2013 00:23:09 +0000 (00:23 +0000)]
Provide a default constructor for TimeValue. This was used, but only in
if-ed out code paths and on Windows. Hopefully restores the Windows
build. Thanks to Reid Kleckner for helping triage this.

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

11 years agoFix warnings from llvm-gcc as seen on darwin10 (10.6).
Alex Rosenberg [Sat, 5 Jan 2013 00:21:12 +0000 (00:21 +0000)]
Fix warnings from llvm-gcc as seen on darwin10 (10.6).

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

11 years agoTry to suppress the use of clock_gettime on Darwin which apparantly
Chandler Carruth [Sat, 5 Jan 2013 00:11:21 +0000 (00:11 +0000)]
Try to suppress the use of clock_gettime on Darwin which apparantly
defines _POSIX_CPUTIME but doesn't support the clock_* functions.

I don't test the value of _POSIX_CPUTIME because the spec merely says
that if it is defined, the CPU-specific timers are available, whereas it
says that _POSIX_TIMERS must be defined and defined to a value greater
than zero. However, this may not work, as the POSIX spec clearly states:

  "If the symbolic constant _POSIX_CPUTIME is defined, then the symbolic
  constant _POSIX_TIMERS shall also be defined by the implementation to
  have the value 200112L."

If this doesn't work, I'll add more hacks for Darwin.

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

11 years agoFix an obvious typo spotted by Reid Kleckner, and breaking windows builds.
Chandler Carruth [Fri, 4 Jan 2013 23:46:04 +0000 (23:46 +0000)]
Fix an obvious typo spotted by Reid Kleckner, and breaking windows builds.

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

11 years agoGet rid of the 'Bits' mask in the attribute builder.
Bill Wendling [Fri, 4 Jan 2013 23:27:34 +0000 (23:27 +0000)]
Get rid of the 'Bits' mask in the attribute builder.

The bit mask thing will be a thing of the past. It's not extensible enough. Get
rid of its use here. Opt instead for using a vector to hold the attributes.

Note: Some of this code will become obsolete once the rewrite is further along.

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

11 years agoAdd time getters to the process interface for requesting the elapsed
Chandler Carruth [Fri, 4 Jan 2013 23:19:55 +0000 (23:19 +0000)]
Add time getters to the process interface for requesting the elapsed
wall time, user time, and system time since a process started.

For walltime, we currently use TimeValue's interface and a global
initializer to compute a close approximation of total process runtime.

For user time, this adds support for an somewhat more precise timing
mechanism -- clock_gettime with the CLOCK_PROCESS_CPUTIME_ID clock
selected.

For system time, we have to do a full getrusage call to extract the
system time from the OS. This is expensive but unavoidable.

In passing, clean up the implementation of the old APIs and fix some
latent bugs in the Windows code. This might have manifested on Windows
ARM systems or other systems with strange 64-bit integer behavior.

The old API for this both user time and system time simultaneously from
a single getrusage call. While this results in fewer system calls, it
also results in a lower precision user time and if only user time is
desired, it introduces a higher overhead. It may be worthwhile to switch
some of the pass timers to not track system time and directly track user
and wall time. The old API also tracked walltime in a confusing way --
it just set it to the current walltime rather than providing any measure
of wall time since the process started the way buth user and system time
are tracked. The new API is more consistent here.

The plan is to eventually implement these methods for a *child* process
by using the wait3(2) system call to populate an rusage struct
representing the whole subprocess execution. That way, after waiting on
a child process its stats will become accurate and cheap to query.

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

11 years agotabs-to-spaces
Andrew Trick [Fri, 4 Jan 2013 23:11:35 +0000 (23:11 +0000)]
tabs-to-spaces

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

11 years agoMove 'break' to the right place to prevent fallthru. There is no test-case
Jakub Staszak [Fri, 4 Jan 2013 23:01:26 +0000 (23:01 +0000)]
Move 'break' to the right place to prevent fallthru. There is no test-case
because conditions in the next case prevented from doing anything nasty.

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

11 years agoSpecial case Recycler::clear(BumpPtrAllocator).
Jakob Stoklund Olesen [Fri, 4 Jan 2013 22:35:45 +0000 (22:35 +0000)]
Special case Recycler::clear(BumpPtrAllocator).

A BumpPtrAllocator has an empty Deallocate() method, but
Recycler::clear() would still call it for every single object ever
allocated, bringing all those objects into cache. As a bonus,
iplist::remove() will also write to the Prev/Next pointers on all the
objects, so all those cache lines have to be written back to RAM before
the pages are given back to the OS.

Stop wasting time and memory bandwith by using the new
clearAndLeakUnsafely() function to jettison all the recycled objects.

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

11 years agoAdd an iplist::clearAndLeakNodesUnsafely() function.
Jakob Stoklund Olesen [Fri, 4 Jan 2013 22:35:42 +0000 (22:35 +0000)]
Add an iplist::clearAndLeakNodesUnsafely() function.

The iplist::clear() function can be quite expensive because it traverses
the entire list, calling deleteNode() and removeNodeFromList() on each
element. If node destruction and deallocation can be handled some other
way, clearAndLeakNodesUnsafely() can be used to jettison all nodes
without bringing them into cache.

The function name is meant to be ominous.

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

11 years agoMove an assertion so it doesn't dereference end().
Jakob Stoklund Olesen [Fri, 4 Jan 2013 22:17:31 +0000 (22:17 +0000)]
Move an assertion so it doesn't dereference end().

The R600 target has test cases that exercises this code.

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

11 years agoDo not vectorize loops with subtraction reductions
Paul Redmond [Fri, 4 Jan 2013 22:10:16 +0000 (22:10 +0000)]
Do not vectorize loops with subtraction reductions

Since subtraction does not commute the loop vectorizer incorrectly vectorizes
reductions such as x = A[i] - x.

Disabling for now.

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

11 years agoAdd a name for the anonymous type we're creating for subrange
Eric Christopher [Fri, 4 Jan 2013 21:51:53 +0000 (21:51 +0000)]
Add a name for the anonymous type we're creating for subrange
types and a FIXME for what we should be doing. Should solve the
immediacy of PR12069 where our debug info is crashing another
tool.

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

11 years agoAdded DEBUG message to ObjCARC when we optimize objc_retain => objc_retainAutorelased...
Michael Gottesman [Fri, 4 Jan 2013 21:30:38 +0000 (21:30 +0000)]
Added DEBUG message to ObjCARC when we optimize objc_retain => objc_retainAutorelasedReturnValue.

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

11 years agoFixed up some DEBUG messages where I was putting in the text of a message the method...
Michael Gottesman [Fri, 4 Jan 2013 21:29:57 +0000 (21:29 +0000)]
Fixed up some DEBUG messages where I was putting in the text of a message the method where it was being called when I should have just prefixed the actual message with Pass::Method.

Additionally I fixed some whitespace issues.

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

11 years agoFix a warning
Nadav Rotem [Fri, 4 Jan 2013 21:08:44 +0000 (21:08 +0000)]
Fix a warning

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

11 years agoThe current Intel Atom microarchitecture has a feature whereby when a function
Preston Gurd [Fri, 4 Jan 2013 20:54:54 +0000 (20:54 +0000)]
The current Intel Atom microarchitecture has a feature whereby when a function
returns early then it is slightly faster to execute a sequence of NOP
instructions to wait until the return address is ready,
as opposed to simply stalling on the ret instruction
until the return address is ready.

When compiling for X86 Atom only, this patch will run a pass, called
"X86PadShortFunction" which will add NOP instructions where less than four
cycles elapse between function entry and return.

It includes tests.

Patch by Andy Zhang.

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

11 years agoGeneral cleanups.
Bill Wendling [Fri, 4 Jan 2013 20:54:35 +0000 (20:54 +0000)]
General cleanups.

* Remove dead methods.
* Use the 'operator==' method instead of 'contains', which isn't needed.
* Fix some comments.

No functionality change.

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

11 years ago[Object][ELF] Add a maximum alignment. This is used by createELFObjectFile to create...
Michael J. Spencer [Fri, 4 Jan 2013 20:36:28 +0000 (20:36 +0000)]
[Object][ELF] Add a maximum alignment. This is used by createELFObjectFile to create a properly aligned reader.

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

11 years ago[mips] MipsTargetLowering::getSetCCResultType should return a vector type if
Akira Hatanaka [Fri, 4 Jan 2013 20:06:01 +0000 (20:06 +0000)]
[mips] MipsTargetLowering::getSetCCResultType should return a vector type if
vectors are being compared.

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

11 years ago[mips] 80 columns.
Akira Hatanaka [Fri, 4 Jan 2013 19:38:05 +0000 (19:38 +0000)]
[mips] 80 columns.

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

11 years agoFix how YAML I/O detects flow sequences.
Nick Kledzik [Fri, 4 Jan 2013 19:32:00 +0000 (19:32 +0000)]
Fix how YAML I/O detects flow sequences.
Update test case to verify flow sequence is
written as a flow sequence.

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

11 years ago[mips] Reorder template parameters. Remove class shift_rotate_imm32 and
Akira Hatanaka [Fri, 4 Jan 2013 19:25:46 +0000 (19:25 +0000)]
[mips] Reorder template parameters. Remove class shift_rotate_imm32 and
shift_rotate_imm64.

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

11 years agoMemory Dependence Analysis: fix a miscompile that uses DT to approxmiate the
Manman Ren [Fri, 4 Jan 2013 19:19:47 +0000 (19:19 +0000)]
Memory Dependence Analysis: fix a miscompile that uses DT to approxmiate the
reachablity.

We conservatively approximate the reachability analysis by saying it is not
reachable if there is a single path starting from "From" and the path does not
reach "To".

rdar://12801584

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

11 years ago[mips] Refactor conditional move instructions.
Akira Hatanaka [Fri, 4 Jan 2013 19:16:38 +0000 (19:16 +0000)]
[mips] Refactor conditional move instructions.

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

11 years ago[mips] Refactor instructions which move data from or to coprocessors.
Akira Hatanaka [Fri, 4 Jan 2013 19:13:49 +0000 (19:13 +0000)]
[mips] Refactor instructions which move data from or to coprocessors.

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

11 years agoUpdate the gcc-loops benchmarks results with the new automatic unrolling feature.
Nadav Rotem [Fri, 4 Jan 2013 19:10:34 +0000 (19:10 +0000)]
Update the gcc-loops benchmarks results with the new automatic unrolling feature.

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

11 years agofix a couple of typos
Eli Bendersky [Fri, 4 Jan 2013 19:09:15 +0000 (19:09 +0000)]
fix a couple of typos

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

11 years agoRemove unused #include
Eli Bendersky [Fri, 4 Jan 2013 19:08:43 +0000 (19:08 +0000)]
Remove unused #include

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

11 years agoPowerPC: Fix eh_frame relocation for PIC
Adhemerval Zanella [Fri, 4 Jan 2013 19:08:13 +0000 (19:08 +0000)]
PowerPC: Fix eh_frame relocation for PIC

This patch fixes the PPC eh_frame definitions for the personality and
frame unwinding for PIC objects. It makes PIC build correctly creates
relative relocations in the '.rela.eh_frame' segments and thus avoiding
a text relocation that generates a DT_TEXTREL segments in link phase.

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

11 years agoAdd linpack-pc bench
Nadav Rotem [Fri, 4 Jan 2013 19:00:42 +0000 (19:00 +0000)]
Add linpack-pc bench

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

11 years agoAdd Textmate bundle for Tablegen syntax-highlighting
Joel Jones [Fri, 4 Jan 2013 18:55:24 +0000 (18:55 +0000)]
Add Textmate bundle for Tablegen syntax-highlighting

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

11 years agoChange the default number of registers to prevent unrolling on targets that dont...
Nadav Rotem [Fri, 4 Jan 2013 18:40:39 +0000 (18:40 +0000)]
Change the default number of registers to prevent unrolling on targets that dont have this hook.

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

11 years agoAdd a space to the end of the line so we don't get "itsbounds" in output.
Eric Christopher [Fri, 4 Jan 2013 18:30:36 +0000 (18:30 +0000)]
Add a space to the end of the line so we don't get "itsbounds" in output.

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

11 years agosmall fixes to enable the reuse of the pass manager across multiple modules
Pedro Artigas [Fri, 4 Jan 2013 18:04:42 +0000 (18:04 +0000)]
small fixes to enable the reuse of the pass manager across multiple modules

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

11 years agoAdd section information for the DWARF5 split debug proposal
Eric Christopher [Fri, 4 Jan 2013 17:59:22 +0000 (17:59 +0000)]
Add section information for the DWARF5 split debug proposal
string offset section.

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

11 years agoMake comment a bit more clear.
Eric Christopher [Fri, 4 Jan 2013 17:59:17 +0000 (17:59 +0000)]
Make comment a bit more clear.

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

11 years agoMove the loop vectorizer from O2 to O3. It looks like the increase in code size actua...
Nadav Rotem [Fri, 4 Jan 2013 17:57:44 +0000 (17:57 +0000)]
Move the loop vectorizer from O2 to O3. It looks like the increase in code size actually hurts the performance on many programs.

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

11 years agoUpdate the docs about the new unroll features.
Nadav Rotem [Fri, 4 Jan 2013 17:49:45 +0000 (17:49 +0000)]
Update the docs about the new unroll features.

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

11 years agoLoopVectorizer:
Nadav Rotem [Fri, 4 Jan 2013 17:48:25 +0000 (17:48 +0000)]
LoopVectorizer:

1. Add code to estimate register pressure.
2. Add code to select the unroll factor based on register pressure.
3. Add bits to TargetTransformInfo to provide the number of registers.

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

11 years agoRevert revision: 171467. This transformation is incorrect and makes some tests fail...
Nadav Rotem [Fri, 4 Jan 2013 17:35:21 +0000 (17:35 +0000)]
Revert revision: 171467. This transformation is incorrect and makes some tests fail. Original message:

Simplified TRUNCATE operation that comes after SETCC. It is possible since SETCC result is 0 or -1.
Added a test.

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

11 years agoSimplified TRUNCATE operation that comes after SETCC. It is possible since SETCC...
Elena Demikhovsky [Thu, 3 Jan 2013 08:48:33 +0000 (08:48 +0000)]
Simplified TRUNCATE operation that comes after SETCC. It is possible since SETCC result is 0 or -1.
Added a test.

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

11 years agoRevert "Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividi...
Michael Gottesman [Thu, 3 Jan 2013 08:18:30 +0000 (08:18 +0000)]
Revert "Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by 0. This is needed to keep early if conversion from moving them across basic blocks."

This reverts commit r171461 since it breaks the following tests:

Clang :: Analysis/outofbound-notwork.c
Clang :: Analysis/string-fail.c
Clang :: CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp
Clang :: CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp
Clang :: CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp
Clang :: CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp
Clang :: CXX/temp/temp.param/p14.cpp
Clang :: CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp
Clang :: CodeGen/2009-02-13-zerosize-union-field-ppc.c
Clang :: CodeGen/blocks-2.c
Clang :: CodeGen/libcalls-d.c
Clang :: CodeGen/libcalls-ld.c
Clang :: CodeGenCXX/conversion-function.cpp
Clang :: CodeGenCXX/debug-info-limit-type.cpp
Clang :: CodeGenCXX/inheriting-constructor.cpp
Clang :: FixIt/fixit-errors.c
Clang :: FixIt/fixit-pmem.cpp
Clang :: Modules/namespaces.cpp
Clang :: PCH/changed-files.c
Clang :: PCH/pr4489.c
Clang :: PCH/source-manager-stack.c
Clang :: Parser/cxx-ambig-decl-expr-xfail.cpp
Clang :: SemaCXX/switch-implicit-fallthrough-cxx98.cpp
Clang :: SemaTemplate/instantiate-function-1.mm

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

11 years agoChanged two debug statements that state that a queue had finished being processed...
Michael Gottesman [Thu, 3 Jan 2013 08:09:27 +0000 (08:09 +0000)]
Changed two debug statements that state that a queue had finished being processed when said queue was really a list to state a list had finished being processed.

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

11 years agoAdded DEBUG message for ObjCARC when we zap a push/pop pair in ObjCARCAPElim::OptimizeBB.
Michael Gottesman [Thu, 3 Jan 2013 08:09:17 +0000 (08:09 +0000)]
Added DEBUG message for ObjCARC when we zap a push/pop pair in ObjCARCAPElim::OptimizeBB.

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

11 years agoAdded DEBUG message to ObjCARC when we transform objc_initWeak(p, null) => *p = null.
Michael Gottesman [Thu, 3 Jan 2013 07:32:53 +0000 (07:32 +0000)]
Added DEBUG message to ObjCARC when we transform objc_initWeak(p, null) => *p = null.

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

11 years agoAdded DEBUG message for ObjCARC when an inline asm marker is inserted for architectur...
Michael Gottesman [Thu, 3 Jan 2013 07:32:41 +0000 (07:32 +0000)]
Added DEBUG message for ObjCARC when an inline asm marker is inserted for architectures where this is required to perform a retainAutoreleasedReturnValue optimization.

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

11 years agoMark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by...
Craig Topper [Thu, 3 Jan 2013 06:40:20 +0000 (06:40 +0000)]
Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by 0. This is needed to keep early if conversion from moving them across basic blocks.

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

11 years agoBetter comment on VTTI::getShuffleCost
Hal Finkel [Thu, 3 Jan 2013 05:02:41 +0000 (05:02 +0000)]
Better comment on VTTI::getShuffleCost

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

11 years agoCompiler.h: Leave LLVM_BUILTIN_UNREACHABLE undefined if it is unavailable in host...
NAKAMURA Takumi [Thu, 3 Jan 2013 03:30:22 +0000 (03:30 +0000)]
Compiler.h: Leave LLVM_BUILTIN_UNREACHABLE undefined if it is unavailable in host compiler.

Users of LLVM_BUILTIN_UNREACHABLE should be responsible in the case when LLVM_BUILTIN_UNREACHABLE is undefined.

Actually, (0, (p)) in LLVM_ASSUME_ALIGNED(p, a) caused thousands of warnings on g++-4.4. It was a motivation in this commit.

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

11 years agoAdd a subtype parameter to VTTI::getShuffleCost
Hal Finkel [Thu, 3 Jan 2013 02:34:09 +0000 (02:34 +0000)]
Add a subtype parameter to VTTI::getShuffleCost

In order to cost subvector insertion and extraction, we need to know
the type of the subvector being extracted.

No functionality change.

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

11 years agoRevert everything to r171366 to try to fix the build.
Bill Wendling [Thu, 3 Jan 2013 02:01:50 +0000 (02:01 +0000)]
Revert everything to r171366 to try to fix the build.

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

11 years agoReformat the rst text.
Nadav Rotem [Thu, 3 Jan 2013 01:56:33 +0000 (01:56 +0000)]
Reformat the rst text.

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

11 years agoTry again to revert the bad patch. The tree was reverted for some unknown reason
Bill Wendling [Thu, 3 Jan 2013 01:54:39 +0000 (01:54 +0000)]
Try again to revert the bad patch. The tree was reverted for some unknown reason
before the last time.

--- Reverse-merging r171442 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Attributes.cpp
U    lib/IR/AttributeImpl.h

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

11 years agoAdd a default Index for VTTI::getShuffleCost
Hal Finkel [Thu, 3 Jan 2013 01:50:51 +0000 (01:50 +0000)]
Add a default Index for VTTI::getShuffleCost

When Kind == (Broadcast or Reverse) then Index is not used; make it an optional parameter.

No functionality change.

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

11 years agoLoopVectorizer: Test the unrolling flag.
Nadav Rotem [Thu, 3 Jan 2013 01:47:31 +0000 (01:47 +0000)]
LoopVectorizer: Test the unrolling flag.

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

11 years agoLoopVectorizer: Document the unrolling feature.
Nadav Rotem [Thu, 3 Jan 2013 01:47:02 +0000 (01:47 +0000)]
LoopVectorizer: Document the unrolling feature.

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

11 years agoRevert patch. Something snuck in there that shouldn't be.
Bill Wendling [Thu, 3 Jan 2013 01:46:27 +0000 (01:46 +0000)]
Revert patch. Something snuck in there that shouldn't be.

--- Reverse-merging r171441 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Attributes.cpp

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

11 years agoRemove the 'contains' methods in favor of the 'operator==' method.
Bill Wendling [Thu, 3 Jan 2013 01:43:05 +0000 (01:43 +0000)]
Remove the 'contains' methods in favor of the 'operator==' method.

The 'operator==' method is a bit clearer and much less verbose for somethings
that should have only one value. Remove from the AttrBuilder for consistency.

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

11 years agoRevert r171427, "An intermediate step in the Attributes rewrite."
NAKAMURA Takumi [Thu, 3 Jan 2013 01:42:06 +0000 (01:42 +0000)]
Revert r171427, "An intermediate step in the Attributes rewrite."

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

11 years ago[Object] Temporarily disable these tests.
Michael J. Spencer [Thu, 3 Jan 2013 01:24:32 +0000 (01:24 +0000)]
[Object] Temporarily disable these tests.

They are failing because archives create unaligned ELF files. The recent
Endian change added a __builtin_unreachable() when this happens. I will be
committing a fix for this soon.

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

11 years ago[MC][COFF] Switch the COFF streamer over to using the MCObjectStreamer version of...
Michael J. Spencer [Thu, 3 Jan 2013 01:09:22 +0000 (01:09 +0000)]
[MC][COFF] Switch the COFF streamer over to using the MCObjectStreamer version of EmitInstruction.

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

11 years agoLoopVectorizer: Add support for loop-unrolling during vectorization for increasing...
Nadav Rotem [Thu, 3 Jan 2013 00:52:27 +0000 (00:52 +0000)]
LoopVectorizer: Add support for loop-unrolling during vectorization for increasing the ILP. At the moment this feature is disabled by default and this commit should not cause any functional changes.

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

11 years agoFix PR14732 by handling all kinds of IMPLICIT_DEF live ranges.
Jakob Stoklund Olesen [Thu, 3 Jan 2013 00:47:51 +0000 (00:47 +0000)]
Fix PR14732 by handling all kinds of IMPLICIT_DEF live ranges.

Most IMPLICIT_DEF instructions are removed by the ProcessImplicitDefs
pass, and a few are reinserted by PHIElimination when a PHI argument is
<undef>.

RegisterCoalescer was assuming that all IMPLICIT_DEF live ranges look
like those created by PHIElimination, and that their live range never
leaves the basic block.

The PR14732 test case does tricks with PHI nodes that causes a longer
IMPLICIT_DEF live range to appear. This happens very rarely, but
RegisterCoalescer should be able to handle it.

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

11 years agoMake the type signature more strict.
Bill Wendling [Thu, 3 Jan 2013 00:46:43 +0000 (00:46 +0000)]
Make the type signature more strict.

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

11 years ago[CMake] MSVC is incorrectly emitting C4239 in some cases. Disable it.
Michael J. Spencer [Thu, 3 Jan 2013 00:00:40 +0000 (00:00 +0000)]
[CMake] MSVC is incorrectly emitting C4239 in some cases. Disable it.

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

11 years agoAvoid vectorization when the function has the "noimplicitflot" attribute.
Nadav Rotem [Wed, 2 Jan 2013 23:54:43 +0000 (23:54 +0000)]
Avoid vectorization when the function has the "noimplicitflot" attribute.

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

11 years agoExtend the dumping infrastructure to deal with additional
Eric Christopher [Wed, 2 Jan 2013 23:52:13 +0000 (23:52 +0000)]
Extend the dumping infrastructure to deal with additional
sections for debug info. These are some of the dwo sections from the
DWARF5 split debug info proposal. Update the fission-cu.ll testcase
to show what we should be able to dump more of now.

Work in progress: Ultimately the relocations will be gone for the
dwo section and the strings will be a different form (as well as
the rest of the sections will be included).

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

11 years agoAn intermediate step in the Attributes rewrite.
Bill Wendling [Wed, 2 Jan 2013 23:45:09 +0000 (23:45 +0000)]
An intermediate step in the Attributes rewrite.

Modify the AttrBuilder class to store the attributes as a set instead of as a
bit mask. The Attribute class will represent only one attribute instead of a
collection of attributes.

This is the wave of the future!

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

11 years agoDAGCombiner: Avoid generating illegal vector INT_TO_FP nodes
Tom Stellard [Wed, 2 Jan 2013 22:13:01 +0000 (22:13 +0000)]
DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes

DAGCombiner::reduceBuildVecConvertToConvertBuildVec() was making two
mistakes:

1. It was checking the legality of scalar INT_TO_FP nodes and then generating
vector nodes.

2. It was passing the result value type to
TargetLoweringInfo::getOperationAction() when it should have been
passing the value type of the first operand.

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

11 years agoAdds missing aliases for fcom and fcomp instructions without arguments.
Kevin Enderby [Wed, 2 Jan 2013 21:20:15 +0000 (21:20 +0000)]
Adds missing aliases for fcom and fcomp instructions without arguments.
Patch by Michael M Kuperstein!

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

11 years agoUse a bool instead of a bitfield in llvm/ADT/Optional.
Argyrios Kyrtzidis [Wed, 2 Jan 2013 21:19:08 +0000 (21:19 +0000)]
Use a bool instead of a bitfield in llvm/ADT/Optional.

Fixes Valgrind failures and removes bitwise operations that don't provide any benefit.
Valgrind failures reported by NAKAMURA Takumi.

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

11 years agoRestrict __builtin_assume_aligned to gcc 4.7+
Michael J. Spencer [Wed, 2 Jan 2013 20:23:49 +0000 (20:23 +0000)]
Restrict __builtin_assume_aligned to gcc 4.7+

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

11 years ago[Support][Endian] Add support for specifying the alignment and native unaligned types.
Michael J. Spencer [Wed, 2 Jan 2013 20:14:11 +0000 (20:14 +0000)]
[Support][Endian] Add support for specifying the alignment and native unaligned types.

* Add support for specifying the alignment to use.
* Add the concept of native endianness. Used for unaligned native types.

The native alignment and read/write simplification is based on a patch by Richard Smith.

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

11 years agoDon't #include stuff outside the include guards.
Argyrios Kyrtzidis [Wed, 2 Jan 2013 19:42:53 +0000 (19:42 +0000)]
Don't #include stuff outside the include guards.

This defeats the include-guard optimization when parsing.

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

11 years ago- Add comment to two functions which might be considered as dead code.
Shuxin Yang [Wed, 2 Jan 2013 18:26:31 +0000 (18:26 +0000)]
- Add comment to two functions which might be considered as dead code.
- Fix a typo

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

11 years agoAVX: Fix a bug in WidenMaskArithmetic.
Nadav Rotem [Wed, 2 Jan 2013 17:41:03 +0000 (17:41 +0000)]
AVX: Fix a bug in WidenMaskArithmetic.

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

11 years agoAVX: Fix a bug in WidenMaskArithmetic.
Nadav Rotem [Wed, 2 Jan 2013 17:40:39 +0000 (17:40 +0000)]
AVX: Fix a bug in WidenMaskArithmetic.

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

11 years agoActually update the CMake and Makefile builds correctly, and update the
Chandler Carruth [Wed, 2 Jan 2013 12:09:16 +0000 (12:09 +0000)]
Actually update the CMake and Makefile builds correctly, and update the
code that includes Intrinsics.gen directly.

This never showed up in my testing because the old Intrinsics.gen was
still kicking around in the make build system and was correct there. =[
Thankfully, some of the bots to clean rebuilds and that caught this.

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

11 years agoUpdate the examples for the new header file locations.
Chandler Carruth [Wed, 2 Jan 2013 11:56:33 +0000 (11:56 +0000)]
Update the examples for the new header file locations.

Sorry for the fallout here, I forgot the examples aren't built by
default any more.

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

11 years agoMove all of the header files which are involved in modelling the LLVM IR
Chandler Carruth [Wed, 2 Jan 2013 11:36:10 +0000 (11:36 +0000)]
Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

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

11 years agoSort a few more #include lines in tools/... unittests/... and utils/...
Chandler Carruth [Wed, 2 Jan 2013 10:26:28 +0000 (10:26 +0000)]
Sort a few more #include lines in tools/... unittests/... and utils/...

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

11 years agoResort the #include lines in include/... and lib/... with the
Chandler Carruth [Wed, 2 Jan 2013 10:22:59 +0000 (10:22 +0000)]
Resort the #include lines in include/... and lib/... with the
utils/sort_includes.py script.

Most of these are updating the new R600 target and fixing up a few
regressions that have creeped in since the last time I sorted the
includes.

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

11 years agoUpdate the root Makefile for VMCore -> IR. Missed by my original search
Chandler Carruth [Wed, 2 Jan 2013 09:27:25 +0000 (09:27 +0000)]
Update the root Makefile for VMCore -> IR. Missed by my original search
sadly, and is somewhat surprising in general.

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

11 years agoUpdate the configure scripts as well as the makefiles for the move from
Chandler Carruth [Wed, 2 Jan 2013 09:22:59 +0000 (09:22 +0000)]
Update the configure scripts as well as the makefiles for the move from
VMCore to IR.

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

11 years agoRename VMCore directory to IR.
Chandler Carruth [Wed, 2 Jan 2013 09:10:48 +0000 (09:10 +0000)]
Rename VMCore directory to IR.

Aside from moving the actual files, this patch only updates the build
system and the source file comments under lib/... that are relevant.

I'll be updating other docs and other files in smaller subsequnet
commits.

While I've tried to test this, but it is entirely possible that there
will still be some build system fallout.

Also, note that I've not changed the library name itself: libLLVMCore.a
is still the library name. I'd be interested in others' opinions about
whether we should rename this as well (I think we should, just not sure
what it might break)

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

11 years agoMerge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.
Craig Topper [Wed, 2 Jan 2013 08:00:39 +0000 (08:00 +0000)]
Merge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.

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

11 years agoMerge SSE and AVX instruction definitions for PSHUFD/PSHUFHW/PSHUFLW.
Craig Topper [Wed, 2 Jan 2013 07:27:49 +0000 (07:27 +0000)]
Merge SSE and AVX instruction definitions for PSHUFD/PSHUFHW/PSHUFLW.

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

11 years agodocs: update docs/README.txt and make it useful.
Sean Silva [Wed, 2 Jan 2013 02:31:51 +0000 (02:31 +0000)]
docs: update docs/README.txt and make it useful.

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

11 years agoRevert 171351. It broke MC/X86/x86-32-avx.s.
Rafael Espindola [Wed, 2 Jan 2013 01:35:11 +0000 (01:35 +0000)]
Revert 171351. It broke MC/X86/x86-32-avx.s.

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

11 years agoMerge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.
Craig Topper [Tue, 1 Jan 2013 20:53:20 +0000 (20:53 +0000)]
Merge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.

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

11 years agoAdd IRBuilder::CreateVectorSplat and use it to simplify code.
Benjamin Kramer [Tue, 1 Jan 2013 19:55:16 +0000 (19:55 +0000)]
Add IRBuilder::CreateVectorSplat and use it to simplify code.

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

11 years agoSROA: Clean up unused assignment warnings from clang's analyzer.
Benjamin Kramer [Tue, 1 Jan 2013 16:13:35 +0000 (16:13 +0000)]
SROA: Clean up unused assignment warnings from clang's analyzer.

No functionality change.

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

11 years agoAdded DEBUG message when ObjCARC replaces a call which returns its argument verbatim...
Michael Gottesman [Tue, 1 Jan 2013 16:05:54 +0000 (16:05 +0000)]
Added DEBUG message when ObjCARC replaces a call which returns its argument verbatim with its argument to temporarily undo an optimization.

Specifically these calls return their argument verbatim, as a low-level
optimization. However, this makes high-level optimizations
harder. We undo any uses of this optimization that the front-end
emitted. We redo them later in the contract pass.

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

11 years agoAdded DEBUG messages to the top of several processing loops in ObjCARC.cpp that emit...
Michael Gottesman [Tue, 1 Jan 2013 16:05:48 +0000 (16:05 +0000)]
Added DEBUG messages to the top of several processing loops in ObjCARC.cpp that emit what instructions are being visited.

This is a part of a larger effort of adding DEBUG messages to the ARC
Optimizer Backend.

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

11 years agoTests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
Dmitri Gribenko [Tue, 1 Jan 2013 14:04:36 +0000 (14:04 +0000)]
Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID

This is done to avoid odd test failures, like the one fixed in r171243.

While there, FileCheck'ize tests.

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