Chad Rosier [Tue, 2 Oct 2012 00:25:57 +0000 (00:25 +0000)]
Fix 80-column violations. Cleanup whitespace in generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164983
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 1 Oct 2012 23:45:51 +0000 (23:45 +0000)]
[ms-inline asm] Add the convertToMapAndConstraints() function that is used to
map constraints and MCInst operands to inline asm operands. This replaces the
getMCInstOperandNum() function.
The logic to determine the constraints are not in place, so we still default to
a register constraint (i.e., "r"). Also, we no longer build the MCInst but
rather return just the opcode to get the MCInstrDesc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164979
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 1 Oct 2012 22:48:07 +0000 (22:48 +0000)]
test/CodeGen/X86/red-zone2.ll: Add -mtriple=x86_64-linux, and FileCheck-ize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164975
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 1 Oct 2012 22:20:54 +0000 (22:20 +0000)]
MachO: direct-to-object attribute for data-in-code markers.
The target backend can support data-in-code load commands even when
the assembler doesn't, or vice-versa. Allow targets to opt-in for
direct-to-object.
PR13973.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164974
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 1 Oct 2012 21:35:06 +0000 (21:35 +0000)]
checking test case for r164811. was an omission to not check this in. this was already approved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 1 Oct 2012 20:53:03 +0000 (20:53 +0000)]
[ms-inline asm] Expose the getReg() function in the base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164969
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 1 Oct 2012 19:59:21 +0000 (19:59 +0000)]
[Docs] Update File Headers section to cover doxygen style file level docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164964
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 1 Oct 2012 18:40:32 +0000 (18:40 +0000)]
Re-enable support for --program-prefix.
The Apple buildbots have been modified not to pass --target,
so they shouldn't choke on a default program prefix anymore.
Patch by Rick Foos!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164956
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 1 Oct 2012 17:07:51 +0000 (17:07 +0000)]
Forgot the SPIR test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164949
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 1 Oct 2012 17:01:31 +0000 (17:01 +0000)]
Add in support for SPIR to LLVM core. This adds a new target and two new calling conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164948
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Mon, 1 Oct 2012 16:44:04 +0000 (16:44 +0000)]
Fix PR13899
- Update maximal stack alignment when stack arguments are prepared before a
call.
- Test cases are enhanced to show it's not a Win32 specific issue but a generic
one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164946
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 1 Oct 2012 15:14:14 +0000 (15:14 +0000)]
Provide a shortcut for MCObjectStreamer when emitting fills.
Reduces runtime of i386-large-relocations.s by 10x in Release builds, even more
in Debug+Asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164945
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 1 Oct 2012 12:30:45 +0000 (12:30 +0000)]
Fix more misspellings found by Duncan during review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164940
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 1 Oct 2012 12:24:42 +0000 (12:24 +0000)]
Make this plural. Spotted by Duncan in review (and a very old typo, this
is the second time I've moved this comment around...)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164939
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 1 Oct 2012 12:21:54 +0000 (12:21 +0000)]
Prune some unnecessary includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164938
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 1 Oct 2012 12:16:54 +0000 (12:16 +0000)]
Fix several issues with alignment. We weren't always accounting for type
alignment requirements of the new alloca. As one consequence which was
reported as a bug by Duncan, we overaligned memcpy calls to ranges of
allocas after they were rewritten to types with lower alignment
requirements. Other consquences are possible, but I don't have any test
cases for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164937
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 1 Oct 2012 11:56:16 +0000 (11:56 +0000)]
TargetData: s/uint32_t/unsigned/ per Kuba's request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164935
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 1 Oct 2012 11:31:48 +0000 (11:31 +0000)]
SimplifyCFG: Don't crash when forming a switch bitmap with an undef default value.
Fixes PR13985.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164934
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 1 Oct 2012 10:54:05 +0000 (10:54 +0000)]
Factor the PHI and select speculation into a separate rewriter. This
could probably be factored still further to hoist this logic into
a generic helper, but currently I don't have particularly clean ideas
about how to handle that.
This at least allows us to drop custom load rewriting from the
speculation logic, which in turn allows the existing load rewriting
logic to fire. In theory, this could enable vector promotion or other
tricks after speculation occurs, but I've not dug into such issues. This
is primarily just cleaning up the factoring of the code and the
resulting logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164933
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 1 Oct 2012 07:33:27 +0000 (07:33 +0000)]
Use constants for all return values in switch. Allows clang to optimize it into a lookup table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164926
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 1 Oct 2012 01:49:22 +0000 (01:49 +0000)]
Refactor the PartitionUse structure to actually use the Use* instead of
a pair of instructions, one for the used pointer and the second for the
user. This simplifies the representation and also makes it more dense.
This was noticed because of the miscompile in PR13926. In that case, we
were running up against a fundamental "bad idea" in the speculation of
PHI and select instructions: the speculation and rewriting are
interleaved, which requires phi speculation to also perform load
rewriting! This is bad, and causes us to miss opportunities to do (for
example) vector rewriting only exposed after PHI speculation, etc etc.
It also, in the old system, required us to insert *new* load uses into
the current partition's use list, which would then be ignored during
rewriting because we had already extracted an end iterator for the use
list. The appending behavior (and much of the other oddities) stem from
the strange de-duplication strategy in the PartitionUse builder.
Amusingly, all this went without notice for so long because it could
only be triggered by having *different* GEPs into the same partition of
the same alloca, where both different GEPs were operands of a single
PHI, and where the GEP which was not encountered first also had multiple
uses within that same PHI node... Hence the insane steps required to
reproduce.
So, step one in fixing this fundamental bad idea is to make the
PartitionUse actually contain a Use*, and to make the builder do proper
deduplication instead of funky de-duplication. This is enough to remove
the appending behavior, and fix the miscompile in PR13926, but there is
more work to be done here. Subsequent commits will lift the speculation
into its own visitor. It'll be a useful step toward potentially
extracting all of the speculation logic into a generic utility
transform.
The existing PHI test case for repeated operands has been made more
extreme to catch even these issues. This test case, run through the old
pass, will exactly reproduce the miscompile from PR13926. ;] We were so
close here!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164925
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sun, 30 Sep 2012 21:24:57 +0000 (21:24 +0000)]
Use dyn_cast instead of isa and cast.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164924
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 30 Sep 2012 21:03:56 +0000 (21:03 +0000)]
SimplifyCFG: Enumerating all predecessors of a BB can be expensive (switches), avoid it if possible.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164923
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 30 Sep 2012 20:51:02 +0000 (20:51 +0000)]
RST docs: convert HTML escapes to plain text in code examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164922
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 30 Sep 2012 20:43:24 +0000 (20:43 +0000)]
Sphinx CSS: remove negative letter-spacing, it makes some fonts look really
bad. Fonts already have appropriate tracking built-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164921
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sun, 30 Sep 2012 20:42:13 +0000 (20:42 +0000)]
Fix && to && in Coding Standards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164920
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 30 Sep 2012 19:49:56 +0000 (19:49 +0000)]
Change getX86SubSuperRegister to take an MVT::SimpleValueType rather than an EVT and add llvm_unreachable to the switches. Helps it compile to dramatically better code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164919
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 30 Sep 2012 17:31:56 +0000 (17:31 +0000)]
ArgumentPromotion: Remove ancient workaround for a bug in the C backend.
Fun fact: The CBE learned how to deal with this situation before it was removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164918
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 30 Sep 2012 07:30:10 +0000 (07:30 +0000)]
Ignore apparent buffer overruns on external or weak globals. This is a major
source of false positives due to globals being declared in a header with some
kind of incomplete (small) type, but the actual definition being bigger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164912
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 30 Sep 2012 07:17:56 +0000 (07:17 +0000)]
Revert r164910 because it causes failures to several phase2 builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164911
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 30 Sep 2012 06:24:14 +0000 (06:24 +0000)]
A DAGCombine optimization for merging consecutive stores. This optimization is not profitable in many cases
because moden processos can store multiple values in parallel, and preparing the consecutive store requires
some work. We only handle these cases:
1. Consecutive stores where the values and consecutive loads. For example:
int a = p->a;
int b = p->b;
q->a = a;
q->b = b;
2. Consecutive stores where the values are constants. Foe example:
q->a = 4;
q->b = 5;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164910
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 29 Sep 2012 21:43:49 +0000 (21:43 +0000)]
Add LLVM support for Swift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164899
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 29 Sep 2012 21:27:31 +0000 (21:27 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164898
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 29 Sep 2012 19:57:14 +0000 (19:57 +0000)]
Shrink TargetAlignElem a bit, we do a lot of searches on them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164897
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 29 Sep 2012 10:41:21 +0000 (10:41 +0000)]
Fix a somewhat surprising miscompile where code relying on an ABI
alignment could lose it due to the alloca type moving down to a much
smaller alignment guarantee.
Now SROA will actively compute a proper alignment, factoring the target
data, any explicit alignment, and the offset within the struct. This
will in some cases lower the alignment requirements, but when we lower
them below those of the type, we drop the alignment entirely to give
freedom to the code generator to align it however is convenient.
Thanks to Duncan for the lovely test case that pinned this down. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164891
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 29 Sep 2012 10:25:35 +0000 (10:25 +0000)]
Speculatively revert commit 164885 (nadav) in the hope of ressurecting a pile of
buildbots. Original commit message:
A DAGCombine optimization for merging consecutive stores. This optimization is not profitable in many cases
because moden processos can store multiple values in parallel, and preparing the consecutive store requires
some work. We only handle these cases:
1. Consecutive stores where the values and consecutive loads. For example:
int a = p->a;
int b = p->b;
q->a = a;
q->b = b;
2. Consecutive stores where the values are constants. Foe example:
q->a = 4;
q->b = 5;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164890
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Sep 2012 07:18:53 +0000 (07:18 +0000)]
Tidy up to match coding standards. Remove 'else' after 'return' and moving operators to end of preceding line. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164887
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Sep 2012 06:54:22 +0000 (06:54 +0000)]
Replace a couple if/elses around similar calls with conditional operators on the varying arguments. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164886
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 29 Sep 2012 06:33:25 +0000 (06:33 +0000)]
A DAGCombine optimization for merging consecutive stores. This optimization is not profitable in many cases
because moden processos can store multiple values in parallel, and preparing the consecutive store requires
some work. We only handle these cases:
1. Consecutive stores where the values and consecutive loads. For example:
int a = p->a;
int b = p->b;
q->a = a;
q->b = b;
2. Consecutive stores where the values are constants. Foe example:
q->a = 4;
q->b = 5;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164885
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Sep 2012 02:25:34 +0000 (02:25 +0000)]
Remove more LLVM_DELETED_FUNCTIONs from destructors to fix -std=c++11 build on gcc 4.7.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164880
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 29 Sep 2012 00:12:08 +0000 (00:12 +0000)]
Add test case for r164850.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164867
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 28 Sep 2012 23:58:57 +0000 (23:58 +0000)]
Do not delete BBs if their addresses are taken. rdar://
12396696
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164866
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 28 Sep 2012 22:30:18 +0000 (22:30 +0000)]
Don't use bit-wise operations to query for inclusion/exclusion of attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164860
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 28 Sep 2012 21:23:26 +0000 (21:23 +0000)]
GlobalDCE should be run at -O2 / -Os to eliminate unused dtor, etc. rdar://
9142819
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164850
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 28 Sep 2012 21:23:16 +0000 (21:23 +0000)]
MIPS DSP: add operands to make sure instruction strings are being matched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164849
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 28 Sep 2012 21:22:24 +0000 (21:22 +0000)]
Remove unused methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164848
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 28 Sep 2012 21:18:37 +0000 (21:18 +0000)]
docs: dedent list on index.rst
In reStructuredText, indented blocks denote block quotes [1]. This list
is not a block quote.
[1]. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164847
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 28 Sep 2012 20:50:31 +0000 (20:50 +0000)]
MIPS DSP: other miscellaneous instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164845
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 28 Sep 2012 20:26:33 +0000 (20:26 +0000)]
Testcase for r164835
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164842
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 28 Sep 2012 20:16:04 +0000 (20:16 +0000)]
MIPS DSP: ADDUH.QB instruction sub-class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164840
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 28 Sep 2012 18:53:24 +0000 (18:53 +0000)]
X86: when replacing SUB with TEST in ISelDAGToDAG, only replace uses of the
second output of SUB with first output of TEST.
PR13966
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164835
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 28 Sep 2012 17:35:20 +0000 (17:35 +0000)]
Removing dependency on third party library for Intel JIT event support.
Patch committed on behalf of Kirill Uhanov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164831
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 28 Sep 2012 16:40:29 +0000 (16:40 +0000)]
PackedVector: Make the BitVector implementation configurable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164826
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 28 Sep 2012 15:36:41 +0000 (15:36 +0000)]
Provide malloc-free sentinels for the SparseBitVector internals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164823
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 28 Sep 2012 14:15:28 +0000 (14:15 +0000)]
Replace the use of strncpy() and sprintf() with std::string and LLVM streams.
Patch by Martinez, Javier E.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164822
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 28 Sep 2012 10:42:50 +0000 (10:42 +0000)]
CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. If the it's the condition of a SwitchInst, reload it.
Fixes PR13972.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164818
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 28 Sep 2012 10:10:46 +0000 (10:10 +0000)]
Make backtraces work again with both the configure and cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164817
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 28 Sep 2012 10:01:27 +0000 (10:01 +0000)]
GlobalOpt: non-constexpr bitcasts or GEPs can occur even if the global value is only stored once.
Fixes PR13968.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164815
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 28 Sep 2012 09:33:53 +0000 (09:33 +0000)]
Surprisingly, we missed a trivial case here. Fix that!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164814
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 28 Sep 2012 07:17:01 +0000 (07:17 +0000)]
Remove a LLVM_DELETED_FUNCTION from destructor to fix -std=c++11 build on gcc 4.7.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164813
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Fri, 28 Sep 2012 02:26:24 +0000 (02:26 +0000)]
1. Add load/store words from the stack
2. As part of this, added assembly format FEXT_RI16_SP_explicit_ins and
moved other lines for FEXT_RI16 formats to be in the right place in the code.
3. Added mayLoad and mayStore assignements for the load/store instructions added and for ones already there that did not have this assignment.
4. Another patch will deal with the problem of load/store byte/halfword to the stack. This is a particular Mips16 problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164811
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 27 Sep 2012 23:31:32 +0000 (23:31 +0000)]
Remove <def,read-undef> flags from partial redefinitions.
The new coalescer can turn a full virtual register definition into a
partial redef by merging another value into an unused vector lane.
Make sure to clear the <read-undef> flag on such defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164807
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 27 Sep 2012 22:14:10 +0000 (22:14 +0000)]
Fix more crlf issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164805
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 27 Sep 2012 21:21:31 +0000 (21:21 +0000)]
instcombine: Add more test cases for __strncpy_chk simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164800
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 27 Sep 2012 21:21:28 +0000 (21:21 +0000)]
instcombine: Add more test cases for __strcpy_chk simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164799
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 27 Sep 2012 21:21:25 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memmove_chk simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164798
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 27 Sep 2012 21:21:21 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memcpy_chk simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164797
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 27 Sep 2012 21:21:18 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memset_chk simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164796
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 27 Sep 2012 21:06:02 +0000 (21:06 +0000)]
Enable the new coalescer algorithm by default.
The new coalescer is better at merging values into unused vector lanes,
improving NEON code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164794
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 27 Sep 2012 21:05:59 +0000 (21:05 +0000)]
Don't dereference begin() on an empty vector.
The fix is obvious and the only test case I have is horrible, so I am
not including it. The problem shows up when self-hosting clang on i386
with -new-coalescer enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164793
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 19:09:21 +0000 (19:09 +0000)]
MIPS DSP: ABSQ_S.PH instruction sub-class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164787
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 19:05:08 +0000 (19:05 +0000)]
MIPS DSP: SHLL.QB instruction sub-class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164786
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 27 Sep 2012 18:29:58 +0000 (18:29 +0000)]
Fix a integer overflow in SimplifyCFG's look up table formation logic.
If the width is very large it gets truncated from uint64_t to uint32_t when
passed to TD->fitsInLegalInteger. The truncated value can fit in a register.
This manifested in massive memory usage or crashes (PR13946).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164784
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 27 Sep 2012 17:51:02 +0000 (17:51 +0000)]
Fix CRLF issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164782
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 27 Sep 2012 16:34:19 +0000 (16:34 +0000)]
Avoid dereferencing a NULL pointer.
Fixes PR13943.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164778
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 27 Sep 2012 15:05:49 +0000 (15:05 +0000)]
Patch for HowToBuildOnARM documentation from Wei-Ren Chen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164776
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Thu, 27 Sep 2012 10:14:43 +0000 (10:14 +0000)]
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: en.wikipedia.org/wiki/If_and_only_if Commit 164767
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Thu, 27 Sep 2012 09:59:43 +0000 (09:59 +0000)]
Fix a typo 'iff' => 'if'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 27 Sep 2012 08:33:56 +0000 (08:33 +0000)]
Prefer shuffles to selects. Backends love shuffles!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164763
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 27 Sep 2012 07:22:30 +0000 (07:22 +0000)]
Add constructors to the attribute builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164762
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 27 Sep 2012 06:33:40 +0000 (06:33 +0000)]
Add missing function CreateFPCast to the TargetFolder. It's there in the other
folders and not having it here fails to compile if you actually try to use it.
Also, CreatePointerCast was failing to do the part where it does TD-aware
constant folding. Granted there is exactly one case where that it will ever
do anything, but there's no reason to skip it. For reference, that case is a
subtraction between two constant offsets on the same global variable, eg.,
"&A[123] - &A[4].f".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164760
91177308-0d34-0410-b5e6-
96231b3b80d8
Jush Lu [Thu, 27 Sep 2012 05:21:41 +0000 (05:21 +0000)]
[arm-fast-isel] Add support for ELF PIC.
This is a preliminary step towards ELF support; currently ARMFastISel hasn't
been used for ELF object files yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164759
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 04:12:30 +0000 (04:12 +0000)]
Test case for r164755 and 164756.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164757
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 04:08:42 +0000 (04:08 +0000)]
MIPS DSP: rddsp (instruction which reads DSPControl register fields to a GPR).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164756
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 03:58:34 +0000 (03:58 +0000)]
MIPS DSP: CMPU.EQ.QB instruction sub-class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164755
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 03:13:59 +0000 (03:13 +0000)]
MIPS DSP: ADDU.QB instruction sub-class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164754
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 02:15:57 +0000 (02:15 +0000)]
MIPS DSP: Branch on Greater Than or Equal To Value 32 in DSPControl Pos Field instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164751
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 02:11:20 +0000 (02:11 +0000)]
MIPS DSP: all the remaining instructions which read or write accumulators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164750
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 02:05:42 +0000 (02:05 +0000)]
MIPS DSP: add support for extract-word instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164749
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 02:01:10 +0000 (02:01 +0000)]
MIPS DSP: add functions which decode DSP and accumulator registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164748
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 01:59:07 +0000 (01:59 +0000)]
MIPS DSP: add code necessary for pseudo instruction lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164747
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 01:56:38 +0000 (01:56 +0000)]
MIPS DSP: add bitcast patterns between vectors and int.
No test cases. These patterns will get tested along with dsp intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164746
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 27 Sep 2012 01:50:59 +0000 (01:50 +0000)]
MIPS DSP: add vector load/store patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164744
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 26 Sep 2012 23:43:56 +0000 (23:43 +0000)]
Fix of hang during Intel JIT profiling
Committed on behalf of Kirill Uhanov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164736
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 26 Sep 2012 23:38:00 +0000 (23:38 +0000)]
Buildbot Fix.
This method can be called with a '0' argument which checks the return
value. However, the method it calls doesn't expect '0' as a valid value. Call the
correct method when it's 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164735
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 26 Sep 2012 22:43:04 +0000 (22:43 +0000)]
Disable the new SROA pass to get the tree back in working order. We don't yet
have testcases for the current problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164731
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 26 Sep 2012 22:17:14 +0000 (22:17 +0000)]
Add IRBuilder code for adding !tbaa.struct metadata tags to llvm.memcpy calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164728
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 26 Sep 2012 22:15:19 +0000 (22:15 +0000)]
Query the parameter attributes directly instead of using the Attribute symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164727
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 26 Sep 2012 21:48:26 +0000 (21:48 +0000)]
Remove the `hasFnAttr' method from Function.
The hasFnAttr method has been replaced by querying the Attributes explicitly. No
intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164725
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 26 Sep 2012 21:27:45 +0000 (21:27 +0000)]
X86_32: Large Symbol+Offset relocations.
If the offset is more than 24-bits, it won't fit in a scattered
relocation offset field, so we fall back to using a non-scattered
relocation.
rdar://
12358909
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164724
91177308-0d34-0410-b5e6-
96231b3b80d8