oota-llvm.git
11 years agoAttributes Rewrite
Bill Wendling [Mon, 15 Oct 2012 04:46:55 +0000 (04:46 +0000)]
Attributes Rewrite

Convert the internal representation of the Attributes class into a pointer to an
opaque object that's uniqued by and stored in the LLVMContext object. The
Attributes class then becomes a thin wrapper around this opaque
object. Eventually, the internal representation will be expanded to include
attributes that represent code generation options, etc.

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

11 years agoinstcombine: Migrate strcmp and strncmp optimizations
Meador Inge [Mon, 15 Oct 2012 03:47:37 +0000 (03:47 +0000)]
instcombine: Migrate strcmp and strncmp optimizations

This patch migrates the strcmp and strncmp optimizations from the
simplify-libcalls pass into the instcombine library call simplifier.

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

11 years agoUpdate CMake build.
Benjamin Kramer [Sun, 14 Oct 2012 16:06:09 +0000 (16:06 +0000)]
Update CMake build.

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

11 years agoFix a typo that made ImmutableMap::getMaxElement() useless.
Benjamin Kramer [Sun, 14 Oct 2012 15:56:39 +0000 (15:56 +0000)]
Fix a typo that made ImmutableMap::getMaxElement() useless.

Add a basic unit test for ImmutableMap. Found by inspection.

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

11 years agoSimplify code. No functionality change.
Benjamin Kramer [Sun, 14 Oct 2012 11:15:42 +0000 (11:15 +0000)]
Simplify code. No functionality change.

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

11 years agoUnquadratize SetVector removal loops in DSE.
Benjamin Kramer [Sun, 14 Oct 2012 10:21:31 +0000 (10:21 +0000)]
Unquadratize SetVector removal loops in DSE.

Erasing from the beginning or middle of the vector is expensive, remove_if can
do it in linear time even though it's a bit ugly without lambdas.

No functionality change.

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

11 years agoRemove dead methods.
Bill Wendling [Sun, 14 Oct 2012 09:21:44 +0000 (09:21 +0000)]
Remove dead methods.

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

11 years agoRemove operator cast method in favor of querying with the correct method.
Bill Wendling [Sun, 14 Oct 2012 08:54:26 +0000 (08:54 +0000)]
Remove operator cast method in favor of querying with the correct method.

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

11 years agoFix use after free when deleting attributes in a chained folding set.
Benjamin Kramer [Sun, 14 Oct 2012 08:48:40 +0000 (08:48 +0000)]
Fix use after free when deleting attributes in a chained folding set.

Can't follow the intrusive linked list when the element is gone.

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

11 years agoDon't use the new syntax just yet.
Bill Wendling [Sun, 14 Oct 2012 08:25:35 +0000 (08:25 +0000)]
Don't use the new syntax just yet.

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

11 years agoRemove the bitwise AND operators from the Attributes class. Replace it with the equiv...
Bill Wendling [Sun, 14 Oct 2012 07:52:48 +0000 (07:52 +0000)]
Remove the bitwise AND operators from the Attributes class. Replace it with the equivalent from the builder class.

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

11 years agoRemove the bitwise assignment OR operator from the Attributes class. Replace it with...
Bill Wendling [Sun, 14 Oct 2012 07:35:59 +0000 (07:35 +0000)]
Remove the bitwise assignment OR operator from the Attributes class. Replace it with the equivalent from the builder class.

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

11 years agoRemove the bitwise OR operator from the Attributes class. Replace it with the equival...
Bill Wendling [Sun, 14 Oct 2012 07:17:34 +0000 (07:17 +0000)]
Remove the bitwise OR operator from the Attributes class. Replace it with the equivalent from the builder class.

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

11 years agoRemove the bitwise XOR operator from the Attributes class. Replace it with the equiva...
Bill Wendling [Sun, 14 Oct 2012 06:56:13 +0000 (06:56 +0000)]
Remove the bitwise XOR operator from the Attributes class. Replace it with the equivalent from the builder class.

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

11 years agoRemove the bitwise NOT operator from the Attributes class. Replace it with the equiva...
Bill Wendling [Sun, 14 Oct 2012 06:39:53 +0000 (06:39 +0000)]
Remove the bitwise NOT operator from the Attributes class. Replace it with the equivalent from the builder class.

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

11 years agoDecode the LLVM attributes from bitcode using the attributes builder.
Bill Wendling [Sun, 14 Oct 2012 04:10:01 +0000 (04:10 +0000)]
Decode the LLVM attributes from bitcode using the attributes builder.

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

11 years agoUse builder to create alignment attributes. Remove dead function.
Bill Wendling [Sun, 14 Oct 2012 03:58:29 +0000 (03:58 +0000)]
Use builder to create alignment attributes. Remove dead function.

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

11 years agoRemove dead method.
Bill Wendling [Sun, 14 Oct 2012 03:28:43 +0000 (03:28 +0000)]
Remove dead method.

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

11 years agoDon't pass in an Attributes object to something that expects an integral value.
Bill Wendling [Sun, 14 Oct 2012 03:27:15 +0000 (03:27 +0000)]
Don't pass in an Attributes object to something that expects an integral value.

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

11 years agoRemove unused private field.
Benjamin Kramer [Sat, 13 Oct 2012 18:03:34 +0000 (18:03 +0000)]
Remove unused private field.

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

11 years agoX86: Depending on the local semantics of .align this test can also emit a nopl instea...
Benjamin Kramer [Sat, 13 Oct 2012 17:38:00 +0000 (17:38 +0000)]
X86: Depending on the local semantics of .align this test can also emit a nopl instead of nopw.

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

11 years agoDocumentation: Lexicon.rst: add "BB Vectorization" and "TBAA".
Dmitri Gribenko [Sat, 13 Oct 2012 17:34:49 +0000 (17:34 +0000)]
Documentation: Lexicon.rst: add "BB Vectorization" and "TBAA".

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

11 years agoX86: Disable long nops for all cpus prior to pentiumpro/i686.
Benjamin Kramer [Sat, 13 Oct 2012 17:28:35 +0000 (17:28 +0000)]
X86: Disable long nops for all cpus prior to pentiumpro/i686.

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

11 years agoDrop <def,dead> flags when merging into an unused lane.
Jakob Stoklund Olesen [Sat, 13 Oct 2012 17:26:47 +0000 (17:26 +0000)]
Drop <def,dead> flags when merging into an unused lane.

The new coalescer can merge a dead def into an unused lane of an
otherwise live vector register.

Clear the <dead> flag when that happens since the flag refers to the
full virtual register which is still live after the partial dead def.

This fixes PR14079.

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

11 years agoinstcombine: Migrate strchr and strrchr optimizations
Meador Inge [Sat, 13 Oct 2012 16:45:37 +0000 (16:45 +0000)]
instcombine: Migrate strchr and strrchr optimizations

This patch migrates the strchr and strrchr optimizations from the
simplify-libcalls pass into the instcombine library call simplifier.

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

11 years agoinstcombine: Migrate strcat and strncat optimizations
Meador Inge [Sat, 13 Oct 2012 16:45:32 +0000 (16:45 +0000)]
instcombine: Migrate strcat and strncat optimizations

This patch migrates the strcat and strncat optimizations from the
simplify-libcalls pass into the instcombine library call simplifier.

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

11 years agoImplement new LibCallSimplifier class
Meador Inge [Sat, 13 Oct 2012 16:45:24 +0000 (16:45 +0000)]
Implement new LibCallSimplifier class

This patch implements the new LibCallSimplifier class as outlined in [1].
In addition to providing the new base library simplification infrastructure,
all the fortified library call simplifications were moved over to the new
infrastructure.  The rest of the library simplification optimizations will
be moved over with follow up patches.

NOTE: The original fortified library call simplifier located in the
SimplifyFortifiedLibCalls class was not removed because it is still
used by CodeGenPrepare.  This class will eventually go away too.

[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052283.html

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

11 years agoAllow for loops in LiveIntervals::pruneValue().
Jakob Stoklund Olesen [Sat, 13 Oct 2012 16:15:31 +0000 (16:15 +0000)]
Allow for loops in LiveIntervals::pruneValue().

It is possible that the live range of the value being pruned loops back
into the kill MBB where the search started. When that happens, make sure
that the beginning of KillMBB is also pruned.

Instead of starting a DFS at KillMBB and skipping the root of the
search, start a DFS at each KillMBB successor, and allow the search to
loop back to KillMBB.

This fixes PR14078.

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

11 years agoX86: Fix accidentally swapped operands.
Benjamin Kramer [Sat, 13 Oct 2012 12:50:19 +0000 (12:50 +0000)]
X86: Fix accidentally swapped operands.

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

11 years agoTeach SROA to cope with wrapper aggregates. These show up a lot in ABI
Chandler Carruth [Sat, 13 Oct 2012 10:49:33 +0000 (10:49 +0000)]
Teach SROA to cope with wrapper aggregates. These show up a lot in ABI
type coercion code, especially when targetting ARM. Things like [1
x i32] instead of i32 are very common there.

The goal of this logic is to ensure that when we are picking an alloca
type, we look through such wrapper aggregates and across any zero-length
aggregate elements to find the simplest type possible to form a type
partition.

This logic should (generally speaking) rarely fire. It only ends up
kicking in when an alloca is accessed using two different types (for
instance, i32 and float), and the underlying alloca type has wrapper
aggregates around it. I noticed a significant amount of this occurring
looking at stepanov_abstraction generated code for arm, and suspect it
happens elsewhere as well.

Note that this doesn't yet address truly heinous IR productions such as
PR14059 is concerning. Those result in mismatched *sizes* of types in
addition to mismatched access and alloca types.

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

11 years agoSpeculatively harden the conversion logic. I have no idea if this will
Chandler Carruth [Sat, 13 Oct 2012 10:49:30 +0000 (10:49 +0000)]
Speculatively harden the conversion logic. I have no idea if this will
help the dragonegg builders, and no test case at this point, but this
was one dimly plausible case I spotted by inspection. Hopefully will get
a testcase from those bots soon-ish, and will tidy this up with proper
testing.

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

11 years agoX86: Promote i8 cmov when both operands are coming from truncates of the same width.
Benjamin Kramer [Sat, 13 Oct 2012 10:39:49 +0000 (10:39 +0000)]
X86: Promote i8 cmov when both operands are coming from truncates of the same width.

X86 doesn't have i8 cmovs so isel would emit a branch. Emitting branches at this
level is often not a good idea because it's too late for many optimizations to
kick in. This solution doesn't add any extensions (truncs are free) and tries
to avoid introducing partial register stalls by filtering direct copyfromregs.

I'm seeing a ~10% speedup on reading a random .png file with libpng15 via
graphicsmagick on x86_64/westmere, but YMMV depending on the microarchitecture.

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

11 years agoSilence a warning in -assert builds.
Chandler Carruth [Sat, 13 Oct 2012 05:09:27 +0000 (05:09 +0000)]
Silence a warning in -assert builds.

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

11 years agoClean up how we rewrite loads and stores to the whole alloca. When these
Chandler Carruth [Sat, 13 Oct 2012 02:41:05 +0000 (02:41 +0000)]
Clean up how we rewrite loads and stores to the whole alloca. When these
are single value types, the load and store should be directly based upon
the alloca and then bitcasting can fix the type as needed afterward.
This might in theory improve some of the IR coming out of SROA, but
I don't expect big changes yet and don't have any test cases on hand.
This is really just a cleanup/refactoring patch. The next patch will
cause this code path to be hit a lot more, actually get SROA to promote
more allocas and include several more test cases.

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

11 years ago[ms-inline asm] Remove the MatchInstruction() function. Previously, this was
Chad Rosier [Sat, 13 Oct 2012 00:26:04 +0000 (00:26 +0000)]
[ms-inline asm]  Remove the MatchInstruction() function.  Previously, this was
the interface between the front-end and the MC layer when parsing inline
assembly.  Unfortunately, this is too deep into the parsing stack. Specifically,
we're unable to handle target-independent assembly (i.e., assembly directives,
labels, etc.).  Note the MatchAndEmitInstruction() isn't the correct
abstraction either.  I'll be exposing target-independent hooks shortly, so this
is really just a cleanup.

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

11 years agoCheck section type rather than assuming it's code when emitting sections while proces...
Andrew Kaylor [Fri, 12 Oct 2012 23:53:16 +0000 (23:53 +0000)]
Check section type rather than assuming it's code when emitting sections while processing relocations.

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

11 years agoARM: tail-call inside a function where part of a byval argument is on caller's
Manman Ren [Fri, 12 Oct 2012 23:39:43 +0000 (23:39 +0000)]
ARM: tail-call inside a function where part of a byval argument is on caller's
local frame causes problem.

For example:
void f(StructToPass s) {
  g(&s, sizeof(s));
}
will cause problem with tail-call since part of s is passed via registers and
saved in f's local frame. When g tries to access s, part of s may be corrupted
since f's local frame is popped out before the tail-call.

The current fix is to disable tail-call if getVarArgsRegSaveSize is not 0 for
the caller. This is a conservative approach, if we can prove the address of
s or part of s is not taken and passed to g, it should be okay to perform
tail-call.

rdar://12442472

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

11 years ago[ms-inline asm] Capitalize per coding standard.
Chad Rosier [Fri, 12 Oct 2012 23:09:25 +0000 (23:09 +0000)]
[ms-inline asm] Capitalize per coding standard.

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

11 years agoFix buildbots: -misched=shuffle is only available in +Asserts builds.
Jakob Stoklund Olesen [Fri, 12 Oct 2012 23:01:33 +0000 (23:01 +0000)]
Fix buildbots: -misched=shuffle is only available in +Asserts builds.

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

11 years agoARM: Mark VSELECT as 'expand'.
Jim Grosbach [Fri, 12 Oct 2012 22:59:21 +0000 (22:59 +0000)]
ARM: Mark VSELECT as 'expand'.

The backend already pattern matches to form VBSL when it can. We may want to
teach it to use the vbsl intrinsics at some point to prevent machine licm from
mucking with this, but using the Expand is completely correct.

http://llvm.org/bugs/show_bug.cgi?id=13831
http://llvm.org/bugs/show_bug.cgi?id=13961

Patch by Peter Couperus <peter.couperus@st.com>.

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

11 years ago[ms-inline asm] Use the new API introduced in r165830 in lieu of the
Chad Rosier [Fri, 12 Oct 2012 22:53:36 +0000 (22:53 +0000)]
[ms-inline asm] Use the new API introduced in r165830 in lieu of the
MapAndConstraints vector.  Also remove the unused Kind argument.

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

11 years ago[ms-inline asm] Add a few data members and member functions to the
Chad Rosier [Fri, 12 Oct 2012 22:15:11 +0000 (22:15 +0000)]
[ms-inline asm] Add a few data members and member functions to the
MCParsedAsmOperand class in support of ms-style inline assembly.

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

11 years agoUse MACOSX_DEPLOYMENT_TARGET when it is set. <rdar://problem/12433905>
Bob Wilson [Fri, 12 Oct 2012 21:48:14 +0000 (21:48 +0000)]
Use MACOSX_DEPLOYMENT_TARGET when it is set. <rdar://problem/12433905>

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

11 years agoCorrecting enum values mentioned in comments.
Andrew Kaylor [Fri, 12 Oct 2012 21:47:49 +0000 (21:47 +0000)]
Correcting enum values mentioned in comments.
Patch by Ashok Thirumurthi.

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

11 years agoUse a transposed algorithm for handleMove().
Jakob Stoklund Olesen [Fri, 12 Oct 2012 21:31:57 +0000 (21:31 +0000)]
Use a transposed algorithm for handleMove().

Completely update one interval at a time instead of collecting live
range fragments to be updated. This avoids building data structures,
except for a single SmallPtrSet of updated intervals.

Also share code between handleMove() and handleMoveIntoBundle().

Add support for moving dead defs across other live values in the
interval. The MI scheduler can do that.

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

11 years agoAdd bitcode instruction encoding documentation for module version
Jan Wen Voung [Fri, 12 Oct 2012 18:13:17 +0000 (18:13 +0000)]
Add bitcode instruction encoding documentation for module version
0 and 1.  Followup to 165739.

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

11 years agoFix coalescing with IMPLICIT_DEF values.
Jakob Stoklund Olesen [Fri, 12 Oct 2012 18:03:04 +0000 (18:03 +0000)]
Fix coalescing with IMPLICIT_DEF values.

PHIElimination inserts IMPLICIT_DEF instructions to guarantee that all
PHI predecessors have a live-out value. These IMPLICIT_DEF values are
not considered to be real interference when coalescing virtual
registers:

  %vreg1 = IMPLICIT_DEF
  %vreg2 = MOV32r0

When joining %vreg1 and %vreg2, the IMPLICIT_DEF instruction and its
value number should simply be erased since the %vreg2 value number now
provides a live-out value for the PHI predecesor block.

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

11 years agoChange (!list.size() == 0) to (!list.empty()). No functional change.
Richard Trieu [Fri, 12 Oct 2012 17:57:35 +0000 (17:57 +0000)]
Change (!list.size() == 0) to (!list.empty()).  No functional change.

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

11 years agoSet default CPU for Darwin targets with LTO. <rdar://problem/12457841>
Bob Wilson [Fri, 12 Oct 2012 17:39:25 +0000 (17:39 +0000)]
Set default CPU for Darwin targets with LTO. <rdar://problem/12457841>

This is a temporary hack until Bill's project to record command line options
in the LLVM IR is ready. Clang currently sets a default CPU but that isn't
recorded anywhere and it doesn't get used in the final LTO compilation.

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

11 years agollvm/test/CodeGen/PowerPC/2012-10-12-bitcast.ll: Try to fix failure on non-ppc hosts...
NAKAMURA Takumi [Fri, 12 Oct 2012 16:01:08 +0000 (16:01 +0000)]
llvm/test/CodeGen/PowerPC/2012-10-12-bitcast.ll: Try to fix failure on non-ppc hosts, to add -mattr=+altivec.

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

11 years agoFix big-endian codegen bug in DAGTypeLegalizer::ExpandRes_BITCAST
Ulrich Weigand [Fri, 12 Oct 2012 15:42:58 +0000 (15:42 +0000)]
Fix big-endian codegen bug in DAGTypeLegalizer::ExpandRes_BITCAST

On PowerPC, a bitcast of <16 x i8> to i128 may run through a code
path in ExpandRes_BITCAST that attempts to do an intermediate
bitcast to a <4 x i32> vector, and then construct the Hi and Lo parts
of the resulting i128 by pairing up two of those i32 vector elements
each.  The code already recognizes that on a big-endian system, the
first two vector elements form the Hi part, and the final two vector
elements form the Lo part (vice-versa from the little-endian situation).

However, we also need to take endianness into account when forming each
of those separate pairs:  on a big-endian system, vector element 0 is
the *high* part of the pair making up the Hi part of the result, and
vector element 1 is the low part of the pair.  The code currently always
uses vector element 0 as the low part and vector element 1 as the high
part, as is appropriate for little-endian platforms only.

This patch fixes this by swapping the vector elements as they are
paired up as appropriate.

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

11 years agoExceptionDemo.cpp: Use Function::setDoesNotReturn(). Attributes stuff was updated.
NAKAMURA Takumi [Fri, 12 Oct 2012 14:11:48 +0000 (14:11 +0000)]
ExceptionDemo.cpp: Use Function::setDoesNotReturn(). Attributes stuff was updated.

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

11 years agoExceptionDemo.cpp: Whitespace.
NAKAMURA Takumi [Fri, 12 Oct 2012 14:11:43 +0000 (14:11 +0000)]
ExceptionDemo.cpp: Whitespace.

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

11 years agoAdd powerpc-ibm-aix to Triple. Patch by Kai.
Duncan Sands [Fri, 12 Oct 2012 11:08:57 +0000 (11:08 +0000)]
Add powerpc-ibm-aix to Triple.  Patch by Kai.

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

11 years agoAdd float-abi and softfloat options to lli
Tim Northover [Fri, 12 Oct 2012 09:55:13 +0000 (09:55 +0000)]
Add float-abi and softfloat options to lli

Patch by Amara Emerson.

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

11 years agoJITTest.cpp: Use LLVM_ATTRIBUTE_USED, rather than __attribute__ directly!
NAKAMURA Takumi [Fri, 12 Oct 2012 08:09:29 +0000 (08:09 +0000)]
JITTest.cpp: Use LLVM_ATTRIBUTE_USED, rather than __attribute__ directly!

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

11 years agoShuffle the virtual destructor down to the base. This should actually pacify
Nick Lewycky [Fri, 12 Oct 2012 04:28:25 +0000 (04:28 +0000)]
Shuffle the virtual destructor down to the base. This should actually pacify
-Wnon-virtual-dtor for real.

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

11 years agoGive this class full of virtual functions a virtual destructor. Classes love
Nick Lewycky [Fri, 12 Oct 2012 04:13:25 +0000 (04:13 +0000)]
Give this class full of virtual functions a virtual destructor. Classes love
virtual destructors.

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

11 years agoIndenting.
Eric Christopher [Fri, 12 Oct 2012 02:04:47 +0000 (02:04 +0000)]
Indenting.

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

11 years agofix warning
Sebastian Pop [Fri, 12 Oct 2012 02:04:32 +0000 (02:04 +0000)]
fix warning

DependenceAnalysis.cpp:1164:32: warning: implicit truncation from 'int' to bitfield changes value from -5 to 3
      [-Wconstant-conversion]
    Result.DV[Level].Direction &= ~Dependence::DVEntry::GT;
                               ^  ~~~~~~~~~~~~~~~~~~~~~~~~

Patch from Preston Briggs <preston.briggs@gmail.com>.

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

11 years agoDiv, Rem int/unsigned int
Reed Kotler [Fri, 12 Oct 2012 02:01:09 +0000 (02:01 +0000)]
Div, Rem int/unsigned int

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

11 years agodocs: Update example to conform to coding standards.
Sean Silva [Fri, 12 Oct 2012 01:55:51 +0000 (01:55 +0000)]
docs: Update example to conform to coding standards.

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

11 years agoMark function as 'used' so that LTO doesn't try to get rid of it.
Bill Wendling [Fri, 12 Oct 2012 01:44:08 +0000 (01:44 +0000)]
Mark function as 'used' so that LTO doesn't try to get rid of it.

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

11 years agoRevert r165777, "Mark function as 'used' so that LTO doesn't try to get rid of it."
NAKAMURA Takumi [Fri, 12 Oct 2012 01:34:07 +0000 (01:34 +0000)]
Revert r165777, "Mark function as 'used' so that LTO doesn't try to get rid of it."

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

11 years agodocs: Minor clean up of Phabricator documentation.
Sean Silva [Fri, 12 Oct 2012 01:21:24 +0000 (01:21 +0000)]
docs: Minor clean up of Phabricator documentation.

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

11 years agoLegalizer optimize a pair of div / mod to a call to divrem libcall if they are
Evan Cheng [Fri, 12 Oct 2012 01:15:47 +0000 (01:15 +0000)]
Legalizer optimize a pair of div / mod to  a call to divrem libcall if they are
not legal. However, it should use a div instruction + mul + sub if divide is
legal. The rem legalization code was missing a check and incorrectly uses a
divrem libcall even when div is legal.

rdar://12481395

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

11 years agoMark function as 'used' so that LTO doesn't try to get rid of it.
Bill Wendling [Fri, 12 Oct 2012 01:15:17 +0000 (01:15 +0000)]
Mark function as 'used' so that LTO doesn't try to get rid of it.

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

11 years agoWe need this symbol after an LTO build.
Bill Wendling [Fri, 12 Oct 2012 01:06:33 +0000 (01:06 +0000)]
We need this symbol after an LTO build.

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

11 years agodocs: Add SphinxQuickstartTemplate.rst.
Sean Silva [Fri, 12 Oct 2012 00:53:48 +0000 (00:53 +0000)]
docs: Add SphinxQuickstartTemplate.rst.

The intent of this document is to be the go-to document for anybody who
wants to write new documentation, but isn't familiar with Sphinx.

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

11 years agodocs: Improve HowToSetUpLLVMStyleRTTI.
Sean Silva [Thu, 11 Oct 2012 23:30:52 +0000 (23:30 +0000)]
docs: Improve HowToSetUpLLVMStyleRTTI.

* Fix confusing explanation regarding abstract classes.

* Clarify auto-upcasting and why `Shape` doesn't need a `classof()`.

* Add section `Rules of Thumb` with some quick summary tips.

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

11 years agoRemove unnecessary classof()'s
Sean Silva [Thu, 11 Oct 2012 23:30:49 +0000 (23:30 +0000)]
Remove unnecessary classof()'s

isa<> et al. automatically infer when the cast is an upcast (including a
self-cast), so these are no longer necessary.

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

11 years agodocs: Update HowToSetUpLLVMStyleRTTI.
Sean Silva [Thu, 11 Oct 2012 23:30:41 +0000 (23:30 +0000)]
docs: Update HowToSetUpLLVMStyleRTTI.

Recent changes to isa<>/dyn_cast<> have made unnecessary those classof()
of the form:

    static bool classof(const Foo *) { return true; }

Accordingly, remove mention of such classof() from the documentation.

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

11 years agoCasting.h: Automatically handle isa<Base>(Derived).
Sean Silva [Thu, 11 Oct 2012 23:30:40 +0000 (23:30 +0000)]
Casting.h: Automatically handle isa<Base>(Derived).

Additionally, all such cases are handled with no dynamic check.

All `classof()` of the form

    class Foo {
      [...]
      static bool classof(const Bar *) { return true; }
      [...]
    }

where Foo is an ancestor of Bar are no longer necessary.
Don't write them!

Note: The exact test is `is_base_of<Foo, Bar>`, which is non-strict, so
that Foo is considered an ancestor of itself.

This leads to the following rule of thumb for LLVM-style RTTI:

    The argument type of `classof()` should be a strict ancestor.

For more information about implementing LLVM-style RTTI, see
docs/HowToSetUpLLVMStyleRTTI.rst

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

11 years agoRemove buggy classof().
Sean Silva [Thu, 11 Oct 2012 23:30:38 +0000 (23:30 +0000)]
Remove buggy classof().

This classof() is effectively saying that a MachineCodeEmitter "is-a"
JITEmitter, but JITEmitter is in fact a descendant of
MachineCodeEmitter, so this is not semantically correct. Consequently,
none of the assertions that rely on these classof() actualy check
anything.

Remove the RTTI (which didn't actually check anything) and use
static_cast<> instead.

Post-Mortem Bug Analysis
========================

Cause of the bug
----------------

r55022 appears to be the source of the classof() and assertions removed
by this commit. It aimed at removing some dynamic_cast<> that were
solely in the assertions. A typical diff hunk from that commit looked
like:

  -  assert(dynamic_cast<JITEmitter*>(MCE) && "Unexpected MCE?");
  -  JITEmitter *JE = static_cast<JITEmitter*>(getCodeEmitter());
  +  assert(isa<JITEmitter>(MCE) && "Unexpected MCE?");
  +  JITEmitter *JE = cast<JITEmitter>(getCodeEmitter());

Hence, the source of the bug then seems to be an attempt to replace
dynamic_cast<> with LLVM-style RTTI without properly setting up the
class hierarchy for LLVM-style RTTI. The bug therefore appears to be
simply a "thinko".

What initially indicated the presence of the bug
------------------------------------------------

After implementing automatic upcasting for isa<>, classof() functions of
the form

  static bool classof(const Foo *) { return true; }

were removed, since they only serve the purpose of optimizing
statically-OK upcasts. A subsequent recompilation triggered a build
failure on the isa<> tests within the removed asserts, since the
automatic upcasting (correctly) failed to substitute this classof().

Key to pinning down the root cause of the bug
---------------------------------------------

After being alerted to the presence of the bug, some thought about the
semantics which were being asserted by the buggy classof() revealed that
it was incorrect.

How the bug could have been prevented
-------------------------------------

This bug could have been prevented by better documentation for how to
set up LLVM-style RTTI. This should be solved by the recently added
documentation HowToSetUpLLVMStyleRTTI. However, this bug suggests that
the documentation should clearly explain the contract that classof()
must fulfill. The HowToSetUpLLVMStyleRTTI already explains this
contract, but it is a little tucked away. A future patch will expand
that explanation and make it more prominent.

There does not appear to be a simple way to have the compiler prevent
this bug, since fundamentally it boiled down to a spurious classof()
where the programmer made an erroneous statement about the conversion.
This suggests that perhaps the interface to LLVM-style RTTI of classof()
is not the best. There is already some evidence for this, since in a
number of places Clang has classof() forward to classofKind(Kind K)
which evaluates the cast in terms of just the Kind. This could probably
be generalized to simply a `static const Kind MyKind;` field in leaf
classes and `static const Kind firstMyKind, lastMyKind;` for non-leaf
classes, and have the rest of the work be done inside Casting.h,
assuming that the Kind enum is laid out in a preorder traversal of the
inheritance tree.

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

11 years agoPGO: create metadata for switch only if it has more than one targets.
Manman Ren [Thu, 11 Oct 2012 22:28:34 +0000 (22:28 +0000)]
PGO: create metadata for switch only if it has more than one targets.

When all cases of a switch statement are dead, the weights vector only has one
element, and we will get an ssertion failure when calling createBranchWeights.

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

11 years agoRemove extra semicolon.
Chad Rosier [Thu, 11 Oct 2012 22:26:44 +0000 (22:26 +0000)]
Remove extra semicolon.

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

11 years agoRemove extra semicolons.
Chad Rosier [Thu, 11 Oct 2012 22:25:56 +0000 (22:25 +0000)]
Remove extra semicolons.

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

11 years agoFix some typos 165739, spotted by Duncan.
Jan Wen Voung [Thu, 11 Oct 2012 21:45:16 +0000 (21:45 +0000)]
Fix some typos 165739, spotted by Duncan.

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

11 years agoRevert 165732 for further review.
Micah Villmow [Thu, 11 Oct 2012 21:27:41 +0000 (21:27 +0000)]
Revert 165732 for further review.

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

11 years agoChange encoding of instruction operands in bitcode binaries to be relative
Jan Wen Voung [Thu, 11 Oct 2012 20:20:40 +0000 (20:20 +0000)]
Change encoding of instruction operands in bitcode binaries to be relative
to the instruction position.  The old encoding would give an absolute
ID which counts up within a function, and only resets at the next function.

I.e., Instead of having:

... = icmp eq i32 n-1, n-2
br i1 ..., label %bb1, label %bb2

it will now be roughly:

... = icmp eq i32 1, 2
br i1 1, label %bb1, label %bb2

This makes it so that ids remain relatively small and can be encoded
in fewer bits.

With this encoding, forward reference operands will be given
negative-valued IDs.  Use signed VBRs for the most common case
of forward references, which is phi instructions.

To retain backward compatibility we bump the bitcode version
from 0 to 1 to distinguish between the different encodings.

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

11 years agoAdds Phabricator documentation. This is a first step that answers many questions...
Manuel Klimek [Thu, 11 Oct 2012 19:40:46 +0000 (19:40 +0000)]
Adds Phabricator documentation. This is a first step that answers many questions we have seen.

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

11 years agoAdd in the first iteration of support for llvm/clang/lldb to allow variable per addre...
Micah Villmow [Thu, 11 Oct 2012 17:21:41 +0000 (17:21 +0000)]
Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.

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

11 years agoPass an explicit operand number to addLiveIns.
Jakob Stoklund Olesen [Thu, 11 Oct 2012 16:46:07 +0000 (16:46 +0000)]
Pass an explicit operand number to addLiveIns.

Not all instructions define a virtual register in their first operand.
Specifically, INLINEASM has a different format.

<rdar://problem/12472811>

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

11 years agoThis patch addresses PR13947.
Bill Schmidt [Thu, 11 Oct 2012 15:38:20 +0000 (15:38 +0000)]
This patch addresses PR13947.

For function calls on the 64-bit PowerPC SVR4 target, each parameter
is mapped to as many doublewords in the parameter save area as
necessary to hold the parameter.  The first 13 non-varargs
floating-point values are passed in registers; any additional
floating-point parameters are passed in the parameter save area.  A
single-precision floating-point parameter (32 bits) must be mapped to
the second (rightmost, low-order) word of its assigned doubleword
slot.

Currently LLVM violates this ABI requirement by mapping such a
parameter to the first (leftmost, high-order) word of its assigned
doubleword slot.  This is internally self-consistent but will not
interoperate correctly with libraries compiled with an ABI-compliant
compiler.

This patch corrects the problem by adjusting the parameter addressing
on both sides of the calling convention.

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

11 years agoAdd test cases for correct parsing of register names in 32- and 64-bit modes.
David Chisnall [Thu, 11 Oct 2012 12:42:49 +0000 (12:42 +0000)]
Add test cases for correct parsing of register names in 32- and 64-bit modes.

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

11 years agoExpose move to/from coprocessor instructions in MIPS64 mode.
David Chisnall [Thu, 11 Oct 2012 10:21:34 +0000 (10:21 +0000)]
Expose move to/from coprocessor instructions in MIPS64 mode.

Note: [D]M{T,F}CP2 is just a recommended encoding.  Vendors often provide a
custom CP2 that interprets instructions differently and may wish to add their
own instructions that use this opcode.  We should ensure that this is easy to
do.  I will probably add a 'has custom CP{0-3}' subtarget flag to make this
easy: We want to avoid the GCC situation where every MIPS vendor makes a custom
fork that breaks every other MIPS CPU and so can't be merged upstream.

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

11 years agollvm/Analysis/Passes.h: Fix copypasto in createDependenceAnalysisPass().
NAKAMURA Takumi [Thu, 11 Oct 2012 08:26:52 +0000 (08:26 +0000)]
llvm/Analysis/Passes.h: Fix copypasto in createDependenceAnalysisPass().

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

11 years agodependence analysis
Sebastian Pop [Thu, 11 Oct 2012 07:32:34 +0000 (07:32 +0000)]
dependence analysis

Patch from Preston Briggs <preston.briggs@gmail.com>.

This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.

It's a fairly complete implementation of the paper

    Practical Dependence Testing
    Gina Goff, Ken Kennedy, and Chau-Wen Tseng
    PLDI 1991

It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).

It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.

Included in the patch file are many test cases, commented with C code showing
the loops and array references.

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

11 years agoFollow the same routine to add target float expansion hook
Michael Liao [Thu, 11 Oct 2012 07:22:01 +0000 (07:22 +0000)]
Follow the same routine to add target float expansion hook

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

11 years agomisched: Handle "transient" non-instructions.
Andrew Trick [Thu, 11 Oct 2012 05:37:06 +0000 (05:37 +0000)]
misched: Handle "transient" non-instructions.

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

11 years agoDon't crash when !tbaa.struct contents is invalid.
Nick Lewycky [Thu, 11 Oct 2012 02:05:23 +0000 (02:05 +0000)]
Don't crash when !tbaa.struct contents is invalid.

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

11 years agoRevert r165661, "Patch by Shuxin Yang <shuxin.llvm@gmail.com>."
NAKAMURA Takumi [Thu, 11 Oct 2012 02:02:05 +0000 (02:02 +0000)]
Revert r165661, "Patch by Shuxin Yang <shuxin.llvm@gmail.com>."

It broke stage2 clang and test-suite/MultiSource/Benchmarks/mediabench/g721/g721encode.

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

11 years agoGettingStarted.rst: s/&amp;/&/g
NAKAMURA Takumi [Thu, 11 Oct 2012 01:10:37 +0000 (01:10 +0000)]
GettingStarted.rst: s/&amp;/&/g

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

11 years agoGettingStarted.rst: Fix the label to DeveloperPolicy.html.
NAKAMURA Takumi [Thu, 11 Oct 2012 01:10:27 +0000 (01:10 +0000)]
GettingStarted.rst: Fix the label to DeveloperPolicy.html.

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

11 years agoAdd the LLVM context to this c'tor. It will be needed in the future.
Bill Wendling [Thu, 11 Oct 2012 01:10:00 +0000 (01:10 +0000)]
Add the LLVM context to this c'tor. It will be needed in the future.

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

11 years agoSupport a common idiom on how to build an Attributes class with a single attribute.
Bill Wendling [Thu, 11 Oct 2012 01:05:52 +0000 (01:05 +0000)]
Support a common idiom on how to build an Attributes class with a single attribute.

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

11 years agoDon't crash if a .ll file contains a forward-reference that looks like a global
Nick Lewycky [Thu, 11 Oct 2012 00:38:25 +0000 (00:38 +0000)]
Don't crash if a .ll file contains a forward-reference that looks like a global
value but later turns out to be a function.

Unfortunately, we can't fold tests into a single file because we only get one
error out of llvm-as.

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

11 years agoChange MachineInstrBuilder::addDisp to copy over target flags by default.
Evan Cheng [Thu, 11 Oct 2012 00:15:48 +0000 (00:15 +0000)]
Change MachineInstrBuilder::addDisp to copy over target flags by default.

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

11 years agoAdd isel patterns for v2f32 / v4f32 neon.vbsl intrinsics. rdar://12471808
Evan Cheng [Wed, 10 Oct 2012 23:06:34 +0000 (23:06 +0000)]
Add isel patterns for v2f32 / v4f32 neon.vbsl intrinsics. rdar://12471808

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

11 years agoAdd getters for the MIPS TargetTransform classes
Nadav Rotem [Wed, 10 Oct 2012 22:45:53 +0000 (22:45 +0000)]
Add getters for the MIPS TargetTransform classes

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