Michael J. Spencer [Wed, 1 Dec 2010 00:52:55 +0000 (00:52 +0000)]
Support/PathV2: Add replace_extension implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120514
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Wed, 1 Dec 2010 00:52:28 +0000 (00:52 +0000)]
Support/PathV2: Add remove_filename implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120513
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 1 Dec 2010 00:48:44 +0000 (00:48 +0000)]
Refactor the T1sIt encodings into a parent class to get rid of all of the "let"
statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120512
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 1 Dec 2010 00:28:25 +0000 (00:28 +0000)]
Use by-name rather than by-order matching for NEON operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120507
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 1 Dec 2010 00:09:25 +0000 (00:09 +0000)]
test/Archive: FileCheck-ize, and remove *.toc. These may be CRLF-tolerant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120506
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 30 Nov 2010 23:59:50 +0000 (23:59 +0000)]
Comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120504
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 30 Nov 2010 23:55:39 +0000 (23:55 +0000)]
Enable sibling call optimization of libcalls which are expanded during
legalization time. Since at legalization time there is no mapping from
SDNode back to the corresponding LLVM instruction and the return
SDNode is target specific, this requires a target hook to check for
eligibility. Only x86 and ARM support this form of sibcall optimization
right now.
rdar://
8707777
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120501
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 23:54:45 +0000 (23:54 +0000)]
Rename operands to match ARM documentation. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120500
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 23:51:41 +0000 (23:51 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120499
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 23:43:23 +0000 (23:43 +0000)]
Enhance DSE to handle the variable index case in PR8657.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120498
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 23:29:24 +0000 (23:29 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120497
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 30 Nov 2010 23:28:07 +0000 (23:28 +0000)]
Support/PathV2: Implement reverse iteration and parent_path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120496
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 30 Nov 2010 23:27:35 +0000 (23:27 +0000)]
Support/ADT/StringRef: Add find_last_of.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120495
91177308-0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Tue, 30 Nov 2010 23:27:18 +0000 (23:27 +0000)]
Thanks to JimG for catching this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120494
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 23:25:01 +0000 (23:25 +0000)]
remove fixme comment too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120493
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 23:23:59 +0000 (23:23 +0000)]
check in *all* files. This is now handled by my previous DSE commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120492
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 30 Nov 2010 23:18:47 +0000 (23:18 +0000)]
Coding style. No significant functionality. Abandon linear scan style
in favor of the widespread llvm style. Capitalize variables and add
newlines for visual parsing. Rename variables for readability.
And other cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120490
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 23:16:25 +0000 (23:16 +0000)]
Inline classes that were used in only one place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120488
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 23:05:20 +0000 (23:05 +0000)]
teach DSE to use GetPointerBaseWithConstantOffset to analyze
may-aliasing stores that partially overlap with different base
pointers. This implements PR6043 and the non-variable part of
PR8657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120485
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 22:57:21 +0000 (22:57 +0000)]
* Add support for encoding t_addrmode_s2 and t_addrmode_s1. They are the same as
t_addrmode_s4, but with a different scaling factor.
* Encode the Thumb1 load and store instructions. This involved a bit of
refactoring (hi, Chris! :-). Some of the patterns became dead afterwards and
were removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120482
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 30 Nov 2010 22:45:47 +0000 (22:45 +0000)]
Simplify the encoding of reg+/-imm12 values that allow PC-relative encoding. This allows the
Thumb2 encoding to share code with the ARM encoding, which gets use fixup support for free.
It also allows us to fold away at least one codegen-only pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120481
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 22:40:36 +0000 (22:40 +0000)]
Fix handling of ARM negative pc-relative fixups for loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 22:25:26 +0000 (22:25 +0000)]
move GetPointerBaseWithConstantOffset out of GVN into ValueTracking.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120476
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 22:18:11 +0000 (22:18 +0000)]
remove a fixed fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120474
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 21:58:14 +0000 (21:58 +0000)]
Make DeleteDeadInstruction be a static function, move some code around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120471
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 21:57:32 +0000 (21:57 +0000)]
Move X86InstrFPStack.td over to PseudoI as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120470
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 21:47:58 +0000 (21:47 +0000)]
switch RemoveAccessedObjects to use AliasAnalysis::Location to simplify
the code. We now get accurate sizes on Loads, though it surely doesn't
matter in practice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120469
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 21:38:30 +0000 (21:38 +0000)]
two improvements to RemoveAccessedObjects:
1. if the underlying pointer passed in can be resolved
to any argument or alloca, then we don't need to scan.
Previously we would only avoid the scan if the alloca
or byval was actually considered dead.
2. The dead store processing code is itself completely
dead and didn't handle volatile stores right anyway,
so delete it. This allows simplifying the interface
to RemoveAccessedObjects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120467
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 21:37:36 +0000 (21:37 +0000)]
Migrate X86InstrControl.td to use PseudoI and fix a couple of 80-col violations
while I'm in there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120466
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 21:32:12 +0000 (21:32 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120465
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 21:18:46 +0000 (21:18 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120463
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 30 Nov 2010 20:26:45 +0000 (20:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120459
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 30 Nov 2010 20:23:21 +0000 (20:23 +0000)]
Avoid exponential growth of a table. It feels like
there should be a better way to do this. PR 8679.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120457
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 30 Nov 2010 20:00:01 +0000 (20:00 +0000)]
Provide Thumb2 encodings for a few miscellaneous instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120455
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 19:48:15 +0000 (19:48 +0000)]
various cleanups and code simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120454
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 19:34:42 +0000 (19:34 +0000)]
make getPointerSize a static function. Add ivars to DSE for
AA and MD pass info instead of using getAnalysis<> all over.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120453
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 19:28:23 +0000 (19:28 +0000)]
reduce indentation, clean up TD use a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120452
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 19:25:56 +0000 (19:25 +0000)]
Add FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120451
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 19:20:40 +0000 (19:20 +0000)]
forbid rtti and exceptions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120450
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 30 Nov 2010 19:19:31 +0000 (19:19 +0000)]
Add encoding support for Thumb2 PLD and PLI instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120449
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 19:14:07 +0000 (19:14 +0000)]
Noticed this on inspection, fix and update some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 19:12:10 +0000 (19:12 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120445
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 19:08:32 +0000 (19:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120444
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 19:00:13 +0000 (19:00 +0000)]
Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120443
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 18:56:36 +0000 (18:56 +0000)]
Pseudo-ize ARM MOVPCRX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120442
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 18:56:13 +0000 (18:56 +0000)]
Delete a few no longer needed references to pseudos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120441
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Tue, 30 Nov 2010 18:51:19 +0000 (18:51 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120440
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 30 Nov 2010 18:38:28 +0000 (18:38 +0000)]
Provide encodings for a few more load/store variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120439
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 18:30:19 +0000 (18:30 +0000)]
Pseudo-ize BX_CALL and friends. Remove dead instruction format classes.
rdar://
8685712
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120438
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 30 Nov 2010 18:15:21 +0000 (18:15 +0000)]
Add tests for more forms of Thumb2 loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120436
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 18:12:52 +0000 (18:12 +0000)]
add TLI support indicating that jumps are more expensive than logical operations
and use this to disable a specific optimization. Patch by Micah Villmow!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120435
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Tue, 30 Nov 2010 10:14:14 +0000 (10:14 +0000)]
ptx: add command-line options for gpu target and ptx version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120423
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 09:23:54 +0000 (09:23 +0000)]
Not all platforms use _<func>. Duh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120418
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 09:11:54 +0000 (09:11 +0000)]
Fix some grammar in comments I noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120416
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 09:11:07 +0000 (09:11 +0000)]
This defaults to GenericDomain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120415
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 30 Nov 2010 09:02:01 +0000 (09:02 +0000)]
PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120413
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 08:57:23 +0000 (08:57 +0000)]
Implement a PseudoI class and transfer the sse instructions over to use
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120412
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 08:20:21 +0000 (08:20 +0000)]
Fix insertion point in pcmp expander.
While I'm there, clean up too many \n even for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120411
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 08:10:28 +0000 (08:10 +0000)]
Fix some cleanups from my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120410
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 07:44:32 +0000 (07:44 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120408
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Tue, 30 Nov 2010 07:34:44 +0000 (07:34 +0000)]
ptx: add ld instruction
support register and register-immediate addressing mode
todo: immediate and register-register addressing mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 07:23:21 +0000 (07:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 07:20:51 +0000 (07:20 +0000)]
death to extraneous \n's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120405
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Nov 2010 07:20:12 +0000 (07:20 +0000)]
Rewrite mwait and monitor support and custom lower arguments.
Fixes PR8573.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120404
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Nov 2010 06:19:18 +0000 (06:19 +0000)]
Add a puts optimization that converts puts() to putchar('\n').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120398
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Nov 2010 06:03:55 +0000 (06:03 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120394
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Nov 2010 05:59:26 +0000 (05:59 +0000)]
Rename this test to FPuts.ll since it actually tests fputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120393
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 05:30:45 +0000 (05:30 +0000)]
rename a function and reduce some indentation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120391
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 30 Nov 2010 04:13:41 +0000 (04:13 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120388
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 30 Nov 2010 02:17:10 +0000 (02:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120385
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 02:04:15 +0000 (02:04 +0000)]
remove a use of llvm-dis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120383
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 02:03:47 +0000 (02:03 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120382
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 01:56:13 +0000 (01:56 +0000)]
strength reduce this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120381
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 01:48:20 +0000 (01:48 +0000)]
getLocationForDest should work for memset as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120380
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 01:37:52 +0000 (01:37 +0000)]
rename doesClobberMemory -> hasMemoryWrite to be more specific, and
remove an actively-wrong comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120378
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 01:28:33 +0000 (01:28 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120377
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 01:06:43 +0000 (01:06 +0000)]
merge one more away
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120375
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 01:05:07 +0000 (01:05 +0000)]
I already merged partial-overwrite.ll -> PartialStore.ll
Merge context-sensitive.ll -> simple.ll and upgrade it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120374
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 01:00:34 +0000 (01:00 +0000)]
clean up DSE tests, removing some poorly reduced and useless old test,
merging more into other larger .ll files, filecheckizing along the way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120373
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 00:50:22 +0000 (00:50 +0000)]
Minor cleanups. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120372
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 00:48:15 +0000 (00:48 +0000)]
s/ARM::BRIND/ARM::BX/g to coincide with r120366.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120371
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 00:43:16 +0000 (00:43 +0000)]
enhance basicaa to return "Mod" for a memcpy call when the
queried location doesn't overlap the source, and add a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120370
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 00:34:08 +0000 (00:34 +0000)]
Add correct encoding for "bl __aeabi_read_tp". However, the asm matcher isn't
able to match this yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120369
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 00:28:45 +0000 (00:28 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120368
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 00:24:05 +0000 (00:24 +0000)]
Rename BX/BRIND/etc patterns to clarify which is actually the BX instruction
and which are pseudos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120366
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 00:18:30 +0000 (00:18 +0000)]
Add some encoding for the adr instruction. Labels still need to be finished.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120365
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 30 Nov 2010 00:14:31 +0000 (00:14 +0000)]
Correct Thumb2 encodings for a much wider range of loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120364
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 00:12:39 +0000 (00:12 +0000)]
my previous patch would cause us to start deleting some volatile
stores, fix and add a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120363
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Nov 2010 00:09:06 +0000 (00:09 +0000)]
Make a few more ARM pseudo instructions actually use the PseudoInst base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120362
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 00:08:20 +0000 (00:08 +0000)]
Predicate encoding should be withing {}s. And general cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120361
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Nov 2010 00:05:25 +0000 (00:05 +0000)]
Predicate encoding should be withing {}s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120360
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Nov 2010 00:01:19 +0000 (00:01 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120359
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 30 Nov 2010 00:00:42 +0000 (00:00 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120358
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 30 Nov 2010 00:00:38 +0000 (00:00 +0000)]
Rename VLDnDUP instructions with double-spaced registers
in an attempt to make things a little more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120357
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 30 Nov 2010 00:00:35 +0000 (00:00 +0000)]
Add support for NEON VLD3-dup instructions.
The encoding for alignment in VLD4-dup instructions is still a work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120356
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 29 Nov 2010 23:51:31 +0000 (23:51 +0000)]
Simplify definitions of the ARM eh.sjlj.*jmp pseudo instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120354
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 29 Nov 2010 23:48:41 +0000 (23:48 +0000)]
Parameterize ARMPseudoInst size property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120353
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 29 Nov 2010 23:41:10 +0000 (23:41 +0000)]
Add a few missing initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120350
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 29 Nov 2010 23:35:49 +0000 (23:35 +0000)]
Support/PathV2: Fix 80 col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120349
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 29 Nov 2010 23:35:35 +0000 (23:35 +0000)]
Support/PathV2: Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120348
91177308-0d34-0410-b5e6-
96231b3b80d8