Eric Christopher
a87065807f
Migrate X86InstrControl.td to use PseudoI and fix a couple of 80-col violations
...
while I'm in there.
llvm-svn: 120466
2010-11-30 21:37:36 +00:00
Chris Lattner
7fe08b67fa
remove the "undead" terminology, which is nonstandard and never
...
made sense to me. We now have a set of dead stack objects, and
they become live when loaded. Fix a theoretical problem where
we'd pass in the wrong pointer to the alias query.
llvm-svn: 120465
2010-11-30 21:32:12 +00:00
Chris Lattner
127818d746
move call handling in handleEndBlock up a bit, and simplify it.
...
If the call might read all the allocas, stop scanning early.
Convert a vector to smallvector, shrink SmallPtrSet to 16 instead
of 64 to avoid crazy linear scans.
llvm-svn: 120463
2010-11-30 21:18:46 +00:00
Ted Kremenek
dbd89971ff
Performance optimization on ImmutableMap/ImmutableSet:
...
- Use a DenseSet instead of a FoldingSet to cache
canonicalized nodes. This reduces the overhead
of double-hashing.
- Use reference counts in ImutAVLTree to much
more aggressively recover tree nodes that are
no longer usable. We can generate many
transient nodes while using add() and remove()
on ImmutableSet/ImmutableMaps to generate a final
set/map.
For the clang static analyzer (the main client
of these data structures), this results in
a slight speedup (0.5%) when analyzing sqlite3,
but much more importantly results in a 30-60%
reduction in peak memory usage when the analyzer
is analyzing a given function in a file. On
average that's about a ** 44% reduction ** in the
memory footprint of the static analyzer.
llvm-svn: 120459
2010-11-30 20:26:45 +00:00
Dale Johannesen
d3a58c8fa1
Avoid exponential growth of a table. It feels like
...
there should be a better way to do this. PR 8679.
llvm-svn: 120457
2010-11-30 20:23:21 +00:00
Owen Anderson
0dc6246fc0
Provide Thumb2 encodings for a few miscellaneous instructions.
...
llvm-svn: 120455
2010-11-30 20:00:01 +00:00
Chris Lattner
60a8b3dab8
various cleanups and code simplification
...
llvm-svn: 120454
2010-11-30 19:48:15 +00:00
Chris Lattner
51c28a93cc
make getPointerSize a static function. Add ivars to DSE for
...
AA and MD pass info instead of using getAnalysis<> all over.
llvm-svn: 120453
2010-11-30 19:34:42 +00:00
Chris Lattner
77d79fa25f
reduce indentation, clean up TD use a bit.
...
llvm-svn: 120452
2010-11-30 19:28:23 +00:00
Jim Grosbach
233890547d
Add FIXME
...
llvm-svn: 120451
2010-11-30 19:25:56 +00:00
Chris Lattner
9db8e15f4d
forbid rtti and exceptions
...
llvm-svn: 120450
2010-11-30 19:20:40 +00:00
Owen Anderson
299382e8cb
Add encoding support for Thumb2 PLD and PLI instructions.
...
llvm-svn: 120449
2010-11-30 19:19:31 +00:00
Eric Christopher
78b4efb472
Noticed this on inspection, fix and update some comments.
...
llvm-svn: 120447
2010-11-30 19:14:07 +00:00
Chris Lattner
b63ba73b1b
enhance isRemovable to refuse to delete volatile mem transfers
...
now that DSE hacks on them. This fixes a regression I introduced,
by generalizing DSE to hack on transfers.
llvm-svn: 120445
2010-11-30 19:12:10 +00:00
Jim Grosbach
8b16618685
The VLDMQ/VSTMQ instructions are reprented as true Pseudo-insts now (i.e.,
...
no extra encoding information), so we no longer need to special case them
here.
llvm-svn: 120444
2010-11-30 19:08:32 +00:00
Jim Grosbach
f01da1a7df
Tidy up.
...
llvm-svn: 120443
2010-11-30 19:00:13 +00:00
Jim Grosbach
3b4e2ab5f3
Pseudo-ize ARM MOVPCRX
...
llvm-svn: 120442
2010-11-30 18:56:36 +00:00
Jim Grosbach
89a4795b52
Delete a few no longer needed references to pseudos.
...
llvm-svn: 120441
2010-11-30 18:56:13 +00:00
Cameron Zwarich
aa23a2e8fe
Change the basic block map in LoopInfo from a std::map to a DenseMap. This is a 16% speedup running loops on test-suite + SPEC2000.
...
Reviewed by Eric Christopher.
llvm-svn: 120440
2010-11-30 18:51:19 +00:00
Owen Anderson
ebcd9c9258
Provide encodings for a few more load/store variants.
...
llvm-svn: 120439
2010-11-30 18:38:28 +00:00
Jim Grosbach
cd5e30f6c6
Pseudo-ize BX_CALL and friends. Remove dead instruction format classes.
...
rdar://8685712
llvm-svn: 120438
2010-11-30 18:30:19 +00:00
Owen Anderson
6187e66801
Add tests for more forms of Thumb2 loads and stores.
...
llvm-svn: 120436
2010-11-30 18:15:21 +00:00
Chris Lattner
ea41dfe385
add TLI support indicating that jumps are more expensive than logical operations
...
and use this to disable a specific optimization. Patch by Micah Villmow!
llvm-svn: 120435
2010-11-30 18:12:52 +00:00
Che-Liang Chiou
e9baf13657
ptx: add command-line options for gpu target and ptx version
...
llvm-svn: 120423
2010-11-30 10:14:14 +00:00
Eric Christopher
8e9fbcf0f0
Not all platforms use _<func>. Duh.
...
llvm-svn: 120418
2010-11-30 09:23:54 +00:00
Eric Christopher
3a8ae23313
Fix some grammar in comments I noticed.
...
llvm-svn: 120416
2010-11-30 09:11:54 +00:00
Eric Christopher
ed13239dc0
This defaults to GenericDomain.
...
llvm-svn: 120415
2010-11-30 09:11:07 +00:00
Jay Foad
15084f085d
PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.
...
llvm-svn: 120413
2010-11-30 09:02:01 +00:00
Eric Christopher
ef62f57d4f
Implement a PseudoI class and transfer the sse instructions over to use
...
it.
llvm-svn: 120412
2010-11-30 08:57:23 +00:00
Eric Christopher
2d1bcf4aea
Fix insertion point in pcmp expander.
...
While I'm there, clean up too many \n even for me.
llvm-svn: 120411
2010-11-30 08:20:21 +00:00
Eric Christopher
1a86e8461a
Fix some cleanups from my last patch.
...
llvm-svn: 120410
2010-11-30 08:10:28 +00:00
Bill Wendling
811c936ed5
Add parsing for the Thumb t_addrmode_s4 addressing mode. This can almost
...
certainly be made more generic. But it does allow us to parse something like:
ldr r3, [r2, r4]
correctly in Thumb mode.
llvm-svn: 120408
2010-11-30 07:44:32 +00:00
Che-Liang Chiou
d816204056
ptx: add ld instruction
...
support register and register-immediate addressing mode
todo: immediate and register-register addressing mode
llvm-svn: 120407
2010-11-30 07:34:44 +00:00
Chris Lattner
58b779e9c2
Rewrite the main DSE loop to be written in terms of reasoning
...
about pairs of AA::Location's instead of looking for MemDep's
"Def" predicate. This is more powerful and general, handling
memset/memcpy/store all uniformly, and implementing PR8701 and
probably obsoleting parts of memcpyoptimizer.
This also fixes an obscure bug with init.trampoline and i8
stores, but I'm not surprised it hasn't been hit yet. Enhancing
init.trampoline to carry the size that it stores would allow
DSE to be much more aggressive about optimizing them.
llvm-svn: 120406
2010-11-30 07:23:21 +00:00
Chris Lattner
6caa26cac3
death to extraneous \n's.
...
llvm-svn: 120405
2010-11-30 07:20:51 +00:00
Eric Christopher
fa6657cec0
Rewrite mwait and monitor support and custom lower arguments.
...
Fixes PR8573.
llvm-svn: 120404
2010-11-30 07:20:12 +00:00
Anders Carlsson
e3ea1cba79
Add a puts optimization that converts puts() to putchar('\n').
...
llvm-svn: 120398
2010-11-30 06:19:18 +00:00
Anders Carlsson
77e9892afd
Fix a typo.
...
llvm-svn: 120394
2010-11-30 06:03:55 +00:00
Anders Carlsson
631d06bbce
Rename this test to FPuts.ll since it actually tests fputs.
...
llvm-svn: 120393
2010-11-30 05:59:26 +00:00
Chris Lattner
3590ef817c
rename a function and reduce some indentation, no functionality change.
...
llvm-svn: 120391
2010-11-30 05:30:45 +00:00
Nick Lewycky
2965d3e3cd
Make @llvm.invariant.start not be readonly, so that it has side-effects. This
...
unbreaks test/Transforms/InstCombine/invariant.ll which was broken by r120382.
This is a fix-forward to do what I think Chris intended.
llvm-svn: 120388
2010-11-30 04:13:41 +00:00
Jakob Stoklund Olesen
d4900a644c
Stub out a new LiveDebugVariables pass.
...
This analysis is going to run immediately after LiveIntervals. It will stay
alive during register allocation and keep track of user variables mentioned in
DBG_VALUE instructions.
When the register allocator is moving values between registers and the stack, it
is very hard to keep track of DBG_VALUE instructions. We usually get it wrong.
This analysis maintains a data structure that makes it easy to update DBG_VALUE
instructions.
llvm-svn: 120385
2010-11-30 02:17:10 +00:00
Chris Lattner
6c7f64e0bc
remove a use of llvm-dis
...
llvm-svn: 120383
2010-11-30 02:04:15 +00:00
Chris Lattner
b438ef236c
remove the pointless check of MemoryUseIntrinsic from
...
is trivially dead, since these have side effects. This makes the
(misnamed) MemoryUseIntrinsic class dead, so remove it.
llvm-svn: 120382
2010-11-30 02:03:47 +00:00
Chris Lattner
d540a5d842
strength reduce this.
...
llvm-svn: 120381
2010-11-30 01:56:13 +00:00
Chris Lattner
afbc0c2b8c
getLocationForDest should work for memset as well.
...
llvm-svn: 120380
2010-11-30 01:48:20 +00:00
Chris Lattner
2227a8a192
rename doesClobberMemory -> hasMemoryWrite to be more specific, and
...
remove an actively-wrong comment.
llvm-svn: 120378
2010-11-30 01:37:52 +00:00
Chris Lattner
9d179d911d
clean up handling of 'free', detangling it from everything else.
...
It can be seriously improved, but at least now it isn't intertwined
with the other logic.
llvm-svn: 120377
2010-11-30 01:28:33 +00:00
Chris Lattner
c2e3445273
merge one more away
...
llvm-svn: 120375
2010-11-30 01:06:43 +00:00
Chris Lattner
7578d0df51
I already merged partial-overwrite.ll -> PartialStore.ll
...
Merge context-sensitive.ll -> simple.ll and upgrade it.
llvm-svn: 120374
2010-11-30 01:05:07 +00:00
Chris Lattner
43e3a98675
clean up DSE tests, removing some poorly reduced and useless old test,
...
merging more into other larger .ll files, filecheckizing along the way.
llvm-svn: 120373
2010-11-30 01:00:34 +00:00
Bill Wendling
ddce9f3757
Minor cleanups. No functional change.
...
llvm-svn: 120372
2010-11-30 00:50:22 +00:00
Bill Wendling
8294a30d54
s/ARM::BRIND/ARM::BX/g to coincide with r120366.
...
llvm-svn: 120371
2010-11-30 00:48:15 +00:00
Chris Lattner
90c4947df7
enhance basicaa to return "Mod" for a memcpy call when the
...
queried location doesn't overlap the source, and add a testcase.
llvm-svn: 120370
2010-11-30 00:43:16 +00:00
Bill Wendling
62718de2b9
Add correct encoding for "bl __aeabi_read_tp". However, the asm matcher isn't
...
able to match this yet.
llvm-svn: 120369
2010-11-30 00:34:08 +00:00
Chris Lattner
9a146372b5
Teach basicaa that memset's modref set is at worst "mod" and never
...
contains "ref".
Enhance DSE to use a modref query instead of a store-specific hack
to generalize the "ignore may-alias stores" optimization to handle
memset and memcpy.
llvm-svn: 120368
2010-11-30 00:28:45 +00:00
Jim Grosbach
027bd47e3e
Rename BX/BRIND/etc patterns to clarify which is actually the BX instruction
...
and which are pseudos.
llvm-svn: 120366
2010-11-30 00:24:05 +00:00
Bill Wendling
85a8a72d85
Add some encoding for the adr instruction. Labels still need to be finished.
...
llvm-svn: 120365
2010-11-30 00:18:30 +00:00
Owen Anderson
e22c7322b8
Correct Thumb2 encodings for a much wider range of loads and stores.
...
llvm-svn: 120364
2010-11-30 00:14:31 +00:00
Chris Lattner
c3c754f750
my previous patch would cause us to start deleting some volatile
...
stores, fix and add a testcase.
llvm-svn: 120363
2010-11-30 00:12:39 +00:00
Jim Grosbach
49408cef39
Make a few more ARM pseudo instructions actually use the PseudoInst base class.
...
llvm-svn: 120362
2010-11-30 00:09:06 +00:00
Bill Wendling
ce3d6ca564
Predicate encoding should be withing {}s. And general cleanup.
...
llvm-svn: 120361
2010-11-30 00:08:20 +00:00
Bill Wendling
795f211418
Predicate encoding should be withing {}s.
...
llvm-svn: 120360
2010-11-30 00:05:25 +00:00
Chris Lattner
d4f1090948
two changes to DSE that shouldn't affect anything:
...
1. Don't bother trying to optimize:
lifetime.end(ptr)
store(ptr)
as it is undefined, and therefore shouldn't exist.
2. Move the 'storing a loaded pointer' xform up, simplifying
the may-aliased store code.
llvm-svn: 120359
2010-11-30 00:01:19 +00:00
Bob Wilson
318ce7cb3f
Fix the encoding of VLD4-dup alignment.
...
The only reasonable way I could find to do this is to provide an alternate
version of the addrmode6 operand with a different encoding function. Use it
for all the VLD-dup instructions for the sake of consistency.
llvm-svn: 120358
2010-11-30 00:00:42 +00:00
Bob Wilson
0b27b68164
Rename VLDnDUP instructions with double-spaced registers
...
in an attempt to make things a little more consistent.
llvm-svn: 120357
2010-11-30 00:00:38 +00:00
Bob Wilson
431ac4ef50
Add support for NEON VLD3-dup instructions.
...
The encoding for alignment in VLD4-dup instructions is still a work in progress.
llvm-svn: 120356
2010-11-30 00:00:35 +00:00
Jim Grosbach
9de9a73433
Simplify definitions of the ARM eh.sjlj.*jmp pseudo instructions.
...
llvm-svn: 120354
2010-11-29 23:51:31 +00:00
Jim Grosbach
0c51bb4b25
Parameterize ARMPseudoInst size property.
...
llvm-svn: 120353
2010-11-29 23:48:41 +00:00
Jim Grosbach
cb803b043b
Add a few missing initializers.
...
llvm-svn: 120350
2010-11-29 23:41:10 +00:00
Michael J. Spencer
b775d0b3ad
Support/PathV2: Fix 80 col.
...
llvm-svn: 120349
2010-11-29 23:35:49 +00:00
Michael J. Spencer
b682b0cd14
Support/PathV2: Update comments.
...
llvm-svn: 120348
2010-11-29 23:35:35 +00:00
Chris Lattner
b4df1d5a3e
prune an llvmcontext include and simplify some code.
...
llvm-svn: 120347
2010-11-29 23:35:33 +00:00
Chris Lattner
6f3a90b549
Generalize the darwin wrapper hack to work with generic macho triples as well as darwin ones.
...
llvm-svn: 120346
2010-11-29 23:29:54 +00:00
Jim Grosbach
32ff5586fc
Nuke trailing whitespace.
...
llvm-svn: 120344
2010-11-29 23:18:01 +00:00
Jim Grosbach
9f0356b3cc
Nuke a FIXME. No need to be fancier here, as ARM handles constant pools
...
locations and formatting specially. rdar://7353441
llvm-svn: 120343
2010-11-29 23:09:20 +00:00
Chris Lattner
2907f44a1b
convert llvm-ar and llvm-ranlib to raw_ostream from iostreams.
...
Patch by Danil Malyshev!
llvm-svn: 120341
2010-11-29 23:02:20 +00:00
Owen Anderson
50d662b6cb
Provide Thumb2 encodings for basic loads and stores.
...
llvm-svn: 120340
2010-11-29 22:44:32 +00:00
Evan Cheng
9a133f623c
Mark Darwin call instructions as using "r7" to prevent the frame-register
...
assignment instructions from being moved below / above calls.
rdar://8690640
llvm-svn: 120339
2010-11-29 22:43:27 +00:00
Jim Grosbach
d5cfca1e3d
Nuke dead isCodeGenOnly annotation and extraneous comment.
...
llvm-svn: 120338
2010-11-29 22:40:58 +00:00
Benjamin Kramer
a22f0ce1a3
Add missing colon.
...
llvm-svn: 120336
2010-11-29 22:39:38 +00:00
Jim Grosbach
1883d94630
tidy up.
...
llvm-svn: 120335
2010-11-29 22:38:48 +00:00
Bill Wendling
ee7c5659d7
Thumb encodings for conditional moves.
...
llvm-svn: 120334
2010-11-29 22:37:46 +00:00
Jim Grosbach
7ec3d34553
Pseudo-ize Thumb2 jump tables with explicit MC lowering to the raw
...
instructions. This simplifies instruction printing and disassembly.
llvm-svn: 120333
2010-11-29 22:37:40 +00:00
Benjamin Kramer
e6840ef4b3
Fix some broken CHECK lines.
...
llvm-svn: 120332
2010-11-29 22:34:55 +00:00
Michael J. Spencer
3ef91c5593
unittests: Merge SystemTests back into SupportTests.
...
llvm-svn: 120330
2010-11-29 22:29:04 +00:00
Michael J. Spencer
ebad2f9d36
Support: Add PathV2 implementation.
...
llvm-svn: 120329
2010-11-29 22:28:51 +00:00
Michael J. Spencer
6d935a2e5c
system_error: Remove Windows headers.
...
llvm-svn: 120328
2010-11-29 22:28:32 +00:00
Michael J. Spencer
fc6fc9d569
Support/PathV2: Just about every function call requires the Twine header.
...
llvm-svn: 120327
2010-11-29 22:28:22 +00:00
Bill Wendling
5da8cae9ec
Refactor some of the "disassembly-only" instructions into a base class. This
...
reduces some code duplication.
llvm-svn: 120326
2010-11-29 22:15:03 +00:00
Chris Lattner
2e8793482c
fix PR8677, patch by Jakub Staszak!
...
llvm-svn: 120325
2010-11-29 21:59:31 +00:00
Eric Christopher
43b0c6d94f
Update fastisel for the changes in r120272.
...
llvm-svn: 120324
2010-11-29 21:56:23 +00:00
Frits van Bommel
28218aa8f1
Transform (extractvalue (load P), ...) to (load (gep P, 0, ...)) if the load has no other uses, shrinking the load.
...
llvm-svn: 120323
2010-11-29 21:56:20 +00:00
Jim Grosbach
81af4f9eb1
Rename t2 TBB and TBH instructions to reference that they encode the jump table
...
data. Next up, pseudo-izing them.
llvm-svn: 120320
2010-11-29 21:28:32 +00:00
Frits van Bommel
40a80ac963
Update this test to keep testing the -instcombine transform it's supposed to be testing instead of triggering the improved constant folding for insertvalue and extractvalue.
...
llvm-svn: 120319
2010-11-29 20:55:40 +00:00
Owen Anderson
ba3a8fa7ab
Improving the factoring of several instruction encodings.
...
llvm-svn: 120317
2010-11-29 20:38:48 +00:00
Frits van Bommel
a98214de10
Teach ConstantFoldInstruction() how to fold insertvalue and extractvalue.
...
llvm-svn: 120316
2010-11-29 20:36:52 +00:00
Charles Davis
54c9eb6fff
Now to chant the magical incantation that will exorcise the System library
...
from LLVM forever:
grep -lR "llvm/System" * | grep -v .svn | xargs sed -ie 's#llvm/System#llvm/Support#g'
llvm-svn: 120314
2010-11-29 19:44:50 +00:00
Bob Wilson
77ab165afe
Add support for NEON VLD3-dup instructions.
...
llvm-svn: 120312
2010-11-29 19:35:29 +00:00
Bob Wilson
8022367809
Fix copy-and-paste errors in VLD2-dup scheduling itineraries.
...
llvm-svn: 120311
2010-11-29 19:35:23 +00:00