Devang Patel
7de6c4bf75
Use IRBuilder while simplifying branch.
...
llvm-svn: 131598
2011-05-18 23:18:47 +00:00
Eli Friedman
1754a25977
More instcombine simplifications towards better debug locations.
...
llvm-svn: 131596
2011-05-18 23:11:30 +00:00
Devang Patel
dd14e0f7fa
Use IRBuilder while simplifying return instruction.
...
llvm-svn: 131580
2011-05-18 21:33:11 +00:00
Dan Gohman
3268e4d692
When forming an ICmpZero LSRUse, normalize the non-IV operand
...
of the comparison, so that the resulting expression is fully
normalized. This fixes PR9939.
llvm-svn: 131576
2011-05-18 21:02:18 +00:00
Devang Patel
583805530c
Spread use of IRBuilder even more.
...
llvm-svn: 131571
2011-05-18 20:53:17 +00:00
Devang Patel
a7ec47d23c
Use IRBuilder while simplifying switch instruction.
...
llvm-svn: 131566
2011-05-18 20:35:38 +00:00
Devang Patel
0b373dca1f
Use IRBuilder while simplifying unwind.
...
llvm-svn: 131561
2011-05-18 20:01:18 +00:00
Eli Friedman
49346010f8
More instcombine cleanup aimed towards improving debug line info.
...
llvm-svn: 131559
2011-05-18 19:57:14 +00:00
Devang Patel
2c2ea226b7
Use IRBuilder while simplifying terminator.
...
llvm-svn: 131552
2011-05-18 18:43:31 +00:00
Devang Patel
767f6930bc
Use IRBuilder while simplifying unconditional branch.
...
llvm-svn: 131551
2011-05-18 18:28:48 +00:00
Devang Patel
5c810ce4a3
Use IRBuilder while folding two entry PHINode.
...
llvm-svn: 131548
2011-05-18 18:16:44 +00:00
Eli Friedman
2fd66441c6
Switch more inst insertion in instcombine to IRBuilder.
...
llvm-svn: 131547
2011-05-18 18:10:28 +00:00
Devang Patel
15ad6761da
Set up IRBuilder for use during simplification.
...
llvm-svn: 131545
2011-05-18 18:01:27 +00:00
Eli Friedman
0b43b9ee98
Switch more inst insertion in instcombine to IRBuilder.
...
llvm-svn: 131544
2011-05-18 17:58:37 +00:00
Matt Beaumont-Gay
8fa6ebf975
fix typo
...
llvm-svn: 131543
2011-05-18 17:37:10 +00:00
Eli Friedman
cde9c1628c
Switch inst insertion in instcombine transform to IRBuilder.
...
llvm-svn: 131542
2011-05-18 17:31:55 +00:00
Devang Patel
1fabbe921b
Use IRBuiler while constant folding terminator.
...
llvm-svn: 131541
2011-05-18 17:26:46 +00:00
Stuart Hastings
728f6260b9
Fix inelegant initialization.
...
llvm-svn: 131538
2011-05-18 15:54:26 +00:00
Duncan Sands
3d9407f4eb
Revert commit 131534 since it seems to have broken several buildbots.
...
Original log entry:
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.
llvm-svn: 131536
2011-05-18 14:57:56 +00:00
Nadav Rotem
c5c27ede55
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
...
code in one place.
llvm-svn: 131534
2011-05-18 12:26:38 +00:00
Eli Friedman
96254a0d53
Start trying to make InstCombine preserve more debug info. The idea here is to set the debug location on the IRBuilder, which will be then right location in most cases. This should magically give many transformations debug locations, and fixing places which are missing a debug location will usually just means changing the code creating it to use the IRBuilder.
...
As an example, the change to InstCombineCalls catches a common case where a call to a bitcast of a function is rewritten.
Chris, does this approach look reasonable?
llvm-svn: 131516
2011-05-18 01:28:27 +00:00
Eli Friedman
b9ed18f2cb
Use ReplaceInstUsesWith instead of replaceAllUsesWith where appropriate in instcombine.
...
llvm-svn: 131512
2011-05-18 00:32:01 +00:00
Devang Patel
b849cd511b
Preseve line numbers while simplifying CFG.
...
llvm-svn: 131508
2011-05-17 23:29:05 +00:00
Bill Wendling
0671ba8448
Conditionalize the format of the GCOV files by target type. Darwin uses the 4.2
...
format.
llvm-svn: 131503
2011-05-17 23:05:13 +00:00
Stuart Hastings
5bd18b6638
X86 pmovsx/pmovzx ignore the upper half of their inputs.
...
rdar://problem/6945110
llvm-svn: 131493
2011-05-17 22:13:31 +00:00
Devang Patel
341b38c22a
Preserve line number information.
...
llvm-svn: 131482
2011-05-17 20:00:02 +00:00
Devang Patel
c5933f2418
Set debug loc for new load instruction.
...
llvm-svn: 131481
2011-05-17 19:43:38 +00:00
Devang Patel
c23bcbc498
Preserve line number information.
...
llvm-svn: 131480
2011-05-17 19:43:06 +00:00
Devang Patel
a0b682db62
There is no need to force DebugLoc on a PHI at this point.
...
llvm-svn: 131427
2011-05-16 22:05:03 +00:00
Devang Patel
8e60ff11db
Preserve debug info for unused zero extended boolean argument.
...
Radar 9422775.
llvm-svn: 131422
2011-05-16 21:24:05 +00:00
Rafael Espindola
2050af838d
Don't do tail calls in a function that call setjmp. The stack might be
...
corrupted when setjmp returns again.
llvm-svn: 131399
2011-05-16 03:05:33 +00:00
Benjamin Kramer
d96205c4e5
SimplifyCFG: Use ComputeMaskedBits to prune dead cases from switch instructions.
...
llvm-svn: 131345
2011-05-14 15:57:25 +00:00
Stuart Hastings
66a82b966e
Avoid combining GEPs that might overflow at runtime.
...
rdar://problem/9267970
Patch by Julien Lerouge!
llvm-svn: 131339
2011-05-14 05:55:10 +00:00
Julien Lerouge
7e11f9e26d
Fix a source of non determinism in FindUsedTypes, use a SetVector instead of a
...
set.
rdar://9423996
llvm-svn: 131283
2011-05-13 05:20:42 +00:00
Andrew Trick
03957dfeb1
Convert SimplifyIVUsers into a worklist instead of a single pass over
...
the users.
llvm-svn: 131277
2011-05-13 01:12:21 +00:00
Andrew Trick
81683ed232
indvars: Added SimplifyIVUsers.
...
Interleave IV simplifications. Currently involves EliminateComparison
and EliminateRemainder. Next I'll add EliminateExtend.
llvm-svn: 131210
2011-05-12 00:04:28 +00:00
Devang Patel
3fd06f760b
Preserve line number information.
...
llvm-svn: 131112
2011-05-10 00:03:11 +00:00
Duncan Sands
a071c82900
Fix PR9820: a read-only call differs from a load in that a load doesn't
...
return the pointer being dereferenced, it returns the pointee, but a call
might return the pointer itself.
llvm-svn: 130979
2011-05-06 10:30:37 +00:00
Nick Lewycky
a7028848a1
The computation of string length is not that complicated. Fix it, again. :)
...
llvm-svn: 130967
2011-05-05 23:52:18 +00:00
Eli Friedman
8a20e66926
PR9838: Fix transform introduced in r127064 to not trigger when only one side of the icmp is an exact shift.
...
llvm-svn: 130954
2011-05-05 21:59:18 +00:00
Nick Lewycky
4f9c367f0b
Update the gcov version used slightly, to make it stop causing modern gcov's to
...
crash.
llvm-svn: 130911
2011-05-05 02:46:38 +00:00
Nick Lewycky
baa878ce4a
Remove dead function.
...
llvm-svn: 130903
2011-05-05 00:17:34 +00:00
Nick Lewycky
a3d5d167a8
When the path wasn't emitted by the frontend, discard any path on the source
...
filename.
llvm-svn: 130897
2011-05-05 00:03:30 +00:00
Devang Patel
ffb798c1c6
Set debug loc for new instructions.
...
llvm-svn: 130895
2011-05-04 23:58:50 +00:00
Devang Patel
ac794d46bf
Set debug location for new PHI nodes created in exit block.
...
llvm-svn: 130894
2011-05-04 23:58:22 +00:00
Devang Patel
306f8db721
Preserve line number information while threading jumps.
...
llvm-svn: 130880
2011-05-04 22:48:19 +00:00
Devang Patel
c7e4fa7c19
Preserve line number info.
...
llvm-svn: 130876
2011-05-04 21:58:58 +00:00
Devang Patel
0daa07eb90
preserve line number info.
...
llvm-svn: 130869
2011-05-04 21:37:05 +00:00
Nick Lewycky
6d9f061a6b
Emit gcov data files to the directory specified in the metadata produced by the
...
frontend, if applicable.
llvm-svn: 130835
2011-05-04 04:03:04 +00:00
Andrew Trick
1abe296cfd
indvars: Added DisableIVRewrite and WidenIVs.
...
This adds functionality to remove size/zero extension during indvars
without generating a canonical IV and rewriting all IV users. It's
disabled by default so should have no effect on codegen. Work in progress.
llvm-svn: 130829
2011-05-04 02:10:13 +00:00