History log of /llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (Results 1201 – 1225 of 2094)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2afea543 06-Oct-2015 Joseph Tremoulet <jotrem@microsoft.com>

[WinEH] Recognize CoreCLR personality function

Summary:
- Add CoreCLR to if/else ladders and switches as appropriate.
- Rename isMSVCEHPersonality to isFuncletEHPersonality to better
reflect wh

[WinEH] Recognize CoreCLR personality function

Summary:
- Add CoreCLR to if/else ladders and switches as appropriate.
- Rename isMSVCEHPersonality to isFuncletEHPersonality to better
reflect what it captures.

Reviewers: majnemer, andrew.w.kaylor, rnk

Subscribers: pgavlin, AndyAyers, llvm-commits

Differential Revision: http://reviews.llvm.org/D13449

llvm-svn: 249455

show more ...


# 429c8eda 04-Oct-2015 David Majnemer <david.majnemer@gmail.com>

[SelectionDAGBuilder] Remove dead code

We already check for LandingPadInst two lines above.

llvm-svn: 249280


# f828a0cc 01-Oct-2015 David Majnemer <david.majnemer@gmail.com>

[WinEH] Make FuncletLayout more robust against catchret

Catchret transfers control from a catch funclet to an earlier funclet.
However, it is not completely clear which funclet the catchret target i

[WinEH] Make FuncletLayout more robust against catchret

Catchret transfers control from a catch funclet to an earlier funclet.
However, it is not completely clear which funclet the catchret target is
part of. Make this clear by stapling the catchret target's funclet
membership onto the CATCHRET SDAG node.

llvm-svn: 249052

show more ...


# 096492a0 01-Oct-2015 NAKAMURA Takumi <geek4civic@gmail.com>

Reformat.

llvm-svn: 249033


# 1ed20db7 01-Oct-2015 NAKAMURA Takumi <geek4civic@gmail.com>

Revert r248959, "[WinEH] Emit int3 after noreturn calls on Win64"

It broke; LLVM :: CodeGen__Generic__2009-11-16-BadKillsCrash.ll

llvm-svn: 249032


# 6dec87a8 30-Sep-2015 Reid Kleckner <rnk@google.com>

[WinEH] Emit int3 after noreturn calls on Win64

The Win64 unwinder disassembles forwards from each PC to try to
determine if this PC is in an epilogue. If so, it skips calling the EH
personality fun

[WinEH] Emit int3 after noreturn calls on Win64

The Win64 unwinder disassembles forwards from each PC to try to
determine if this PC is in an epilogue. If so, it skips calling the EH
personality function for that frame. Typically, this means you cannot
catch an exception in the same frame that you threw it, because 'throw'
calls a noreturn runtime function.

Previously we avoided this problem with the TrapUnreachable
TargetOption, but that's a much bigger hammer than we need. All we need
is a 1 byte non-epilogue instruction right after the call. Instead,
what we got was an unconditional branch to a shared block containing the
ud2, potentially 7 bytes instead of 1. So, this reverts r206684, which
added TrapUnreachable, and replaces it with something better.

The new code pattern matches for invoke/call followed by unreachable and
inserts an int3 into the DAG. To be 100% watertight, we would need to
insert SEH_Epilogue instructions into all basic blocks ending in a call
with no terminators or successors, but in practice this is unlikely to
come up.

llvm-svn: 248959

show more ...


# f608111d 30-Sep-2015 Evgeniy Stepanov <eugeni.stepanov@gmail.com>

Fix debug info with SafeStack.

llvm-svn: 248933


# a80c1512 29-Sep-2015 David Majnemer <david.majnemer@gmail.com>

[WinEH] Teach AsmPrinter about funclets

Summary:
Funclets have been turned into functions by the time they hit the object
file. Make sure that they have decent names for the symbol table and
CFI di

[WinEH] Teach AsmPrinter about funclets

Summary:
Funclets have been turned into functions by the time they hit the object
file. Make sure that they have decent names for the symbol table and
CFI directives explaining how to reason about their prologues.

Differential Revision: http://reviews.llvm.org/D13261

llvm-svn: 248824

show more ...


# c71d6275 28-Sep-2015 Reid Kleckner <rnk@google.com>

[WinEH] Fix ip2state table emission with funclets

Previously we were hijacking the old LandingPadInfo data structures to
communicate our state numbers. Now we don't need that anymore.

llvm-svn: 248

[WinEH] Fix ip2state table emission with funclets

Previously we were hijacking the old LandingPadInfo data structures to
communicate our state numbers. Now we don't need that anymore.

llvm-svn: 248763

show more ...


# 9def6efd 23-Sep-2015 Cong Hou <congh@google.com>

Fixed an issue on updating profile data when lowering switch statement.

Fixed the issue that when there is an edge from the jump table to the default statement, we should check it directly instead o

Fixed an issue on updating profile data when lowering switch statement.

Fixed the issue that when there is an edge from the jump table to the default statement, we should check it directly instead of checking if the sibling of the jump table header is a successor of the jump table header, which may not be the default statment but a successor of it.

llvm-svn: 248354

show more ...


# dd0eadce 18-Sep-2015 Bob Wilson <bob.wilson@apple.com>

Whitespace. Indent with spaces instead of a tab.

llvm-svn: 247969


# a260701b 16-Sep-2015 Sanjay Patel <spatel@rotateright.com>

propagate fast-math-flags on DAG nodes

After D10403, we had FMF in the DAG but disabled by default. Nick reported no crashing errors after some stress testing,
so I enabled them at r243687. However

propagate fast-math-flags on DAG nodes

After D10403, we had FMF in the DAG but disabled by default. Nick reported no crashing errors after some stress testing,
so I enabled them at r243687. However, Escha soon notified us of a bug not covered by any in-tree regression tests:
if we don't propagate the flags, we may fail to CSE DAG nodes because differing FMF causes them to not match. There is
one test case in this patch to prove that point.

This patch hopes to fix or leave a 'TODO' for all of the in-tree places where we create nodes that are FMF-capable. I
did this by putting an assert in SelectionDAG.getNode() to find any FMF-capable node that was being created without FMF
( D11807 ). I then ran all regression tests and test-suite and confirmed that everything passes.

This patch exposes remaining work to get DAG FMF to be fully functional: (1) add the flags to non-binary nodes such as
FCMP, FMA and FNEG; (2) add the flags to intrinsics; (3) use the flags as conditions for transforms rather than the
current global settings.

Differential Revision: http://reviews.llvm.org/D12095

llvm-svn: 247815

show more ...


# 78783912 10-Sep-2015 Reid Kleckner <rnk@google.com>

[WinEH] Add codegen support for cleanuppad and cleanupret

All of the complexity is in cleanupret, and it mostly follows the same
codepaths as catchret, except it doesn't take a return value in RAX.

[WinEH] Add codegen support for cleanuppad and cleanupret

All of the complexity is in cleanupret, and it mostly follows the same
codepaths as catchret, except it doesn't take a return value in RAX.

This small example now compiles and executes successfully on win32:
extern "C" int printf(const char *, ...) noexcept;
struct Dtor {
~Dtor() { printf("~Dtor\n"); }
};
void has_cleanup() {
Dtor o;
throw 42;
}
int main() {
try {
has_cleanup();
} catch (int) {
printf("caught it\n");
}
}

Don't try to put the cleanup in the same function as the catch, or Bad
Things will happen.

llvm-svn: 247219

show more ...


# 94b704c4 09-Sep-2015 Reid Kleckner <rnk@google.com>

[SEH] Emit 32-bit SEH tables for the new EH IR

The 32-bit tables don't actually contain PC range data, so emitting them
is incredibly simple.

The 64-bit tables, on the other hand, use the same tabl

[SEH] Emit 32-bit SEH tables for the new EH IR

The 32-bit tables don't actually contain PC range data, so emitting them
is incredibly simple.

The 64-bit tables, on the other hand, use the same table for state
numbering as well as label ranges. This makes things more difficult, so
it will be implemented later.

llvm-svn: 247192

show more ...


# 51189f0a 08-Sep-2015 Reid Kleckner <rnk@google.com>

[WinEH] Avoid creating MBBs for LLVM BBs that cannot contain code

Typically these are catchpads, which hold data used to decide whether to
catch the exception or continue unwinding. We also shouldn'

[WinEH] Avoid creating MBBs for LLVM BBs that cannot contain code

Typically these are catchpads, which hold data used to decide whether to
catch the exception or continue unwinding. We also shouldn't create MBBs
for catchendpads, cleanupendpads, or terminatepads, since no real code
can live in them.

This fixes a problem where MI passes (like the register allocator) would
try to put code into catchpad blocks, which are not executed by the
runtime. In the new world, blocks ending in invokes now have many
possible successors.

llvm-svn: 247102

show more ...


# 9ce71f76 03-Sep-2015 Joseph Tremoulet <jotrem@microsoft.com>

[WinEH] Add cleanupendpad instruction

Summary:
Add a `cleanupendpad` instruction, used to mark exceptional exits out of
cleanups (for languages/targets that can abort a cleanup with another
exceptio

[WinEH] Add cleanupendpad instruction

Summary:
Add a `cleanupendpad` instruction, used to mark exceptional exits out of
cleanups (for languages/targets that can abort a cleanup with another
exception). The `cleanupendpad` instruction is similar to the `catchendpad`
instruction in that it is an EH pad which is the target of unwind edges in
the handler and which itself has an unwind edge to the next EH action.
The `cleanupendpad` instruction, similar to `cleanupret` has a `cleanuppad`
argument indicating which cleanup it exits. The unwind successors of a
`cleanuppad`'s `cleanupendpad`s must agree with each other and with its
`cleanupret`s.

Update WinEHPrepare (and docs/tests) to accomodate `cleanupendpad`.

Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12433

llvm-svn: 246751

show more ...


# fff7c6dc 02-Sep-2015 Sanjay Patel <spatel@rotateright.com>

use "unpredictable" metadata in SelectionDAG when splitting compares

This patch uses the metadata defined in D12341 to avoid creating an unpredictable branch.

Differential Revision: http://reviews.

use "unpredictable" metadata in SelectionDAG when splitting compares

This patch uses the metadata defined in D12341 to avoid creating an unpredictable branch.

Differential Revision: http://reviews.llvm.org/D12343

llvm-svn: 246691

show more ...


# 1b9d6914 02-Sep-2015 Elena Demikhovsky <elena.demikhovsky@intel.com>

Optimization for Gather/Scatter with uniform base
Vector 'getelementptr' with scalar base is an opportunity for gather/scatter intrinsic to generate a better sequence.
While looking for uniform base,

Optimization for Gather/Scatter with uniform base
Vector 'getelementptr' with scalar base is an opportunity for gather/scatter intrinsic to generate a better sequence.
While looking for uniform base, we want to use the scalar base pointer of GEP, if exists.

Differential Revision: http://reviews.llvm.org/D11121

llvm-svn: 246622

show more ...


# 511298b9 01-Sep-2015 Cong Hou <congh@google.com>

Distribute the weight on the edge from switch to default statement to edges generated in lowering switch.

Currently, when edge weights are assigned to edges that are created when lowering switch sta

Distribute the weight on the edge from switch to default statement to edges generated in lowering switch.

Currently, when edge weights are assigned to edges that are created when lowering switch statement, the weight on the edge to default statement (let's call it "default weight" here) is not considered. We need to distribute this weight properly. However, without value profiling, we have no idea how to distribute it. In this patch, I applied the heuristic that this weight is evenly distributed to successors.

For example, given a switch statement with cases 1,2,3,5,10,11,20, and every edge from switch to each successor has weight 10. If there is a binary search tree built to test if n < 10, then its two out-edges will have weight 4x10+10/2 = 45 and 3x10 + 10/2 = 35 respectively (currently they are 40 and 30 without considering the default weight). Each distribution (which is 5 here) will be stored in each SwitchWorkListItem for further distribution.

There are some exceptions:

For a jump table header which doesn't have any edge to default statement, we don't distribute the default weight to it.
For a bit test header which covers a contiguous range and hence has no edges to default statement, we don't distribute the default weight to it.
When the branch checks a single value or a contiguous range with no edge to default statement, we don't distribute the default weight to it.
In other cases, the default weight is evenly distributed to successors.

Differential Revision: http://reviews.llvm.org/D12418

llvm-svn: 246522

show more ...


# 3b1d3b0d 30-Aug-2015 Renato Golin <renato.golin@linaro.org>

Revert "Revert "New interface function is added to VectorUtils Value *getSplatValue(Value *Val);""

This reverts commit r246379. It seems that the commit was not the culprit,
and the bot will be inve

Revert "Revert "New interface function is added to VectorUtils Value *getSplatValue(Value *Val);""

This reverts commit r246379. It seems that the commit was not the culprit,
and the bot will be investigated for instability.

llvm-svn: 246380

show more ...


# c7be3173 30-Aug-2015 Renato Golin <renato.golin@linaro.org>

Revert "New interface function is added to VectorUtils Value *getSplatValue(Value *Val);"

This reverts commit r246371, as it cause a rather obscure bug in AArch64
test-suite paq8p (time outs, seg-fa

Revert "New interface function is added to VectorUtils Value *getSplatValue(Value *Val);"

This reverts commit r246371, as it cause a rather obscure bug in AArch64
test-suite paq8p (time outs, seg-faults). I'll investigate it before
reapplying.

llvm-svn: 246379

show more ...


# a59fcfa5 30-Aug-2015 Elena Demikhovsky <elena.demikhovsky@intel.com>

New interface function is added to VectorUtils
Value *getSplatValue(Value *Val);

It complements the CreateVectorSplat(), which creates 2 instructions - insertelement and shuffle with all-zero mask.

New interface function is added to VectorUtils
Value *getSplatValue(Value *Val);

It complements the CreateVectorSplat(), which creates 2 instructions - insertelement and shuffle with all-zero mask.

The new function recognizes the pattern - insertelement+shuffle and returns the splat value (or nullptr).
It also returns a splat value form ConstantDataVector, for completeness.

Differential Revision: http://reviews.llvm.org/D11124

llvm-svn: 246371

show more ...


# 0e288234 27-Aug-2015 Reid Kleckner <rnk@google.com>

[WinEH] Add some support for code generating catchpad

We can now run 32-bit programs with empty catch bodies. The next step
is to change PEI so that we get funclet prologues and epilogues.

llvm-sv

[WinEH] Add some support for code generating catchpad

We can now run 32-bit programs with empty catch bodies. The next step
is to change PEI so that we get funclet prologues and epilogues.

llvm-svn: 246235

show more ...


Revision tags: llvmorg-3.7.0
# 08cb4fc6 27-Aug-2015 Cong Hou <congh@google.com>

Fixed a bug that edge weights are not assigned correctly when lowering switch statement.

This is a one-line-change patch that moves the update to UnhandledWeights to the correct position: it should

Fixed a bug that edge weights are not assigned correctly when lowering switch statement.

This is a one-line-change patch that moves the update to UnhandledWeights to the correct position: it should be updated for all clusters instead of just range clusters.

Differential Revision: http://reviews.llvm.org/D12391

llvm-svn: 246129

show more ...


Revision tags: llvmorg-3.7.0-rc4
# 03127700 26-Aug-2015 Cong Hou <congh@google.com>

Assign weights to edges to jump table / bit test header when lowering switch statement.

Currently, when lowering switch statement and a new basic block is built for jump table / bit test header, the

Assign weights to edges to jump table / bit test header when lowering switch statement.

Currently, when lowering switch statement and a new basic block is built for jump table / bit test header, the edge to this new block is not assigned with a correct weight. This patch collects the edge weight from all its successors and assign this sum of weights to the edge (and also the other fall-through edge). Test cases are adjusted accordingly.

Differential Revision: http://reviews.llvm.org/D12166#fae6eca7

llvm-svn: 246104

show more ...


1...<<41424344454647484950>>...84