Dan Gohman
d5e0d45b20
Fix several areas in LSR to do a better job keeping the main
...
LSRInstance data structures up to date. This fixes some
pessimizations caused by stale data which will be exposed
in an upcoming change.
llvm-svn: 112440
2010-08-29 16:32:54 +00:00
Dan Gohman
b62347f067
Refactor the three main groups of code out of
...
NarrowSearchSpaceUsingHeuristics into separate functions.
llvm-svn: 112439
2010-08-29 16:09:42 +00:00
Dan Gohman
7b45482eab
Delete a bogus check.
...
llvm-svn: 112438
2010-08-29 15:30:29 +00:00
Dan Gohman
bde89495fa
Add some comments.
...
llvm-svn: 112437
2010-08-29 15:27:08 +00:00
Dan Gohman
185c024c53
Move this debug output into GenerateAllReuseFormula, to declutter
...
the high-level logic.
llvm-svn: 112436
2010-08-29 15:21:38 +00:00
Dan Gohman
5023e9f408
Delete an unused declaration.
...
llvm-svn: 112435
2010-08-29 15:19:11 +00:00
Dan Gohman
defdc9d59c
Do one lookup instead of two.
...
llvm-svn: 112434
2010-08-29 15:18:49 +00:00
Dan Gohman
4e9013673c
Restructure the {A,+,B}<L> * {C,+,D}<L> folding so that it folds
...
all applicable addrecs before recursing on getMulExpr, instead of
recursing on getMulExpr for each one.
llvm-svn: 112433
2010-08-29 15:16:58 +00:00
Dan Gohman
88b40ae04a
Batch up subtracts along with adds, when analyzing long chains of
...
operations.
llvm-svn: 112432
2010-08-29 15:10:06 +00:00
Dan Gohman
988c90a5e1
Micro-optimize GroupByComplexity.
...
llvm-svn: 112431
2010-08-29 15:07:13 +00:00
Dan Gohman
690916c085
Hold AddRec->getLoop() in a variable, to make the Mul code more consistent
...
with the Add code.
llvm-svn: 112430
2010-08-29 14:55:19 +00:00
Dan Gohman
5a3ad9c218
Rename a variable, for consistency.
...
llvm-svn: 112429
2010-08-29 14:53:34 +00:00
Dan Gohman
d581ece72a
Use iterators instead of indices.
...
llvm-svn: 112428
2010-08-29 14:52:02 +00:00
Dan Gohman
8507175536
Don't worry about union types.
...
llvm-svn: 112427
2010-08-29 14:50:21 +00:00
Dan Gohman
0fdab32e0f
Make this test less dependent on register allocation choices.
...
llvm-svn: 112426
2010-08-29 14:49:42 +00:00
Dan Gohman
68929091e5
Use exec.
...
llvm-svn: 112425
2010-08-29 14:49:00 +00:00
Dan Gohman
5110488830
Delete an unused declaration.
...
llvm-svn: 112424
2010-08-29 14:48:15 +00:00
Kalle Raiskila
daba4ffc75
Fix lowering of INSERT_VECTOR_ELT in SPU.
...
The IDX was treated as byte index, not element index.
llvm-svn: 112422
2010-08-29 12:41:50 +00:00
Bill Wendling
8a7258d771
Fix whitespaces. No functionality changes.
...
llvm-svn: 112421
2010-08-29 11:31:07 +00:00
Chris Lattner
875b659115
Stop explicitly scheduling domfrontier before the loop passes,
...
since none of them use it. With this, we now only run
domfrontier (an N^2 analysis) 3 times at clang -O3: once for
"early" per-function cleanup, once at the start of the
per-function pipeline to support SRoA, and once late because
the EHPrepare class uses it.
EHPrepare needs to stop using it, this is silly and wasteful.
llvm-svn: 112420
2010-08-29 07:05:51 +00:00
Chris Lattner
270d50d48c
licm preserves the cfg, it doesn't have to explicitly say it
...
preserves domfrontier. It does preserve AA though.
llvm-svn: 112419
2010-08-29 07:02:56 +00:00
Chris Lattner
40ec41d1c4
now that it doesn't use the PromoteMemToReg function, LICM doesn't
...
require DomFrontier. Dropping this doesn't actually save any runs
of the pass though.
llvm-svn: 112418
2010-08-29 06:49:44 +00:00
Chris Lattner
fe3e4cdd30
completely rewrite the memory promotion algorithm in LICM.
...
Among other things, this uses SSAUpdater instead of
PromoteMemToReg.
llvm-svn: 112417
2010-08-29 06:43:52 +00:00
Bob Wilson
807d004452
Remove NEON vaddl, vaddw, vsubl, and vsubw intrinsics. Instead, use llvm
...
IR add/sub operations with one or both operands sign- or zero-extended.
Auto-upgrade the old intrinsics.
llvm-svn: 112416
2010-08-29 05:57:34 +00:00
Chris Lattner
9921d9c3c1
use getUniqueExitBlocks instead of a manual set.
...
llvm-svn: 112412
2010-08-29 05:12:21 +00:00
Eli Friedman
6ccafafe61
A couple of small missed optimizations.
...
llvm-svn: 112411
2010-08-29 05:07:40 +00:00
Chris Lattner
2133f877c6
reimplement LICM::sink to use SSAUpdater instead of PromoteMemToReg.
...
This leads to much simpler code.
llvm-svn: 112410
2010-08-29 04:55:06 +00:00
Chris Lattner
fac07b1dca
implement SSAUpdater::RewriteUseAfterInsertions, a helpful form of RewriteUse.
...
llvm-svn: 112409
2010-08-29 04:54:06 +00:00
Chris Lattner
24927beaff
remove dead proto
...
llvm-svn: 112408
2010-08-29 04:53:24 +00:00
Chris Lattner
65ce6da2f1
reduce indentation in LICM::sink by using early exits, use
...
getUniqueExitBlocks instead of getExitBlocks and a manual
set to eliminate dupes.
llvm-svn: 112405
2010-08-29 04:28:20 +00:00
Chris Lattner
4928fe010e
modernize this pass a bit: use efficient set/map and reduce indentation.
...
llvm-svn: 112404
2010-08-29 04:23:04 +00:00
Duncan Sands
e7a00e86ec
Flesh out the list of things I've worked on.
...
llvm-svn: 112403
2010-08-29 04:22:35 +00:00
Chris Lattner
c8947a83e3
when merging two alias sets, the result set is volatile if either
...
of the sets is volatile. We were dropping the volatile bit of the
merged in set, leading (luckily) to assertions in cases like
PR7535. I cannot produce a testcase that repros with opt, but this
is obviously correct.
llvm-svn: 112402
2010-08-29 04:14:47 +00:00
Chris Lattner
741da104b4
more cleanup
...
llvm-svn: 112401
2010-08-29 04:13:43 +00:00
Chris Lattner
db816c533c
clean this up
...
llvm-svn: 112400
2010-08-29 04:06:55 +00:00
Bill Wendling
6d105ce757
- Add a parameter to T2I_bin_irs for those patterns which set the S bit.
...
- Create T2I_bin_sw_irs to be like T2I_bin_w_irs, but that it sets the S bit.
llvm-svn: 112399
2010-08-29 03:55:31 +00:00
Chris Lattner
5f911e6fe9
merge a bunch of shuffle tests into sse2.ll
...
llvm-svn: 112398
2010-08-29 03:19:04 +00:00
Chris Lattner
646fee99c3
add a bunch more common shuffles to the instprinter.
...
llvm-svn: 112397
2010-08-29 03:08:08 +00:00
Chris Lattner
c2ef3180a8
add some nounwind's
...
llvm-svn: 112396
2010-08-29 03:07:47 +00:00
Bill Wendling
8ad57ff92e
Name ANDflag to ANDS, which is less stupid.
...
llvm-svn: 112395
2010-08-29 03:06:09 +00:00
Bill Wendling
6e586677a7
File missing from last commit.
...
llvm-svn: 112394
2010-08-29 03:02:28 +00:00
Bill Wendling
385ad1516f
Create an ARMISD::AND node. This node is exactly like the "ARM::AND" node, but
...
it sets the CPSR register.
llvm-svn: 112393
2010-08-29 03:02:11 +00:00
NAKAMURA Takumi
cf055a2aae
Minor change.
...
This is test for git svn dcommit
llvm-svn: 112389
2010-08-28 21:12:51 +00:00
Chris Lattner
56bc8ba493
I have manually decoded the imm field of an insertps one too many
...
times. This patch causes llc and llvm-mc (which both default to
verbose-asm) to print out comments after a few common shuffle
instructions which indicates the shuffle mask, e.g.:
insertps $113, %xmm3, %xmm0 ## xmm0 = zero,xmm0[1,2],xmm3[1]
unpcklps %xmm1, %xmm0 ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
pshufd $1, %xmm1, %xmm1 ## xmm1 = xmm1[1,0,0,0]
This is carefully factored to keep the information extraction (of the
shuffle mask) separate from the printing logic. I plan to move the
extraction part out somewhere else at some point for other parts of
the x86 backend that want to introspect on the behavior of shuffles.
llvm-svn: 112387
2010-08-28 20:42:31 +00:00
Chris Lattner
b6eee35ca6
fixme accomplished
...
llvm-svn: 112386
2010-08-28 20:40:28 +00:00
Chris Lattner
0643b5f1f1
tidy up
...
llvm-svn: 112385
2010-08-28 20:34:35 +00:00
NAKAMURA Takumi
415a2a0a9b
Add me to the "blame list"!
...
And it is my 1st test commit.
llvm-svn: 112384
2010-08-28 20:24:43 +00:00
Dan Gohman
d499f5cbb9
Remove obsolete keywords which are no longer relevant.
...
llvm-svn: 112382
2010-08-28 20:14:05 +00:00
Dan Gohman
d8226c08e0
Remove unions from the vim syntax highlighting.
...
llvm-svn: 112381
2010-08-28 20:11:28 +00:00
Chris Lattner
8cb4abbc0e
fix the buildvector->insertp[sd] logic to not always create a redundant
...
insertp[sd] $0, which is a noop. Before:
_f32: ## @f32
pshufd $1, %xmm1, %xmm2
pshufd $1, %xmm0, %xmm3
addss %xmm2, %xmm3
addss %xmm1, %xmm0
## kill: XMM0<def> XMM0<kill> XMM0<def>
insertps $0, %xmm0, %xmm0
insertps $16, %xmm3, %xmm0
ret
after:
_f32: ## @f32
movdqa %xmm0, %xmm2
addss %xmm1, %xmm2
pshufd $1, %xmm1, %xmm1
pshufd $1, %xmm0, %xmm3
addss %xmm1, %xmm3
movdqa %xmm2, %xmm0
insertps $16, %xmm3, %xmm0
ret
The extra movs are due to a random (poor) scheduling decision.
llvm-svn: 112379
2010-08-28 17:59:08 +00:00