Devang Patel [Wed, 26 Jan 2011 18:20:04 +0000 (18:20 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124300
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 26 Jan 2011 15:38:49 +0000 (15:38 +0000)]
[AVX] Support EXTRACT_SUBVECTOR on x86. This provides a default
implementation of EXTRACT_SUBVECTOR for x86, going through the stack
in a similr fashion to how the codegen implements BUILD_VECTOR.
Eventually this will get matched to VEXTRACTF128 if AVX is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124292
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 26 Jan 2011 13:53:38 +0000 (13:53 +0000)]
Add encoding testcases for ARM vcvtr variations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124289
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 26 Jan 2011 13:28:14 +0000 (13:28 +0000)]
fix the encoding and add testcases for ARM nop, yield, wfe and wfi instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124288
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 26 Jan 2011 10:08:38 +0000 (10:08 +0000)]
Fix PR9039, a use-after-free in reassociate. The issue was that the
operand being factorized (and erased) could occur several times in Ops,
resulting in freed memory being used when the next occurrence in Ops was
analyzed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124287
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 26 Jan 2011 09:23:19 +0000 (09:23 +0000)]
AttrListPtr has an overloaded operator== which does this for us, we should use
it. No functionality change!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124286
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 26 Jan 2011 09:13:58 +0000 (09:13 +0000)]
Teach mergefunc that intptr_t is the same width as a pointer. We still can't
merge vector<intptr_t>::push_back() and vector<void*>::push_back() because
Enumerate() doesn't realize that "i64* null" and "i8** null" are equivalent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124285
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 26 Jan 2011 08:50:18 +0000 (08:50 +0000)]
There are no vectors of pointer or arrays, so we don't need to check vector
elements for type equivalence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124284
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 26 Jan 2011 08:44:16 +0000 (08:44 +0000)]
APInt has a method for determining whether a number is a power of 2
which is more efficient than countPopulation - use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124283
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 26 Jan 2011 08:40:22 +0000 (08:40 +0000)]
Fix memory corruption. If one of the SCEV creation functions calls another but
doesn't return immediately after then the insert position in UniqueSCEVs will
be out of date. No test because this is a memory corruption issue. Fixes PR9051!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124282
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 26 Jan 2011 02:58:39 +0000 (02:58 +0000)]
Separate out the constant bonus from the size reduction metrics. Rework
a few loops accordingly. Should be no functional change.
This is a step for more accurate cost/benefit analysis of devirt/inlining
bonuses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124275
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 26 Jan 2011 02:06:22 +0000 (02:06 +0000)]
Add needed braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124273
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 26 Jan 2011 02:04:09 +0000 (02:04 +0000)]
Target/X86: Tweak win64's tailcall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124272
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 26 Jan 2011 02:03:48 +0000 (02:03 +0000)]
TableGen: PointerLikeRegClass can be accepted to operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124271
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 26 Jan 2011 02:03:37 +0000 (02:03 +0000)]
Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124270
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 26 Jan 2011 01:28:06 +0000 (01:28 +0000)]
lib/Target/X86/X86RegisterInfo.cpp: Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124268
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 26 Jan 2011 01:27:58 +0000 (01:27 +0000)]
lib/Target/X86/X86RegisterInfo.cpp: Fix a typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124267
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 26 Jan 2011 01:09:59 +0000 (01:09 +0000)]
Coding style formatting changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124260
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 26 Jan 2011 00:50:53 +0000 (00:50 +0000)]
Rename member variables to follow the rest of LLVM.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124257
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 25 Jan 2011 23:27:42 +0000 (23:27 +0000)]
Provide an interface to transfer SDDbgValue from one SDNode to another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124245
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 25 Jan 2011 22:05:41 +0000 (22:05 +0000)]
[AVX] Fix a typo in the extract subvector type constraints to specify
the correct number of operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124234
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 25 Jan 2011 21:48:36 +0000 (21:48 +0000)]
Revert 124230. It was causing test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124233
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 25 Jan 2011 21:27:46 +0000 (21:27 +0000)]
The floating point value is encoded in its binary form as an Imm. Convert it
appropriately so that it prints out the decimal representation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124230
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 25 Jan 2011 21:26:41 +0000 (21:26 +0000)]
Add support for parsing a Real value. It stores the Real value as its binary
encoding. It's up to the individual back-ends to convert it to their preferred
representation when printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124229
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Jan 2011 19:09:56 +0000 (19:09 +0000)]
Move unnamed_addr after the function arguments on Sabre's request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124209
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 25 Jan 2011 18:09:58 +0000 (18:09 +0000)]
Resolve DanglingDbgValue of PHI nodes where the use follows dbg.value intrinisic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124203
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 25 Jan 2011 18:09:33 +0000 (18:09 +0000)]
This assertion is too restrictive, it does not apply for dangling dbg value nodes (nodes where dbg.value intrinsic preceds use of the value).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124202
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 25 Jan 2011 16:16:32 +0000 (16:16 +0000)]
[AVX] Add TableGen classes for vector/subvector type constraints.
This will be used to check patterns referencing a forthcoming
INSERT_SUBVECTOR SDNode and will also be used to check
EXTRACT_SUBVECTOR nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124191
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 25 Jan 2011 15:14:15 +0000 (15:14 +0000)]
In which I discover that zero+zero is zero, d'oh!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124188
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 25 Jan 2011 14:33:33 +0000 (14:33 +0000)]
Avoid compiler errors when this header file is included first, by adding
a forward declaration of simplify_type<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124187
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 25 Jan 2011 12:31:43 +0000 (12:31 +0000)]
Turn off this test - the corresponding instsimplify logic has been
disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124185
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 25 Jan 2011 12:15:09 +0000 (12:15 +0000)]
See if this fixes llvm-gcc bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124184
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 25 Jan 2011 09:38:29 +0000 (09:38 +0000)]
According to my auto-simplifier the most common missed simplifications in
optimized code are:
(non-negative number)+(power-of-two) != 0 -> true
and
(x | 1) != 0 -> true
Instcombine knows about the second one of course, but only does it if X|1
has only one use. These fire thousands of times in the testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124183
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 25 Jan 2011 08:56:50 +0000 (08:56 +0000)]
Teach mergefunc how to emit aliases safely again -- but keep it turned it off
for now. It's controlled by the HasGlobalAliases variable which is not attached
to any flag yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124182
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 25 Jan 2011 01:34:31 +0000 (01:34 +0000)]
Reorganize this so that the early exit and special cases come early
rather than interspersed. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124168
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 25 Jan 2011 01:28:33 +0000 (01:28 +0000)]
Don't merge restore with tail call instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124167
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 24 Jan 2011 23:26:31 +0000 (23:26 +0000)]
tblgen/AsmMatcherEmitter: Fix alias handling to honor -match-prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124154
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 24 Jan 2011 22:38:45 +0000 (22:38 +0000)]
Provide correct registers for EH stuff on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124151
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 24 Jan 2011 22:38:40 +0000 (22:38 +0000)]
Support printing exception section into the current one. This is the case when LSDASection is blank
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124150
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 24 Jan 2011 22:19:14 +0000 (22:19 +0000)]
Perhaps a bit too much vertical whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124148
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 24 Jan 2011 20:53:18 +0000 (20:53 +0000)]
[AVX] Add type checking support for vector/subvector type constraints.
This will be used to check patterns referencing a forthcoming
INSERT_SUBVECTOR SDNode. INSERT_SUBVECTOR in turn is very useful for
matching to VINSERTF128 instructions and complements the already
existing EXTRACT_SUBVECTOR SDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124145
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 24 Jan 2011 20:04:37 +0000 (20:04 +0000)]
Speculatively revert r124138.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124142
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Jan 2011 19:40:38 +0000 (19:40 +0000)]
Jörg Sonnenberger noticed that we were missing this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124139
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 24 Jan 2011 19:24:37 +0000 (19:24 +0000)]
Resolve DanglingDbgValue of PHI nodes where the use follows dbg.value intrinisic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124138
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 24 Jan 2011 19:08:15 +0000 (19:08 +0000)]
Temporarily workaround JM/lencod miscompile (SIGSEGV).
rdar://problem/
8893967
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124137
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 24 Jan 2011 18:53:32 +0000 (18:53 +0000)]
Give GetUnderlyingObject a TargetData, to keep it in sync
with BasicAA's DecomposeGEPExpression, which recently began
using a TargetData. This fixes PR8968, though the testcase
is awkward to reduce.
Also, update several off GetUnderlyingObject's users
which happen to have a TargetData handy to pass it in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124134
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2011 18:36:51 +0000 (18:36 +0000)]
fix PR8928 by clearing a stale map, patch by Jakub Staszak!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124132
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 24 Jan 2011 18:04:33 +0000 (18:04 +0000)]
Testcase for dragonegg commit 124128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124129
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Jan 2011 18:02:54 +0000 (18:02 +0000)]
Handle strings in section names the same way as gas:
* If the name is a single string, we remove the quotes
* If the name starts without a quote, we include any quotes in the name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124127
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 24 Jan 2011 17:54:18 +0000 (17:54 +0000)]
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124126
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 24 Jan 2011 17:54:01 +0000 (17:54 +0000)]
Add another rdar number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124125
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 24 Jan 2011 17:27:17 +0000 (17:27 +0000)]
Support/CommandLine: Fix LookupNearestOption to also search extra option names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2011 03:42:46 +0000 (03:42 +0000)]
fix a missing shuffle pattern, PR9009. Patch by Artiom Myaskouvskey!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124102
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2011 03:37:34 +0000 (03:37 +0000)]
merge all the "crash tests" into crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124101
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2011 03:29:07 +0000 (03:29 +0000)]
fix PR9017, a bug where we'd assert when promoting in unreachable
code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124100
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2011 03:18:24 +0000 (03:18 +0000)]
fix PR9015, a crash linking recursive metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124099
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2011 02:32:00 +0000 (02:32 +0000)]
this isn't a memset, we do convert dest[i] to one though :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2011 01:12:18 +0000 (01:12 +0000)]
with recent work, we now optimize this into:
define i32 @foo(i32 %x) nounwind readnone ssp {
entry:
%tobool = icmp eq i32 %x, 0
%tmp5 = select i1 %tobool, i32 2, i32 1
ret i32 %tmp5
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124091
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2011 01:07:11 +0000 (01:07 +0000)]
enhance SRoA to promote allocas that are used by PHI nodes. This often
occurs because instcombine sinks loads and inserts phis. This kicks in
on such apps as 175.vpr, eon, 403.gcc, xalancbmk and a bunch of times in
spec2006 in some app that uses std::deque.
This resolves the last of rdar://
7339113.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124090
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2011 22:04:55 +0000 (22:04 +0000)]
Enhance SRoA to promote allocas that are used by selects in some
common cases. This triggers a surprising number of times in SPEC2K6
because min/max idioms end up doing this. For example, code from the
STL ends up looking like this to SRoA:
%202 = load i64* %__old_size, align 8, !tbaa !3
%203 = load i64* %__old_size, align 8, !tbaa !3
%204 = load i64* %__n, align 8, !tbaa !3
%205 = icmp ult i64 %203, %204
%storemerge.i = select i1 %205, i64* %__n, i64* %__old_size
%206 = load i64* %storemerge.i, align 8, !tbaa !3
We can now promote both the __n and the __old_size allocas.
This addresses another chunk of rdar://
7339113, poor codegen on
stringswitch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124088
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2011 21:15:29 +0000 (21:15 +0000)]
teach Value::isDereferenceablePointer that byval arguments are always
dereferencable, noticed by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124085
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 23 Jan 2011 20:31:00 +0000 (20:31 +0000)]
Add a memset loop that LoopIdiomRecognize doesn't recognize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124082
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 23 Jan 2011 20:06:05 +0000 (20:06 +0000)]
Simplify some code with no functionality change. Make the test a lot more
robust against smarter optimizations, using the power of FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124081
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Jan 2011 18:50:12 +0000 (18:50 +0000)]
Initialize MCNoExecStack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124079
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Jan 2011 17:55:27 +0000 (17:55 +0000)]
Add support for the --noexecstack option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124077
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 23 Jan 2011 17:05:06 +0000 (17:05 +0000)]
Null initialize a few variables flagged by
clang's -Wuninitialized-experimental warning.
While these don't look like real bugs, clang's
-Wuninitialized-experimental analysis is stricter
than GCC's, and these fixes have the benefit
of being general nice cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124073
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Jan 2011 16:11:25 +0000 (16:11 +0000)]
Add support for lowercase variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2011 08:27:54 +0000 (08:27 +0000)]
Enhance SRoA to be more aggressive about scalarization of aggregate allocas
that have PHI or select uses of their element pointers. This can often happen
when instcombine sinks two loads into a successor, inserting a phi or select.
With this patch, we can scalarize the alloca, but the pinned elements are not
yet promoted. This is still a win for large aggregates where only one element
is used. This fixes rdar://
8904039 and part of rdar://
7339113 (poor codegen
on stringswitch).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124070
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 23 Jan 2011 08:03:04 +0000 (08:03 +0000)]
Convert two std::vectors to SmallVectors for a 3.4% speedup running -scalarrepl
on test-suite + SPEC2000 & SPEC2006.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124068
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2011 07:29:29 +0000 (07:29 +0000)]
have AllocaInfo store the alloca being inspected, simplifying callers.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2011 07:05:44 +0000 (07:05 +0000)]
Rearrange some code a bit. Change MarkUnsafe to
handle the "Transformation preventing inst" printing,
so that -scalarrepl -debug will always print the rejected
instruction. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124066
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 23 Jan 2011 06:54:22 +0000 (06:54 +0000)]
Convert a std::vector to a SmallVector for another 5.4% speedup on domtree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124065
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2011 06:40:33 +0000 (06:40 +0000)]
remove an old hack that avoided creating MMX datatypes. The
X86 backend has been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124064
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 23 Jan 2011 06:20:19 +0000 (06:20 +0000)]
Use value ranges to fold ext(trunc) in SCEV when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124062
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 23 Jan 2011 06:16:06 +0000 (06:16 +0000)]
In the simpler version of the link-eval data structure that we use in dominator
computation, the Ancestor field is always set to the Parent, so we can remove
the explicit link entirely and merge the Parent and Ancestor fields. Instead of
checking for whether an ancestor exists for a node or not, we simply check
whether the node has already been processed. This is simpler if Compress is
inlined into Eval, so I did that as well.
This is about a 3% speedup running -domtree on test-suite + SPEC2000 & SPEC2006,
but it also opens up some opportunities for further improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124061
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Jan 2011 05:43:40 +0000 (05:43 +0000)]
Delay the creation of eh_frame so that the user can change the defaults.
Add support for SHT_X86_64_UNWIND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124059
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 23 Jan 2011 05:11:18 +0000 (05:11 +0000)]
Remove useless struct fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124058
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 23 Jan 2011 04:54:34 +0000 (04:54 +0000)]
Remove friend declaration for removed function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124057
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Jan 2011 04:43:11 +0000 (04:43 +0000)]
Remove more duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124056
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 23 Jan 2011 04:30:59 +0000 (04:30 +0000)]
Convert a std::vector to a SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124055
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Jan 2011 04:28:49 +0000 (04:28 +0000)]
Remove duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124054
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 23 Jan 2011 04:13:53 +0000 (04:13 +0000)]
Simplify some code now that we've removed the more optimal (but slower) version
of the link-eval data structure from dominator computation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124053
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 22 Jan 2011 22:06:21 +0000 (22:06 +0000)]
Have SCEV turn sext(x) into zext(x) when x is s>= 0. This applies many times in
"make check" alone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124046
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 22 Jan 2011 21:56:53 +0000 (21:56 +0000)]
Add a FIXME explaining the move to a single indirect call bonus per function
that we can change from indirect to direct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124045
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 22 Jan 2011 21:17:33 +0000 (21:17 +0000)]
Only apply the devirtualization bonus once instead of per-call site in the
target function.
Fixes part of rdar://
8546196
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124044
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sat, 22 Jan 2011 13:05:16 +0000 (13:05 +0000)]
Pass sret arguments through the stack instead of through registers in Sparc backend. It makes the code generated more compliant with the sparc32 ABI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124030
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 22 Jan 2011 12:13:28 +0000 (12:13 +0000)]
Remove dead ivar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124028
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sat, 22 Jan 2011 11:36:24 +0000 (11:36 +0000)]
Added ICC, FCC as uses of movcc instruction to generate correct code when -mattr=v9 is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124027
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 22 Jan 2011 09:44:32 +0000 (09:44 +0000)]
ARM uses '.' in their tokens. Give it a name instead of a numeric value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124026
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2011 01:47:25 +0000 (01:47 +0000)]
add DW_TAG for rvalue refs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124019
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 21 Jan 2011 22:07:57 +0000 (22:07 +0000)]
Actually check memcpy lengths, instead of just commenting about
how they should be checked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123999
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Fri, 21 Jan 2011 22:00:00 +0000 (22:00 +0000)]
Sparc backend:
Rename FLUSH to FLUSHW.
Output "ta 3" instead of a "flushw" instruction if v8 instruction set is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123997
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 21 Jan 2011 19:39:42 +0000 (19:39 +0000)]
Just because we have determined that an (fcmp | fcmp) is true for A < B,
A == B, and A > B, does not mean we can fold it to true. We still need to
check for A ? B (A unordered B).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123993
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 21 Jan 2011 18:55:51 +0000 (18:55 +0000)]
Last round of fixes for movw + movt global address codegen.
1. Fixed ARM pc adjustment.
2. Fixed dynamic-no-pic codegen
3. CSE of pc-relative load of global addresses.
It's now enabled by default for Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123991
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 21 Jan 2011 18:25:47 +0000 (18:25 +0000)]
Clang was not parsing target triples involving EABI and was generating wrong IR (wrong PCS) and passing the wrong information down llc via the target-triple printed in IR. I've fixed this by adding the parsing of EABI into LLVM's Triple class and using it to choose the correct PCS in Clang's Tools. A Clang patch is on its way to use this infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123990
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Fri, 21 Jan 2011 15:42:54 +0000 (15:42 +0000)]
Handles libffi on the CMake build.
Patch by arrowdodger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123976
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 21 Jan 2011 14:07:40 +0000 (14:07 +0000)]
Fix the encoding of QADD/SUB, QDADD/SUB. While qadd16, qadd8 use "rd, rn, rm",
qadd and qdadd uses "rd, rm, rn", the same applies to the 'sub' variants. This
is described in ARM manuals and matches the encoding used by the gnu assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123975
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Fri, 21 Jan 2011 14:00:01 +0000 (14:00 +0000)]
Implement support for byval arguments in Sparc backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123974
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 21 Jan 2011 08:38:09 +0000 (08:38 +0000)]
SCCP doesn't actually preserve the CFG. It will delete and insert terminator
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123973
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 21 Jan 2011 06:27:04 +0000 (06:27 +0000)]
Revert "Object: Renable the tests now that none of the build bots complain about aliasing."
This reverts commit
281f3901b7b0869929caf8946c1ad1228bc38922.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123972
91177308-0d34-0410-b5e6-
96231b3b80d8