OSDN Git Service
Shih-wei Liao [Fri, 22 Oct 2010 23:32:11 +0000 (16:32 -0700)]
Falsify the enable-assertion.
Change-Id: I3c19e4b09fa8e4bd7832b409f9fe50f5b75922a6
Zonr Chang [Fri, 22 Oct 2010 12:03:37 +0000 (20:03 +0800)]
Add target build of libLLVMLinker.
Adding LOCAL_MODULE_TAGS := optional, for it to pass the tag checking.
This increase ~24KB on libbcc.so.
Change-Id: I3dcfeb3aa843d597050663752caacf7545e09ff0
Shih-wei Liao [Wed, 13 Oct 2010 18:50:43 +0000 (11:50 -0700)]
Fix Bug #
3092270. Make clang and llvm agree on v128.
Change-Id: I50deafde09216b09ce6cb8762b31601fb62b6a51
Zonr Chang [Sun, 10 Oct 2010 08:10:00 +0000 (16:10 +0800)]
Fix VFP register encoding.
A VFP register in Rd/Rn/Rm is encoded as (Vd:D)/(Vn:N)/(Vm:M) if it's a
single-precision register, (D:Vd)/(N:Vn)/(M:Vn) if it's a double-precision
register.
Change-Id: Ib6c2ea23328b5e71012ea8b1375c38700100c96b
Zonr Chang [Fri, 8 Oct 2010 12:12:54 +0000 (20:12 +0800)]
Include $(CLANG_ROOT_PATH)/include in llvm-host-build.mk using tblgen.
Zonr Chang [Fri, 8 Oct 2010 12:10:42 +0000 (20:10 +0800)]
Add some missing files for host build.
Shih-wei Liao [Thu, 16 Sep 2010 00:59:48 +0000 (17:59 -0700)]
To get address mode's S-bit, we should use ">=" instead of "!=".
This is in order to prevent missing S bit in ARM code generation.
Change-Id: Ieac28c6a2409c1c0d2d0c46a2b01a34c47841970
Shih-wei Liao [Thu, 16 Sep 2010 00:47:04 +0000 (17:47 -0700)]
1. Better support for access constant entry (add emitLEApcrelInstruction)
2. Add suppport to emit ConstantVector and ConstantArray
3. emitLEApcrelInstruction uses PC relative mode add/sub and the offset
need to be encoded in so_imm (A5.2.4 Modified immediate
constants in ARM instructions)
Change-Id: Id7a933dddbd7e80289bf5befa48a054dc765a644
Shih-wei Liao [Wed, 15 Sep 2010 23:56:25 +0000 (16:56 -0700)]
Add README.android to describe the Android-specific LLVM changes that we can't push upstream.
Some of them are to-dos that when they are done, there will no longer be merge conflicts
with upstream.
Change-Id: I5a754dd389af05bb7c151468ceb347e06e025247
Shih-wei Liao [Tue, 14 Sep 2010 22:39:43 +0000 (15:39 -0700)]
Merge commit 'refs/changes/82/67782/1' of ssh://android-git.corp.google.com:29418/platform/external/llvm into update_llvm
Shih-wei Liao [Mon, 13 Sep 2010 14:50:48 +0000 (07:50 -0700)]
Potential fix for b/
2988615.
Change-Id: Ia15a1f5e25360dac4ca4bfecc35cb1aa6b6db1b8
Shih-wei Liao [Sat, 11 Sep 2010 08:42:09 +0000 (01:42 -0700)]
Apply changes on LLVM r112364 after merge.
Change-Id: I9688675d46dca0d564206616c40b005669269010
Shih-wei Liao [Sat, 11 Sep 2010 01:55:30 +0000 (18:55 -0700)]
Merge commit '
69494cf8102cf872e9cb76662e9960be7c112112' into HEAD
Conflicts:
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/ARM/ARMCodeEmitter.cpp
lib/Target/ARM/ARMJITInfo.cpp
lib/Target/ARM/ARMRelocations.h
lib/Transforms/IPO/MergeFunctions.cpp
Change-Id: I23d40983717e072fa49334c1fa54f2cf961476c7
Anatol Pomazau [Thu, 9 Sep 2010 18:31:13 +0000 (11:31 -0700)]
Add a fake merge point for git://repo.or.cz/llvm.git repo
It merges r102410 history into our repository so the next time we merge
changes fom the upstream repository git://repo.or.cz/llvm.git
we need to do only 'git merge SHA1'
Anatol Pomazau [Thu, 9 Sep 2010 16:29:13 +0000 (09:29 -0700)]
Add binary files that present in r102410 but missing in the Android
Anatol Pomazau [Thu, 9 Sep 2010 02:01:23 +0000 (19:01 -0700)]
Remove svn keywords
Ying Wang [Wed, 8 Sep 2010 16:54:08 +0000 (09:54 -0700)]
Remove llvm dependency on clang
Change-Id: I1b50299710cbb726eb5ff3f227498bcac65c4f79
Anatol Pomazau [Wed, 8 Sep 2010 04:33:22 +0000 (21:33 -0700)]
Use correct clang project location.
This project has been moved under separete project tree in external/clang
Anatol Pomazau [Tue, 7 Sep 2010 23:03:10 +0000 (16:03 -0700)]
Fix build. We already have this file in another project.
Change-Id: I42c37640e58c7494cb764fa981982a617dec9650
Benjamin Kramer [Sat, 28 Aug 2010 10:29:41 +0000 (10:29 +0000)]
Update ocaml test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112364
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 Aug 2010 09:47:42 +0000 (09:47 +0000)]
Remove unions from the ocaml bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112363
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 28 Aug 2010 05:12:57 +0000 (05:12 +0000)]
Use pseudo instructions for VST1 and VST2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112357
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 04:09:24 +0000 (04:09 +0000)]
remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 03:51:24 +0000 (03:51 +0000)]
remove the ABCD and SSI passes. They don't have any clients that
I'm aware of, aren't maintained, and LVI will be replacing their value.
nlewycky approved this on irc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112355
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 03:45:03 +0000 (03:45 +0000)]
remove dead proto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112354
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 03:43:50 +0000 (03:43 +0000)]
more dead thing zapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112353
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 03:42:45 +0000 (03:42 +0000)]
zap dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112352
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 03:36:51 +0000 (03:36 +0000)]
for completeness, allow undef also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 03:21:03 +0000 (03:21 +0000)]
squish dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112350
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 03:18:45 +0000 (03:18 +0000)]
zap dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112349
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 28 Aug 2010 02:46:39 +0000 (02:46 +0000)]
Clean up the logic of vector shuffles -> vector shifts.
Also teach this logic how to handle target specific shuffles if
needed, this is necessary while searching recursively for zeroed
scalar elements in vector shuffle operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 01:50:57 +0000 (01:50 +0000)]
handle the constant case of vector insertion. For something
like this:
struct S { float A, B, C, D; };
struct S g;
struct S bar() {
struct S A = g;
++A.B;
A.A = 42;
return A;
}
we now generate:
_bar: ## @bar
## BB#0: ## %entry
movq _g@GOTPCREL(%rip), %rax
movss 12(%rax), %xmm0
pshufd $16, %xmm0, %xmm0
movss 4(%rax), %xmm2
movss 8(%rax), %xmm1
pshufd $16, %xmm1, %xmm1
unpcklps %xmm0, %xmm1
addss LCPI1_0(%rip), %xmm2
pshufd $16, %xmm2, %xmm2
movss LCPI1_1(%rip), %xmm0
pshufd $16, %xmm0, %xmm0
unpcklps %xmm2, %xmm0
ret
instead of:
_bar: ## @bar
## BB#0: ## %entry
movq _g@GOTPCREL(%rip), %rax
movss 12(%rax), %xmm0
pshufd $16, %xmm0, %xmm0
movss 4(%rax), %xmm2
movss 8(%rax), %xmm1
pshufd $16, %xmm1, %xmm1
unpcklps %xmm0, %xmm1
addss LCPI1_0(%rip), %xmm2
movd %xmm2, %eax
shlq $32, %rax
addq $
1109917696, %rax ## imm = 0x42280000
movd %rax, %xmm0
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112345
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 28 Aug 2010 01:30:02 +0000 (01:30 +0000)]
Straighten out any triple strings passed on the command line before
they hit the rest of the system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112344
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Aug 2010 01:20:38 +0000 (01:20 +0000)]
optimize bitcasts from large integers to vector into vector
element insertion from the pieces that feed into the vector.
This handles a pattern that occurs frequently due to code
generated for the x86-64 abi. We now compile something like
this:
struct S { float A, B, C, D; };
struct S g;
struct S bar() {
struct S A = g;
++A.A;
++A.C;
return A;
}
into all nice vector operations:
_bar: ## @bar
## BB#0: ## %entry
movq _g@GOTPCREL(%rip), %rax
movss LCPI1_0(%rip), %xmm1
movss (%rax), %xmm0
addss %xmm1, %xmm0
pshufd $16, %xmm0, %xmm0
movss 4(%rax), %xmm2
movss 12(%rax), %xmm3
pshufd $16, %xmm2, %xmm2
unpcklps %xmm2, %xmm0
addss 8(%rax), %xmm1
pshufd $16, %xmm1, %xmm1
pshufd $16, %xmm3, %xmm2
unpcklps %xmm2, %xmm1
ret
instead of icky integer operations:
_bar: ## @bar
movq _g@GOTPCREL(%rip), %rax
movss LCPI1_0(%rip), %xmm1
movss (%rax), %xmm0
addss %xmm1, %xmm0
movd %xmm0, %ecx
movl 4(%rax), %edx
movl 12(%rax), %esi
shlq $32, %rdx
addq %rcx, %rdx
movd %rdx, %xmm0
addss 8(%rax), %xmm1
movd %xmm1, %eax
shlq $32, %rsi
addq %rax, %rsi
movd %rsi, %xmm1
ret
This resolves rdar://
8360454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112343
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 28 Aug 2010 00:51:03 +0000 (00:51 +0000)]
Completely disable tail calls when fast-isel is enabled, as fast-isel
doesn't currently support dealing with this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112341
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 28 Aug 2010 00:49:13 +0000 (00:49 +0000)]
Trim a #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112340
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 28 Aug 2010 00:39:27 +0000 (00:39 +0000)]
Fix an index calculation thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112337
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 28 Aug 2010 00:20:11 +0000 (00:20 +0000)]
We don't need to custom-select VLDMQ and VSTMQ anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112336
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 28 Aug 2010 00:11:12 +0000 (00:11 +0000)]
Update CMake build. Add newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112332
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 27 Aug 2010 23:57:52 +0000 (23:57 +0000)]
When merging Thumb2 loads/stores, do not give up when the offset is one of
the special values that for ARM would be used with IB or DA modes. Fall
through and consider materializing a new base address is it would be
profitable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112329
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 27 Aug 2010 23:31:36 +0000 (23:31 +0000)]
Add a prototype of a new peephole optimizing pass that uses LazyValue info to simplify PHIs and select's.
This pass addresses the missed optimizations from PR2581 and PR4420.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112325
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 27 Aug 2010 23:29:38 +0000 (23:29 +0000)]
Improve the precision of getConstant().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112323
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 27 Aug 2010 23:18:17 +0000 (23:18 +0000)]
Change ARM VFP VLDM/VSTM instructions to use addressing mode #4, just like
all the other LDM/STM instructions. This fixes asm printer crashes when
compiling with -O0. I've changed one of the NEON tests (vst3.ll) to run
with -O0 to check this in the future.
Prior to this change VLDM/VSTM used addressing mode #5, but not really.
The offset field was used to hold a count of the number of registers being
loaded or stored, and the AM5 opcode field was expanded to specify the IA
or DB mode, instead of the standard ADD/SUB specifier. Much of the backend
was not aware of these special cases. The crashes occured when rewriting
a frameindex caused the AM5 offset field to be changed so that it did not
have a valid submode. I don't know exactly what changed to expose this now.
Maybe we've never done much with -O0 and NEON. Regardless, there's no longer
any reason to keep a count of the VLDM/VSTM registers, so we can use
addressing mode #4 and clean things up in a lot of places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112322
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 23:15:21 +0000 (23:15 +0000)]
tidy up test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112321
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 23:05:54 +0000 (23:05 +0000)]
no really, fix the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112317
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 23:05:27 +0000 (23:05 +0000)]
fix this test. It's not clear what it's really testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112316
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 22:53:44 +0000 (22:53 +0000)]
Enhance the shift propagator to handle the case when you have:
A = shl x, 42
...
B = lshr ..., 38
which can be transformed into:
A = shl x, 4
...
iff we can prove that the would-be-shifted-in bits
are already zero. This eliminates two shifts in the testcase
and allows eliminate of the whole i128 chain in the real example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112314
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 27 Aug 2010 22:25:51 +0000 (22:25 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112305
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 22:24:38 +0000 (22:24 +0000)]
Implement a pretty general logical shift propagation
framework, which is good at ripping through bitfield
operations. This generalize a bunch of the existing
xforms that instcombine does, such as
(x << c) >> c -> and
to handle intermediate logical nodes. This is useful for
ripping up the "promote to large integer" code produced by
SRoA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112304
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 27 Aug 2010 21:56:59 +0000 (21:56 +0000)]
Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112302
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 27 Aug 2010 21:44:35 +0000 (21:44 +0000)]
Unsigned value cannot be < 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112300
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Aug 2010 21:39:59 +0000 (21:39 +0000)]
When merging adjacent operands, scan ahead and merge all equal
adjacent operands at once, instead of just two at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112299
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 27 Aug 2010 21:38:11 +0000 (21:38 +0000)]
Fix a couple of typos.
Patch by Cameron Esfahani!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112297
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 21:04:34 +0000 (21:04 +0000)]
remove some special shift cases that have been subsumed into the
more general simplify demanded bits logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112291
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Aug 2010 20:45:56 +0000 (20:45 +0000)]
Make the {A,+,B}<L> + {C,+,D}<L> --> Other + {A+C,+,B+D}<L>
transformation collect all the addrecs with the same loop
add combine them at once rather than starting everything over
at the first chance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112290
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 20:44:45 +0000 (20:44 +0000)]
merge and filecheckize test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 20:42:10 +0000 (20:42 +0000)]
merge two tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112288
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 27 Aug 2010 20:39:09 +0000 (20:39 +0000)]
Remove now unneeded command line flag that enables 'optimize compares.'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112287
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 27 Aug 2010 20:32:56 +0000 (20:32 +0000)]
Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112286
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 20:32:06 +0000 (20:32 +0000)]
teach the truncation optimization that an entire chain of
computation can be truncated if it is fed by a sext/zext that doesn't
have to be exactly equal to the truncation result type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112285
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Aug 2010 18:55:03 +0000 (18:55 +0000)]
Switch ScalarEvolution's main Value*->SCEV* map from std::map
to DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112281
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 18:49:08 +0000 (18:49 +0000)]
get this test passing on linux builders.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112280
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Aug 2010 18:31:05 +0000 (18:31 +0000)]
Add an instcombine to clean up a common pattern produced
by the SRoA "promote to large integer" code, eliminating
some type conversions like this:
%94 = zext i16 %93 to i32 ; <i32> [#uses=2]
%96 = lshr i32 %94, 8 ; <i32> [#uses=1]
%101 = trunc i32 %96 to i8 ; <i8> [#uses=1]
This also unblocks other xforms from happening, now clang is able to compile:
struct S { float A, B, C, D; };
float foo(struct S A) { return A.A + A.B+A.C+A.D; }
into:
_foo: ## @foo
## BB#0: ## %entry
pshufd $1, %xmm0, %xmm2
addss %xmm0, %xmm2
movdqa %xmm1, %xmm3
addss %xmm2, %xmm3
pshufd $1, %xmm1, %xmm0
addss %xmm3, %xmm0
ret
on x86-64, instead of:
_foo: ## @foo
## BB#0: ## %entry
movd %xmm0, %rax
shrq $32, %rax
movd %eax, %xmm2
addss %xmm0, %xmm2
movapd %xmm1, %xmm3
addss %xmm2, %xmm3
movd %xmm1, %rax
shrq $32, %rax
movd %eax, %xmm0
addss %xmm3, %xmm0
ret
This seems pretty close to optimal to me, at least without
using horizontal adds. This also triggers in lots of other
code, including SPEC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112278
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 27 Aug 2010 17:13:24 +0000 (17:13 +0000)]
Add alignment arguments to all the NEON load/store intrinsics.
Update all the tests using those intrinsics and add support for
auto-upgrading bitcode files with the old versions of the intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112271
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 27 Aug 2010 17:12:29 +0000 (17:12 +0000)]
Use LVI to eliminate conditional branches where we've tested a related condition previously. Update tests for this change.
This fixes PR5652.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112270
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Aug 2010 15:26:01 +0000 (15:26 +0000)]
Optimize SCEVComplexityCompare. Use a 3-way return instead of a 2-way
return to avoid needing two calls to test for equivalence, and sort
addrecs by their degree before examining their operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112267
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Aug 2010 15:16:40 +0000 (15:16 +0000)]
Clarify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112266
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Aug 2010 15:16:09 +0000 (15:16 +0000)]
Parse " (Hidden)" and cope with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112265
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Aug 2010 15:15:31 +0000 (15:15 +0000)]
Default to looking for clang++ in the PATH, rather than trying to
guess a path that will work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112264
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 27 Aug 2010 14:43:06 +0000 (14:43 +0000)]
Properly handle passing of FP stuff to varargs function on Win64:
value should be copied to the corresponding shadow reg as well.
Patch by Cameron Esfahani!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112262
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 27 Aug 2010 10:40:51 +0000 (10:40 +0000)]
MCELF: Port EmitInstruction changes from MachO streamer. Patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112260
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 27 Aug 2010 10:38:39 +0000 (10:38 +0000)]
MCELF: Always overwrite FixedValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112259
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 27 Aug 2010 02:49:45 +0000 (02:49 +0000)]
Fix the msvs 2010 build.
The Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01
implements parts of C++0x based on the draft standard. An old version of
the draft had a bug that makes std::pair<T1*, T2*>(something, 0) fail to
compile. This is because the template<class U, class V> pair(U&& x, V&& y)
constructor is selected, even though it later fails to implicitly convert
U and V to frist_type and second_type.
This has been fixed in n3090, but it seems that Microsoft is not going to
update msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112257
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 27 Aug 2010 01:30:14 +0000 (01:30 +0000)]
X86: Fix an encoding issue with LOCK_ADD64mr, which could lead to very hard to find miscompiles with the integrated assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112250
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 26 Aug 2010 23:35:15 +0000 (23:35 +0000)]
Revert r112213. It is not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112242
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Aug 2010 23:32:16 +0000 (23:32 +0000)]
Simplify eliminateFrameIndex() interface back down now that PEI doesn't need
to try to re-use scavenged frame index reference registers. rdar://
8277890
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112241
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 26 Aug 2010 22:53:27 +0000 (22:53 +0000)]
If node is not available then use FuncInfo.ValueMap to emit debug info for byval parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112238
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Aug 2010 22:42:12 +0000 (22:42 +0000)]
Remove the now obsolete frame index virtual re-use algorithm from PEI. Pre-RA
virtual base registers handle this function, and more. A bit more cleanup
to do on the interface to eliminateFrameIndex() after this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112237
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 22:23:39 +0000 (22:23 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112235
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 22:20:47 +0000 (22:20 +0000)]
rename test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112234
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 22:14:59 +0000 (22:14 +0000)]
optimize "integer extraction out of the middle of a vector" as produced
by SRoA. This is part of rdar://
7892780, but needs another xform to
expose this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112232
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Aug 2010 21:56:30 +0000 (21:56 +0000)]
tidy up a bit. no functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112228
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 21:55:42 +0000 (21:55 +0000)]
optimize bitcast(trunc(bitcast(x))) where the result is a float and 'x'
is a vector to be a vector element extraction. This allows clang to
compile:
struct S { float A, B, C, D; };
float foo(struct S A) { return A.A + A.B+A.C+A.D; }
into:
_foo: ## @foo
## BB#0: ## %entry
movd %xmm0, %rax
shrq $32, %rax
movd %eax, %xmm2
addss %xmm0, %xmm2
movapd %xmm1, %xmm3
addss %xmm2, %xmm3
movd %xmm1, %rax
shrq $32, %rax
movd %eax, %xmm0
addss %xmm3, %xmm0
ret
instead of:
_foo: ## @foo
## BB#0: ## %entry
movd %xmm0, %rax
movd %eax, %xmm0
shrq $32, %rax
movd %eax, %xmm2
addss %xmm0, %xmm2
movd %xmm1, %rax
movd %eax, %xmm1
addss %xmm2, %xmm1
shrq $32, %rax
movd %eax, %xmm0
addss %xmm1, %xmm0
ret
... eliminating half of the horribleness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112227
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 21:51:41 +0000 (21:51 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112225
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 21:50:56 +0000 (21:50 +0000)]
rename test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112224
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 21:35:52 +0000 (21:35 +0000)]
add m_BitCast for matching a bitcast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112222
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 26 Aug 2010 21:29:54 +0000 (21:29 +0000)]
Turn off the scavenging based frame reg reuse briefly to measure whether it's
still having a significant effect. It shouldn't be now that the pre-RA
virtual base reg stuff is in. Assuming that's valididated by the nightly
testers, we can simplify a lot of the PEI frame index code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112220
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 26 Aug 2010 20:53:12 +0000 (20:53 +0000)]
zap the now unused MVT::getIntVectorWithNumElements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112218
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 26 Aug 2010 20:33:42 +0000 (20:33 +0000)]
Speculatively revert r112207.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112216
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 26 Aug 2010 20:32:32 +0000 (20:32 +0000)]
80 col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112215
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 26 Aug 2010 20:06:46 +0000 (20:06 +0000)]
Update DanglingDebugInfo so that it can be used to track llvm.dbg.declare also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112213
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 26 Aug 2010 18:51:29 +0000 (18:51 +0000)]
Use pseudo instructions for VST3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112208
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 26 Aug 2010 18:36:14 +0000 (18:36 +0000)]
Donot forget to resolve dangling debug info in a case where virtual register, used for a value, is initialized after a dbg intrinsic is seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112207
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 26 Aug 2010 18:33:51 +0000 (18:33 +0000)]
Reapply r112176 without removing the other CMN patterns (that was unintentional).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112206
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 26 Aug 2010 18:12:22 +0000 (18:12 +0000)]
Experimental clang-based code-completion support for vim. This currently
depends on some clang patches which are not yet upstream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112204
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 26 Aug 2010 18:12:04 +0000 (18:12 +0000)]
MCELF: Fix a thinko of mine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112203
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 26 Aug 2010 18:08:11 +0000 (18:08 +0000)]
Fix comment typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112202
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 26 Aug 2010 17:47:45 +0000 (17:47 +0000)]
Fix prototypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112200
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 26 Aug 2010 17:40:24 +0000 (17:40 +0000)]
Make JumpThreading smart enough to properly thread StrSwitch when it's compiled with clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112198
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 26 Aug 2010 17:23:02 +0000 (17:23 +0000)]
MCELF: Compensate for the addend on i386. Patch by Roman Divacky, with some cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112197
91177308-0d34-0410-b5e6-
96231b3b80d8