aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-09-23 15:41:09 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-09-23 15:41:09 +0000
commitfa36bde2f66825e27aac7d753efc11e7549a9f84 (patch)
treea169cf6809cfb949978ba93e37166a0626f8c58d /llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
parent2a6c13274c5cc36654073f3865f7bdf5bf10250d (diff)
downloadllvm-fa36bde2f66825e27aac7d753efc11e7549a9f84.zip
llvm-fa36bde2f66825e27aac7d753efc11e7549a9f84.tar.gz
llvm-fa36bde2f66825e27aac7d753efc11e7549a9f84.tar.bz2
[DeadArgElim] Split the invoke successor edge
Invoking a function which returns an aggregate can sometimes be transformed to return a scalar value. However, this means that we need to create an insertvalue instruction(s) to recreate the correct aggregate type. We achieved this by inserting an insertvalue instruction at the invoke's normal successor. However, this is not feasible if the normal successor uses the invoke's return value inside a PHI node. Instead, split the edge between the invoke and the unwind successor and create the insertvalue instruction in the new basic block. The new basic block's successor will be the old invoke successor which leaves us with IR which is well behaved. This fixes PR24906. llvm-svn: 248387
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp')
0 files changed, 0 insertions, 0 deletions