| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 148487
|
|
|
|
|
|
|
|
|
|
|
|
| |
present in the bottom of the CFG triangle, as the transformation isn't
ever valuable if the branch can't be eliminated.
Also, unify some heuristics between SimplifyCFG's multiple
if-converters, for consistency.
This fixes rdar://10627242.
llvm-svn: 147630
|
|
|
|
|
|
|
|
| |
code can incorrectly move the load across a store. This never
happens in practice today, but only because the current
heuristics accidentally preclude it.
llvm-svn: 147623
|
|
|
|
| |
llvm-svn: 147307
|
|
|
|
| |
llvm-svn: 147292
|
|
|
|
|
|
|
| |
to discard weights when appropriate. Still more to do (and a new TODO), but
it's a start!
llvm-svn: 147286
|
|
|
|
| |
llvm-svn: 147280
|
|
|
|
| |
llvm-svn: 147279
|
|
|
|
| |
llvm-svn: 147036
|
|
|
|
|
|
| |
Hope I did this correctly :)
llvm-svn: 146834
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
depending on previous branch on same comparison operands.
For example,
if (a == b) {
if (a > b) // this is false
Fixes some of the issues on <rdar://problem/10554090>
llvm-svn: 146822
|
|
|
|
|
|
|
|
|
| |
into Analysis as a standalone function, since there's no need for
it to be in VMCore. Also, update it to use isKnownNonZero and
other goodies available in Analysis, making it more precise,
enabling more aggressive optimization.
llvm-svn: 146610
|
|
|
|
|
|
| |
exception.
llvm-svn: 139117
|
|
|
|
|
|
|
|
| |
- Reword comments.
- Allow undefined behavior interfering with undefined behavior.
- Add address space checks.
llvm-svn: 138619
|
|
|
|
|
|
|
|
|
|
| |
or store to the address returned by the PHI node then we can consider this incoming value as dead and remove the edge pointing there, unless there are instructions that can affect control flow executed in between.
In theory this could be extended to other instructions, eg. division by zero, but it's likely that it will "miscompile" some code because people depend on div by zero not trapping. NULL pointer dereference usually leads to a crash so we should be on the safe side.
This shrinks the size of a Release clang by 16k on x86_64.
llvm-svn: 138618
|
|
|
|
| |
llvm-svn: 137743
|
|
|
|
|
|
| |
to be wrong (or at least somewhat suspect). Leave a FIXME for Bill.
llvm-svn: 137694
|
|
|
|
| |
llvm-svn: 137693
|
|
|
|
|
|
|
|
| |
This commit includes a mention of the landingpad instruction, but it's not
changing the behavior around it. I think the current behavior is correct,
though. Bill, can you double-check that?
llvm-svn: 137691
|
|
|
|
| |
llvm-svn: 135375
|
|
|
|
| |
llvm-svn: 135265
|
|
|
|
|
|
|
|
|
| |
nodes.
Original message:
Let simplify cfg simplify bb with only debug and lifetime intrinsics.
llvm-svn: 134182
|
|
|
|
|
|
| |
lifetime intrinsics" due to buildbot failures.
llvm-svn: 134071
|
|
|
|
| |
llvm-svn: 134057
|
|
|
|
|
|
|
|
|
|
|
| |
In cases such as the attached test, where the case value for a switch
destination is used in a phi node that follows the destination, it
might be better to replace that value with the condition value of the
switch, so that more blocks can be folded away with
TryToSimplifyUncondBranchFromEmptyBlock because there are less
conflicts in the phi node.
llvm-svn: 133344
|
|
|
|
|
|
|
|
|
|
|
|
| |
then we don't want to set the destination in the indirect branch to the
destination. This is because the indirect branch needs its destinations to have
had their block addresses taken. This isn't so of the new critical edge that's
split during this process. If it turns out that the destination block has only
one predecessor, and that being a BB with an indirect branch, then it won't be
marked as 'used' and may be removed.
PR10072
llvm-svn: 132638
|
|
|
|
|
|
|
|
| |
to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior.
I also changed -simplifycfg, -jump-threading and -codegenprepare to use this to produce slightly better code without any extra cleanup passes (AFAICT this was the only place in -simplifycfg where now-dead conditions of replaced terminators weren't being cleaned up). The only other user of this function is -sccp, but I didn't read that thoroughly enough to figure out whether it might be holding pointers to instructions that could be deleted by this.
llvm-svn: 131855
|
|
|
|
| |
llvm-svn: 131673
|
|
|
|
| |
llvm-svn: 131620
|
|
|
|
| |
llvm-svn: 131609
|
|
|
|
| |
llvm-svn: 131607
|
|
|
|
| |
llvm-svn: 131605
|
|
|
|
| |
llvm-svn: 131598
|
|
|
|
| |
llvm-svn: 131580
|
|
|
|
| |
llvm-svn: 131571
|
|
|
|
| |
llvm-svn: 131566
|
|
|
|
| |
llvm-svn: 131561
|
|
|
|
| |
llvm-svn: 131552
|
|
|
|
| |
llvm-svn: 131551
|
|
|
|
| |
llvm-svn: 131548
|
|
|
|
| |
llvm-svn: 131545
|
|
|
|
| |
llvm-svn: 131508
|
|
|
|
| |
llvm-svn: 131345
|
|
|
|
| |
llvm-svn: 130528
|
|
|
|
| |
llvm-svn: 130527
|
|
|
|
|
|
| |
phi node folding
llvm-svn: 130526
|
|
|
|
|
|
|
|
|
|
|
|
| |
instruction around, reducing work.
Greatly simplify handling of debug instructions. There is no need to
build up a vector of them and then move them into the one predecessor
if we're processing a block. Instead just rescan the block and *copy*
them into the pred. If a block gets merged into multiple preds, this
will retain more debug info.
llvm-svn: 129502
|
|
|
|
| |
llvm-svn: 129319
|
|
|
|
| |
llvm-svn: 129114
|
|
|
|
|
|
| |
match.
llvm-svn: 129078
|