| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
llvm-svn: 129041
|
|
|
|
|
|
| |
values also.
llvm-svn: 129035
|
|
|
|
|
|
| |
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
|
|
|
|
| |
llvm-svn: 128535
|
|
|
|
|
|
| |
of pointers in an std::map.
llvm-svn: 127650
|
|
|
|
|
|
|
|
| |
reachable uses, but there still might be uses in dead blocks. Use the
standard solution of replacing all the uses with undef. This is
a rare case because it's very sensitive to phase ordering in SimplifyCFG.
llvm-svn: 127299
|
|
|
|
|
|
|
|
| |
branch.
Based on a patch by Alistair Lynn.
llvm-svn: 126647
|
|
|
|
|
|
|
| |
Yes, there are other types than i8* and GEPs on them can produce an add+multiply.
We don't consider that cheap enough to be speculatively executed.
llvm-svn: 126481
|
|
|
|
| |
llvm-svn: 126452
|
|
|
|
|
|
| |
unconditionally.
llvm-svn: 126445
|
|
|
|
|
|
|
|
| |
switch. If we used only one icmp, don't turn it into a switch.
Also prevent the switch-to-icmp transform from creating identity adds, noticed by Marius Wachtler.
llvm-svn: 125056
|
|
|
|
|
|
|
|
| |
are not sorted into sub+icmp.
This transforms another 1000 switches in gcc.c.
llvm-svn: 124826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the job of the later optzn passes easier, allowing the vast amount of
icmp transforms to chew on it.
We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting
binary on i386-linux.
The testcase from README.txt now compiles into
decl %edi
cmpl $3, %edi
sbbl %eax, %eax
andl $1, %eax
ret
llvm-svn: 124724
|