oota-llvm.git
11 years agoRemove the llvm-local DW_TAG_vector_type tag and add a test to
Eric Christopher [Tue, 8 Jan 2013 01:53:52 +0000 (01:53 +0000)]
Remove the llvm-local DW_TAG_vector_type tag and add a test to
make sure that vector types do work.

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

11 years agoFix comment.
Eric Christopher [Tue, 8 Jan 2013 01:53:42 +0000 (01:53 +0000)]
Fix comment.

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

11 years agoSplit changeset_ty using iterators instead of loops.
Lenny Maiorani [Tue, 8 Jan 2013 01:08:52 +0000 (01:08 +0000)]
Split changeset_ty using iterators instead of loops.

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

11 years agoMark artificial types as such in the annotated debug output.
David Blaikie [Tue, 8 Jan 2013 00:31:02 +0000 (00:31 +0000)]
Mark artificial types as such in the annotated debug output.

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

11 years agoRenamed MCInstFragment to MCRelaxableFragment and added some comments.
Eli Bendersky [Tue, 8 Jan 2013 00:22:56 +0000 (00:22 +0000)]
Renamed MCInstFragment to MCRelaxableFragment and added some comments.

No change in functionality.

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

11 years agoRemove what appears to be a dead llvm-specific debug tag.
Eric Christopher [Tue, 8 Jan 2013 00:16:33 +0000 (00:16 +0000)]
Remove what appears to be a dead llvm-specific debug tag.

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

11 years agoPack MachineOperand bitfields better.
Jakob Stoklund Olesen [Mon, 7 Jan 2013 23:21:44 +0000 (23:21 +0000)]
Pack MachineOperand bitfields better.

Previously, 4 bits were unused.

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

11 years agoPack MachineInstr fields better.
Jakob Stoklund Olesen [Mon, 7 Jan 2013 23:21:41 +0000 (23:21 +0000)]
Pack MachineInstr fields better.

This shrinks MachineInstr to 64 bytes (from 72).

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

11 years agoLoopVectorizer: Add support for floating point reductions
Nadav Rotem [Mon, 7 Jan 2013 23:13:00 +0000 (23:13 +0000)]
LoopVectorizer: Add support for floating point reductions

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

11 years agoAdd some additional tests for the .bundle_lock align_to_end feature that didn't
Eli Bendersky [Mon, 7 Jan 2013 23:12:59 +0000 (23:12 +0000)]
Add some additional tests for the .bundle_lock align_to_end feature that didn't
make into the last commit.

Also, update the test-generation script to generate an exhaustive test for
align_to_end as well, and include the generated test.

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

11 years agoRemove dead directory.
Bill Wendling [Mon, 7 Jan 2013 23:04:00 +0000 (23:04 +0000)]
Remove dead directory.

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

11 years agoCosmetical changne in order to conform to coding std.
Shuxin Yang [Mon, 7 Jan 2013 22:41:28 +0000 (22:41 +0000)]
Cosmetical changne in order to conform to coding std.

Thank Eric Christopher for figuring out these problems!

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

11 years agoWhitespace and 80-col.
Eric Christopher [Mon, 7 Jan 2013 22:40:48 +0000 (22:40 +0000)]
Whitespace and 80-col.

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

11 years agoWhitespace and 80-col.
Eric Christopher [Mon, 7 Jan 2013 22:40:45 +0000 (22:40 +0000)]
Whitespace and 80-col.

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

11 years agoLoopVectorizer: When we vectorizer and widen loops we process many elements at once...
Nadav Rotem [Mon, 7 Jan 2013 21:54:51 +0000 (21:54 +0000)]
LoopVectorizer: When we vectorizer and widen loops we process many elements at once. This is a good thing, except for
small loops. On small loops post-loop that handles scalars (and runs slower) can take more time to execute than the
rest of the loop. This patch disables widening of loops with a small static trip count.

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

11 years agoAdd the align_to_end option to .bundle_lock in the MC implementation of aligned
Eli Bendersky [Mon, 7 Jan 2013 21:51:08 +0000 (21:51 +0000)]
Add the align_to_end option to .bundle_lock in the MC implementation of aligned
bundling. The document describing this feature and the implementation has also
been updated:

https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm

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

11 years agoThis change is to implement following rules:
Shuxin Yang [Mon, 7 Jan 2013 21:39:23 +0000 (21:39 +0000)]
This change is to implement following rules:

  o. X/C1 * C2 => X * (C2/C1) (if C2/C1 is neither special FP nor denormal)
  o. X/C1 * C2 -> X/(C1/C2)   (if C2/C1 is either specical FP or denormal, but C1/C2 is a normal Fp)

     Let MDC denote multiplication or dividion with one & only one operand being a constant
  o. (MDC ± C1) * C2 => (MDC * C2) ± (C1 * C2)
     (so long as the constant-folding doesn't yield any denormal or special value)

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

11 years agoFixed EOL whitespace.
Michael Gottesman [Mon, 7 Jan 2013 21:26:07 +0000 (21:26 +0000)]
Fixed EOL whitespace.

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

11 years agoARM: Copy-paste error.
Jim Grosbach [Mon, 7 Jan 2013 21:24:35 +0000 (21:24 +0000)]
ARM: Copy-paste error.

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

11 years agoARM: Fix a few copy-paste errors.
Jim Grosbach [Mon, 7 Jan 2013 21:12:13 +0000 (21:12 +0000)]
ARM: Fix a few copy-paste errors.

s/X86/ARM/

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

11 years ago[ms-inline asm] Make sure the NullStreamParser doesn't try to emit labels when
Chad Rosier [Mon, 7 Jan 2013 20:34:12 +0000 (20:34 +0000)]
[ms-inline asm] Make sure the NullStreamParser doesn't try to emit labels when
parsing MS-style inline assembly.

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

11 years agoAdd more comments to what's going on here.
Eric Christopher [Mon, 7 Jan 2013 19:32:45 +0000 (19:32 +0000)]
Add more comments to what's going on here.

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

11 years agoAdd support for separating strings for the split debug info DWARF5
Eric Christopher [Mon, 7 Jan 2013 19:32:41 +0000 (19:32 +0000)]
Add support for separating strings for the split debug info DWARF5
proposal. This leaves the strings in the skeleton die as strp,
but in all dwo files they're accessed now via DW_FORM_GNU_str_index.

Add support for dumping these sections and modify the fission-cu.ll
testcase to have the correct strings and form. Fix a small bug
in the fixed form sizes routine that involved out of array accesses
for the table and add a FIXME in the extractFast routine to fix
this up.

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

11 years agoThis patch addresses bug 14678 by fixing two problems in medium code model
Bill Schmidt [Mon, 7 Jan 2013 19:29:18 +0000 (19:29 +0000)]
This patch addresses bug 14678 by fixing two problems in medium code model
code generation.  Variables addressed through a GlobalAlias were not being
handled, and variables with available_externally linkage were treated
incorrectly.  The patch contains two new tests to verify the correct code
generation for these cases.

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

11 years agoChange SMRange to be half-open (exclusive end) instead of closed (inclusive)
Jordan Rose [Mon, 7 Jan 2013 19:00:49 +0000 (19:00 +0000)]
Change SMRange to be half-open (exclusive end) instead of closed (inclusive)

This is necessary not only for representing empty ranges, but for handling
multibyte characters in the input. (If the end pointer in a range refers to
a multibyte character, should it point to the beginning or the end of the
character in a char array?) Some of the code in the asm parsers was already
assuming this anyway.

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

11 years agoImplement APFloat::isDenormal()
Shuxin Yang [Mon, 7 Jan 2013 18:59:35 +0000 (18:59 +0000)]
Implement APFloat::isDenormal()

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

11 years agoWhen code size is the priority (Oz, MinSize attribute), help llvm
Quentin Colombet [Mon, 7 Jan 2013 18:37:41 +0000 (18:37 +0000)]
When code size is the priority (Oz, MinSize attribute), help llvm
turning a code like this:

if (foo)
   free(foo)

into that:
free(foo)

Move a call to free from basic block FB into FB's predecessor, P,
when the path from P to FB is taken only if the argument of free is
not equal to NULL.

Some restrictions apply on P and FB to be sure that this code motion
is profitable. Namely:
1. FB must have only one predecessor P.
2. FB must contain only the call to free plus an unconditional
   branch to S.
3. P's successors are FB and S.

Because of 1., we will not increase the code size when moving the call
to free from FB to P.
Because of 2., FB will be empty after the move.
Because of 2. and 3., P's branch instruction becomes useless, so as FB
(simplifycfg will do the job).

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

11 years agoMake test/DebugInfo/member-pointers.ll portable by removing the TargetData
David Blaikie [Mon, 7 Jan 2013 17:52:49 +0000 (17:52 +0000)]
Make test/DebugInfo/member-pointers.ll portable by removing the TargetData

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

11 years agoClaim ".td" files. Improve README cp command. Drop "Bundle" from description
Joel Jones [Mon, 7 Jan 2013 17:07:10 +0000 (17:07 +0000)]
Claim ".td" files.  Improve README cp command. Drop "Bundle" from description

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

11 years agoMove TypeFinder.h into the IR tree, it clearly belongs with the IR library.
Chandler Carruth [Mon, 7 Jan 2013 15:43:51 +0000 (15:43 +0000)]
Move TypeFinder.h into the IR tree, it clearly belongs with the IR library.

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

11 years agoRename the VMCore unittest tree to IR. Somehow was missed when doing the
Chandler Carruth [Mon, 7 Jan 2013 15:35:46 +0000 (15:35 +0000)]
Rename the VMCore unittest tree to IR. Somehow was missed when doing the
library rename.

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

11 years agoMove CallGraphSCCPass.h into the Analysis tree; that's where the
Chandler Carruth [Mon, 7 Jan 2013 15:26:48 +0000 (15:26 +0000)]
Move CallGraphSCCPass.h into the Analysis tree; that's where the
implementation lives already.

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

11 years agoRemove the long defunct 'DefaultPasses' header. We have a pass manager
Chandler Carruth [Mon, 7 Jan 2013 15:16:50 +0000 (15:16 +0000)]
Remove the long defunct 'DefaultPasses' header. We have a pass manager
builder these days, and this thing hasn't seen updates for a very long
time.

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

11 years agoSink AddrMode back into TargetLowering, removing one of the most
Chandler Carruth [Mon, 7 Jan 2013 15:14:13 +0000 (15:14 +0000)]
Sink AddrMode back into TargetLowering, removing one of the most
peculiar headers under include/llvm.

This struct still doesn't make a lot of sense, but it makes more sense
down in TargetLowering than it did before.

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

11 years agoRemove LSR's use of the random AddrMode struct. These variables were
Chandler Carruth [Mon, 7 Jan 2013 15:04:40 +0000 (15:04 +0000)]
Remove LSR's use of the random AddrMode struct. These variables were
already in a class, just inline the four of them. I suspect that this
class could be simplified some to not always keep distinct variables for
these things, but it wasn't clear to me how given the usage so I opted
for a trivial and mechanical translation.

This removes one of the two remaining users of a header in include/llvm
which does nothing more than define a 4 member struct.

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

11 years agoSwitch the SCEV expander and LoopStrengthReduce to use
Chandler Carruth [Mon, 7 Jan 2013 14:41:08 +0000 (14:41 +0000)]
Switch the SCEV expander and LoopStrengthReduce to use
TargetTransformInfo rather than TargetLowering, removing one of the
primary instances of the layering violation of Transforms depending
directly on Target.

This is a really big deal because LSR used to be a "special" pass that
could only be tested fully using llc and by looking at the full output
of it. It also couldn't run with any other loop passes because it had to
be created by the backend. No longer is this true. LSR is now just
a normal pass and we should probably lift the creation of LSR out of
lib/CodeGen/Passes.cpp and into the PassManagerBuilder. =] I've not done
this, or updated all of the tests to use opt and a triple, because
I suspect someone more familiar with LSR would do a better job. This
change should be essentially without functional impact for normal
compilations, and only change behvaior of targetless compilations.

The conversion required changing all of the LSR code to refer to the TTI
interfaces, which fortunately are very similar to TargetLowering's
interfaces. However, it also allowed us to *always* expect to have some
implementation around. I've pushed that simplification through the pass,
and leveraged it to simplify code somewhat. It required some test
updates for one of two things: either we used to skip some checks
altogether but now we get the default "no" answer for them, or we used
to have no information about the target and now we do have some.

I've also started the process of removing AddrMode, as the TTI interface
doesn't use it any longer. In some cases this simplifies code, and in
others it adds some complexity, but I think it's not a bad tradeoff even
there. Subsequent patches will try to clean this up even further and use
other (more appropriate) abstractions.

Yet again, almost all of the formatting changes brought to you by
clang-format. =]

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

11 years agoFix a mistaken commit that included some debugging code.
David Tweed [Mon, 7 Jan 2013 13:41:55 +0000 (13:41 +0000)]
Fix a mistaken commit that included some debugging code.

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

11 years agoThere was a switch fall-through in the parser for textual LLVM that caused
David Tweed [Mon, 7 Jan 2013 13:32:38 +0000 (13:32 +0000)]
There was a switch fall-through in the parser for textual LLVM that caused
bogus comparison operands to default to eq/oeq. Fix that, fix a couple of
tests that accidentally passed and test for bogus comparison opeartors
explicitly.

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

11 years agoMake the MergeGlobals pass correctly handle the address space qualifiers of the globa...
Silviu Baranga [Mon, 7 Jan 2013 12:31:25 +0000 (12:31 +0000)]
Make the MergeGlobals pass correctly handle the address space qualifiers of the global variables. We partition the set of globals by their address space, and apply the same the trasnformation as before to merge them.

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

11 years agoDocumentation: add a note that Clang on Mageia 2 can not find libstdc++ headers
Dmitri Gribenko [Mon, 7 Jan 2013 12:17:44 +0000 (12:17 +0000)]
Documentation: add a note that Clang on Mageia 2 can not find libstdc++ headers

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

11 years agoR600/SIISelLowering.cpp: Suppress a warning. [-Wunused-variable]
NAKAMURA Takumi [Mon, 7 Jan 2013 11:14:44 +0000 (11:14 +0000)]
R600/SIISelLowering.cpp: Suppress a warning. [-Wunused-variable]

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

11 years agoCallingConvLower.h: Use bitfields like unsigned:1 instead of bool:1 .
NAKAMURA Takumi [Mon, 7 Jan 2013 11:13:51 +0000 (11:13 +0000)]
CallingConvLower.h: Use bitfields like unsigned:1 instead of bool:1 .

Some compilers might be confused if bool were potentially signed integer. In my case, g++-4.7.0 miscompiled CodeGen/ARM.

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

11 years agoSimplify LoopVectorize to require target transform info and rely on it
Chandler Carruth [Mon, 7 Jan 2013 11:12:29 +0000 (11:12 +0000)]
Simplify LoopVectorize to require target transform info and rely on it
being present. Make a member of one of the helper classes a reference as
part of this.

Reformatting goodness brought to you by clang-format.

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

11 years agoMerge the unused header file for LoopVectorizer into the source file.
Chandler Carruth [Mon, 7 Jan 2013 10:44:06 +0000 (10:44 +0000)]
Merge the unused header file for LoopVectorizer into the source file.
This makes the loop vectorizer match the pattern followed by roughly all
other passses. =]

Notably, this header file was braken in several regards: it contained
a using namespace directive, global #define's that aren't globaly
appropriate, and global constants defined directly in the header file.

As a side benefit, lots of the types in this file become internal, which
will cause the optimizer to chew on this pass more effectively.

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

11 years agoSwitch BBVectorize to directly depend on having a TTI analysis.
Chandler Carruth [Mon, 7 Jan 2013 10:22:36 +0000 (10:22 +0000)]
Switch BBVectorize to directly depend on having a TTI analysis.

This could be simplified further, but Hal has a specific feature for
ignoring TTI, and so I preserved that.

Also, I needed to use it because a number of tests fail when switching
from a null TTI to the NoTTI nonce implementation. That seems suspicious
to me and so may be something that you need to look into Hal. I worked
it by preserving the old behavior for these tests with the flag that
ignores all target info.

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

11 years agoAdd LICENSE.TXT covering contributions made by ARM.
Tim Northover [Mon, 7 Jan 2013 10:04:49 +0000 (10:04 +0000)]
Add LICENSE.TXT covering contributions made by ARM.

Absent a Contributor's License Agreement (CLA) with an LLVM legal entity and as
reviewed and agreed with Chris Lattner, add a patent license covering future
contributions from ARM until there is a CLA. This is to make explicit ARM's
grant of patent rights to recipients of LLVM containing ARM-contributed
material.

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

11 years agoFix a slew of indentation and parameter naming style issues. This 80% of
Chandler Carruth [Mon, 7 Jan 2013 09:57:00 +0000 (09:57 +0000)]
Fix a slew of indentation and parameter naming style issues. This 80% of
this patch brought to you by the tool clang-format.

I wanted to fix up the names of constructor parameters because they
followed a bit of an anti-pattern by naming initialisms with CamelCase:
'Tti', 'Se', etc. This appears to have been in an attempt to not overlap
with the names of member variables 'TTI', 'SE', etc. However,
constructor arguments can very safely alias members, and in fact that's
the conventional way to pass in members. I've fixed all of these I saw,
along with making some strang abbreviations such as 'Lp' be simpler 'L',
or 'Lgl' be the word 'Legal'.

However, the code I was touching had indentation and formatting somewhat
all over the map. So I ran clang-format and fixed them.

I also fixed a few other formatting or doxygen formatting issues such as
using ///< on trailing comments so they are associated with the correct
entry.

There is still a lot of room for improvement of the formating and
cleanliness of this code. ;] At least a few parts of the coding
standards or common practices in LLVM's code aren't followed, the enum
naming rules jumped out at me. I may mix some of these while I'm here,
but not all of them.

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

11 years agoSwitch LoopIdiom pass to directly require target transform information.
Chandler Carruth [Mon, 7 Jan 2013 09:17:41 +0000 (09:17 +0000)]
Switch LoopIdiom pass to directly require target transform information.

I'm sorry for duplicating bad style here, but I wanted to keep
consistency. I've pinged the code review thread where this style was
reviewed and changes were requested.

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

11 years agoRough out a new c'tor for the AttrBuilder class.
Bill Wendling [Mon, 7 Jan 2013 08:24:35 +0000 (08:24 +0000)]
Rough out a new c'tor for the AttrBuilder class.

This c'tor takes the AttributeSet class as the parameter. It will eventually
grab the attributes from the specified index and create a new attribute builder
with those attributes.

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

11 years agoRemove more unnecessary # operators with nothing to paste proceeding them.
Craig Topper [Mon, 7 Jan 2013 06:14:20 +0000 (06:14 +0000)]
Remove more unnecessary # operators with nothing to paste proceeding them.

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

11 years agoDocumentation updates for pointer-to-member debug info added in r171698.
David Blaikie [Mon, 7 Jan 2013 06:02:07 +0000 (06:02 +0000)]
Documentation updates for pointer-to-member debug info added in r171698.

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

11 years agoPR14759: Debug info support for C++ member pointers.
David Blaikie [Mon, 7 Jan 2013 05:51:15 +0000 (05:51 +0000)]
PR14759: Debug info support for C++ member pointers.

This works fine with GDB for member variable pointers, but GDB's support for
member function pointers seems to be quite unrelated to
DW_TAG_ptr_to_member_type. (see GDB bug 14998 for details)

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

11 years agoRemove # from the beginning and end of def names. The # is a paste operator and shoul...
Craig Topper [Mon, 7 Jan 2013 05:45:56 +0000 (05:45 +0000)]
Remove # from the beginning and end of def names. The # is a paste operator and should only be used with something to paste on either side.

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

11 years agoRemove # from the beginning and end of def names.
Craig Topper [Mon, 7 Jan 2013 05:26:58 +0000 (05:26 +0000)]
Remove # from the beginning and end of def names.

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

11 years agoRevert r171140. We don't actually need to support #NAME. Because NAME by itself is...
Craig Topper [Mon, 7 Jan 2013 05:09:33 +0000 (05:09 +0000)]
Revert r171140. We don't actually need to support #NAME. Because NAME by itself is interpreted just fine.

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

11 years agoRemove unnecessary # tokens at the beginning and end of defm names.
Craig Topper [Mon, 7 Jan 2013 05:04:39 +0000 (05:04 +0000)]
Remove unnecessary # tokens at the beginning and end of defm names.

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

11 years agoMake SimplifyCFG simply depend upon TargetTransformInfo and pass it
Chandler Carruth [Mon, 7 Jan 2013 03:53:25 +0000 (03:53 +0000)]
Make SimplifyCFG simply depend upon TargetTransformInfo and pass it
through as a reference rather than a pointer. There is always *some*
implementation of this available, so this simplifies code by not having
to test for whether it is available or not.

Further, it turns out there were piles of places where SimplifyCFG was
recursing and not passing down either TD or TTI. These are fixed to be
more pedantically consistent even though I don't have any particular
cases where it would matter.

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

11 years agoMove the initialization to the Analysis library as well as the pass.
Chandler Carruth [Mon, 7 Jan 2013 03:33:08 +0000 (03:33 +0000)]
Move the initialization to the Analysis library as well as the pass.

This was (somewhat distressingly) only caught be the ocaml bindings
tests...

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

11 years agoUpdate comment.
Eric Christopher [Mon, 7 Jan 2013 03:27:58 +0000 (03:27 +0000)]
Update comment.

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

11 years agoFix the enumerator names for ShuffleKind to match tho coding standards,
Chandler Carruth [Mon, 7 Jan 2013 03:20:02 +0000 (03:20 +0000)]
Fix the enumerator names for ShuffleKind to match tho coding standards,
and make its comments doxygen comments.

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

11 years agoMake the popcnt support enums and methods have more clear names and
Chandler Carruth [Mon, 7 Jan 2013 03:16:03 +0000 (03:16 +0000)]
Make the popcnt support enums and methods have more clear names and
follow the conding conventions regarding enumerating a set of "kinds" of
things.

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

11 years agoMove TargetTransformInfo to live under the Analysis library. This no
Chandler Carruth [Mon, 7 Jan 2013 03:08:10 +0000 (03:08 +0000)]
Move TargetTransformInfo to live under the Analysis library. This no
longer would violate any dependency layering and it is in fact an
analysis. =]

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

11 years agotblgen, docs: Add initial syntax reference.
Sean Silva [Mon, 7 Jan 2013 02:43:44 +0000 (02:43 +0000)]
tblgen, docs: Add initial syntax reference.

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

11 years agoSimplify TableGen type-compatibility checks.
Sean Silva [Mon, 7 Jan 2013 02:30:19 +0000 (02:30 +0000)]
Simplify TableGen type-compatibility checks.

Patch by Elior Malul!

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

11 years agoSwitch TargetTransformInfo from an immutable analysis pass that requires
Chandler Carruth [Mon, 7 Jan 2013 01:37:14 +0000 (01:37 +0000)]
Switch TargetTransformInfo from an immutable analysis pass that requires
a TargetMachine to construct (and thus isn't always available), to an
analysis group that supports layered implementations much like
AliasAnalysis does. This is a pretty massive change, with a few parts
that I was unable to easily separate (sorry), so I'll walk through it.

The first step of this conversion was to make TargetTransformInfo an
analysis group, and to sink the nonce implementations in
ScalarTargetTransformInfo and VectorTargetTranformInfo into
a NoTargetTransformInfo pass. This allows other passes to add a hard
requirement on TTI, and assume they will always get at least on
implementation.

The TargetTransformInfo analysis group leverages the delegation chaining
trick that AliasAnalysis uses, where the base class for the analysis
group delegates to the previous analysis *pass*, allowing all but tho
NoFoo analysis passes to only implement the parts of the interfaces they
support. It also introduces a new trick where each pass in the group
retains a pointer to the top-most pass that has been initialized. This
allows passes to implement one API in terms of another API and benefit
when some other pass above them in the stack has more precise results
for the second API.

The second step of this conversion is to create a pass that implements
the TargetTransformInfo analysis using the target-independent
abstractions in the code generator. This replaces the
ScalarTargetTransformImpl and VectorTargetTransformImpl classes in
lib/Target with a single pass in lib/CodeGen called
BasicTargetTransformInfo. This class actually provides most of the TTI
functionality, basing it upon the TargetLowering abstraction and other
information in the target independent code generator.

The third step of the conversion adds support to all TargetMachines to
register custom analysis passes. This allows building those passes with
access to TargetLowering or other target-specific classes, and it also
allows each target to customize the set of analysis passes desired in
the pass manager. The baseline LLVMTargetMachine implements this
interface to add the BasicTTI pass to the pass manager, and all of the
tools that want to support target-aware TTI passes call this routine on
whatever target machine they end up with to add the appropriate passes.

The fourth step of the conversion created target-specific TTI analysis
passes for the X86 and ARM backends. These passes contain the custom
logic that was previously in their extensions of the
ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces.
I separated them into their own file, as now all of the interface bits
are private and they just expose a function to create the pass itself.
Then I extended these target machines to set up a custom set of analysis
passes, first adding BasicTTI as a fallback, and then adding their
customized TTI implementations.

The fourth step required logic that was shared between the target
independent layer and the specific targets to move to a different
interface, as they no longer derive from each other. As a consequence,
a helper functions were added to TargetLowering representing the common
logic needed both in the target implementation and the codegen
implementation of the TTI pass. While technically this is the only
change that could have been committed separately, it would have been
a nightmare to extract.

The final step of the conversion was just to delete all the old
boilerplate. This got rid of the ScalarTargetTransformInfo and
VectorTargetTransformInfo classes, all of the support in all of the
targets for producing instances of them, and all of the support in the
tools for manually constructing a pass based around them.

Now that TTI is a relatively normal analysis group, two things become
straightforward. First, we can sink it into lib/Analysis which is a more
natural layer for it to live. Second, clients of this interface can
depend on it *always* being available which will simplify their code and
behavior. These (and other) simplifications will follow in subsequent
commits, this one is clearly big enough.

Finally, I'm very aware that much of the comments and documentation
needs to be updated. As soon as I had this working, and plausibly well
commented, I wanted to get it committed and in front of the build bots.
I'll be doing a few passes over documentation later if it sticks.

Commits to update DragonEgg and Clang will be made presently.

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

11 years ago[ObjCARC Debug Message] - Added debug message when fuse a retain/autorelease pair...
Michael Gottesman [Mon, 7 Jan 2013 00:31:26 +0000 (00:31 +0000)]
[ObjCARC Debug Message] - Added debug message when fuse a retain/autorelease pair in ObjCARCContract::ContractAutorelease.

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

11 years ago[ObjCARC Debug Message] - Added debug message when we zap a matching retain/autorelea...
Michael Gottesman [Mon, 7 Jan 2013 00:04:56 +0000 (00:04 +0000)]
[ObjCARC Debug Message] - Added debug message when we zap a matching retain/autorelease pair in ObjCARCOpt::OptimizeReturns.

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

11 years ago[ObjCARC Debug Message] - Added debug message when we erase ARC calls with null since...
Michael Gottesman [Mon, 7 Jan 2013 00:04:52 +0000 (00:04 +0000)]
[ObjCARC Debug Message] - Added debug message when we erase ARC calls with null since they are no-ops.

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

11 years ago[ObjCARC Debug Message] - Added debug message when we add a nounwind keyword to a...
Michael Gottesman [Sun, 6 Jan 2013 23:39:13 +0000 (23:39 +0000)]
[ObjCARC Debug Message] - Added debug message when we add a nounwind keyword to a function which can not throw.

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

11 years ago[ObjCARC Debug Message] - Added debug message when we add a tail keyword to a functio...
Michael Gottesman [Sun, 6 Jan 2013 23:39:09 +0000 (23:39 +0000)]
[ObjCARC Debug Message] - Added debug message when we add a tail keyword to a function which can never be passed stack args.

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

11 years ago[ObjCARC Debug Messages] - Added missing newline.
Michael Gottesman [Sun, 6 Jan 2013 22:56:54 +0000 (22:56 +0000)]
[ObjCARC Debug Messages] - Added missing newline.

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

11 years agoAdded debug statement to ObjCARC when we replace objc_autorelease(x) with objc_releas...
Michael Gottesman [Sun, 6 Jan 2013 22:56:50 +0000 (22:56 +0000)]
Added debug statement to ObjCARC when we replace objc_autorelease(x) with objc_release(x) when x is otherwise unused.

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

11 years agoAdded 2x Debug statements to ObjCARC that log when we handle the two undefined pointe...
Michael Gottesman [Sun, 6 Jan 2013 21:54:30 +0000 (21:54 +0000)]
Added 2x Debug statements to ObjCARC that log when we handle the two undefined pointer-to-weak-pointer is NULL cases by replacing the given call inst with an undefined value.

The reason that there are two cases is that the first case handles the unary cases and the second the binary cases.

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

11 years agoDocumentation: add clang 3.0 + libstdc++ 4.7.x as a known bad combination that
Dmitri Gribenko [Sun, 6 Jan 2013 21:23:27 +0000 (21:23 +0000)]
Documentation: add clang 3.0 + libstdc++ 4.7.x as a known bad combination that
is actually used by a few Linux distributions

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

11 years agoAdded debug message in ObjCARC when we remove a no-op cast which has only special...
Michael Gottesman [Sun, 6 Jan 2013 21:07:15 +0000 (21:07 +0000)]
Added debug message in ObjCARC when we remove a no-op cast which has only special semantic meaning in the frontend and thus in the optimizer can be deleted.

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

11 years agoAdded debug message to ObjCARC when we transform an objc_autoreleaseReturnValue ...
Michael Gottesman [Sun, 6 Jan 2013 21:07:11 +0000 (21:07 +0000)]
Added debug message to ObjCARC when we transform an objc_autoreleaseReturnValue => objc_autorelease due to its operand not being used as a return value.

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

11 years agoFix suffix handling for parsing and printing of cvtsi2ss, cvtsi2sd, cvtss2si, cvttss2...
Craig Topper [Sun, 6 Jan 2013 20:39:29 +0000 (20:39 +0000)]
Fix suffix handling for parsing and printing of cvtsi2ss, cvtsi2sd, cvtss2si, cvttss2si, cvtsd2si, and cvttsd2si to match gas behavior.

cvtsi2* should parse with an 'l' or 'q' suffix or no suffix at all. No suffix should be treated the same as 'l' suffix. Printing should always print a suffix. Previously we didn't parse or print an 'l' suffix.
cvtt*2si/cvt*2si should parse with an 'l' or 'q' suffix or not suffix at all. No suffix should use the destination register size to choose encoding. Printing should not print a suffix.

Original 'l' suffix issue with cvtsi2* pointed out by Michael Kuperstein.

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

11 years agoFix for PR14739. It's not safe to fold a load into a call across a store. Thanks...
Evan Cheng [Sun, 6 Jan 2013 19:00:15 +0000 (19:00 +0000)]
Fix for PR14739. It's not safe to fold a load into a call across a store. Thanks to Nick Lewycky for the initial patch.

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

11 years agoFix a crash in LSR replaceCongruentIVs.
Andrew Trick [Sun, 6 Jan 2013 05:59:39 +0000 (05:59 +0000)]
Fix a crash in LSR replaceCongruentIVs.

Indirect branch in the preheader crashes replaceCongruentIVs.
Fixes rdar://12910141.

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

11 years ago[objdump] Use correct format specifiers and fix C++03 variadic warning.
Michael J. Spencer [Sun, 6 Jan 2013 05:23:59 +0000 (05:23 +0000)]
[objdump] Use correct format specifiers and fix C++03 variadic warning.

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

11 years ago[Object][ELF] Fix incorrect size of members for the 64 version of Elf_Phdr_Impl.
Michael J. Spencer [Sun, 6 Jan 2013 03:57:11 +0000 (03:57 +0000)]
[Object][ELF] Fix incorrect size of members for the 64 version of Elf_Phdr_Impl.

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

11 years ago[objdump] Add --private-headers, -p.
Michael J. Spencer [Sun, 6 Jan 2013 03:56:49 +0000 (03:56 +0000)]
[objdump] Add --private-headers, -p.

This currently prints the ELF program headers.

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

11 years ago[Object][ELF] Add program header iterator.
Michael J. Spencer [Sun, 6 Jan 2013 03:56:27 +0000 (03:56 +0000)]
[Object][ELF] Add program header iterator.

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

11 years ago[Object][ELF] Refactor ELFRelocationIterator into ELFEntityIterator. No functionality...
Michael J. Spencer [Sun, 6 Jan 2013 03:56:14 +0000 (03:56 +0000)]
[Object][ELF] Refactor ELFRelocationIterator into ELFEntityIterator. No functionality change.

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

11 years agoAdd reference to dcommit on GettingStarted
Renato Golin [Sun, 6 Jan 2013 00:14:27 +0000 (00:14 +0000)]
Add reference to dcommit on GettingStarted

Signed-off-by: Renato Golin <renato.golin@linaro.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171642 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoInclude access modifiers in subprogram metadata IR comment.
David Blaikie [Sat, 5 Jan 2013 21:39:33 +0000 (21:39 +0000)]
Include access modifiers in subprogram metadata IR comment.

Based on code review feedback in r171604 from Chandler Carruth &
Eric Christopher.

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

11 years agoGettingStarted: improve formatting and document that configure checks for
Dmitri Gribenko [Sat, 5 Jan 2013 18:10:06 +0000 (18:10 +0000)]
GettingStarted: improve formatting and document that configure checks for
'clang' to use it as the compiler.

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

11 years agoAdded debug message to ObjCARC when we transform objc_retainAutorelasedReturnValue...
Michael Gottesman [Sat, 5 Jan 2013 17:55:42 +0000 (17:55 +0000)]
Added debug message to ObjCARC when we transform objc_retainAutorelasedReturnValue => objc_retain since the operand to said function is not a return value.

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

11 years agoAdded debug message for ObjCARC when we zap an objc_autoreleaseReturnValue/objc_retai...
Michael Gottesman [Sat, 5 Jan 2013 17:55:35 +0000 (17:55 +0000)]
Added debug message for ObjCARC when we zap an objc_autoreleaseReturnValue/objc_retainAutoreleasedValue pair.

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

11 years agoswitch from pointer equality comparison to MDNode::getMostGenericTBAA
Chris Lattner [Sat, 5 Jan 2013 16:44:07 +0000 (16:44 +0000)]
switch from pointer equality comparison to MDNode::getMostGenericTBAA
when merging two TBAA tags, pointed out by Nuno.

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

11 years agoFunnel the actual TargetTransformInfo pass from the SelectionDAGISel
Chandler Carruth [Sat, 5 Jan 2013 12:32:17 +0000 (12:32 +0000)]
Funnel the actual TargetTransformInfo pass from the SelectionDAGISel
pass into the SelectionDAG itself rather than snooping on the
implementation of that pass as exposed by the TargetMachine. This
removes the last direct client of the ScalarTargetTransformInfo class
outside of the TTI pass implementation.

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

11 years agoAttribute: Make hashes match when looking up AttributeImpls.
Benjamin Kramer [Sat, 5 Jan 2013 12:08:00 +0000 (12:08 +0000)]
Attribute: Make hashes match when looking up AttributeImpls.

This isn't optimal either but fixes a massive compile time regression from the
attribute uniquing work.

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

11 years agoFix another place where we build the TTI pass to the new interface.
Chandler Carruth [Sat, 5 Jan 2013 11:54:35 +0000 (11:54 +0000)]
Fix another place where we build the TTI pass to the new interface.

Sorry for the noise here, 'make check' doesn't build this code. =/

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

11 years agoConvert the TargetTransformInfo from an immutable pass with dynamic
Chandler Carruth [Sat, 5 Jan 2013 11:43:11 +0000 (11:43 +0000)]
Convert the TargetTransformInfo from an immutable pass with dynamic
interfaces which could be extracted from it, and must be provided on
construction, to a chained analysis group.

The end goal here is that TTI works much like AA -- there is a baseline
"no-op" and target independent pass which is in the group, and each
target can expose a target-specific pass in the group. These passes will
naturally chain allowing each target-specific pass to delegate to the
generic pass as needed.

In particular, this will allow a much simpler interface for passes that
would like to use TTI -- they can have a hard dependency on TTI and it
will just be satisfied by the stub implementation when that is all that
is available.

This patch is a WIP however. In particular, the "stub" pass is actually
the one and only pass, and everything there is implemented by delegating
to the target-provided interfaces. As a consequence the tools still have
to explicitly construct the pass. Switching targets to provide custom
passes and sinking the stub behavior into the NoTTI pass is the next
step.

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

11 years agoSwitch the loop vectorizer from VTTI to just use TTI directly.
Chandler Carruth [Sat, 5 Jan 2013 10:16:02 +0000 (10:16 +0000)]
Switch the loop vectorizer from VTTI to just use TTI directly.

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

11 years agoSwitch the cost model analysis over to just the TTI interface.
Chandler Carruth [Sat, 5 Jan 2013 10:09:33 +0000 (10:09 +0000)]
Switch the cost model analysis over to just the TTI interface.

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

11 years agoSwitch the BB vectorizer from the VTTI interface to the simple TTI
Chandler Carruth [Sat, 5 Jan 2013 10:05:28 +0000 (10:05 +0000)]
Switch the BB vectorizer from the VTTI interface to the simple TTI
interface.

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

11 years agoSwitch SimplifyCFG over to the TargetTransformInfo interface rather than
Chandler Carruth [Sat, 5 Jan 2013 10:05:26 +0000 (10:05 +0000)]
Switch SimplifyCFG over to the TargetTransformInfo interface rather than
the ScalarTargetTransformInfo interface.

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

11 years agoSwitch LoopIdiomRecognize to directly use the TargetTransformInfo
Chandler Carruth [Sat, 5 Jan 2013 10:00:09 +0000 (10:00 +0000)]
Switch LoopIdiomRecognize to directly use the TargetTransformInfo
interface rather than the ScalarTargetTransformInterface.

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

11 years agoReplicate the APIs of ScalarTargetTransformInfo and
Chandler Carruth [Sat, 5 Jan 2013 09:56:20 +0000 (09:56 +0000)]
Replicate the APIs of ScalarTargetTransformInfo and
VectorTargetTransformInfo into the TargetTransformInfo pass,
implementing them be delegating back out to the two subobjects.

This is the first step to folding the interfaces together and making
TargetTransformInfo a normal analysis pass (specifically an analysis
group which targets can provide target-specific analysis pass
implementations of).

No callers are migrated here, this just stubs out the interface. Next
step will be to migrate all the callers to directly operate on TTI
instead of STTI or VTTI respectively. That will allow replacing the
machinery for delivering TTI without changing every caller at once.

WIP, I promise all the duplicated interfaces will be removed in the end,
this just decouples the steps of the process.

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