1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib
Bill Wendling 991234752d Handle code gen for the unreachable instruction if it's the only instruction in
the function. We'll just turn it into a "trap" instruction instead.

The problem with not handling this is that it might generate a prologue without
the equivalent epilogue to go with it:

$ cat t.ll
define void @foo() {
entry:
  unreachable
}
$ llc -o - t.ll -relocation-model=pic -disable-fp-elim -unwind-tables
        .section        __TEXT,__text,regular,pure_instructions
        .globl  _foo
        .align  4, 0x90
_foo:                                   ## @foo
Leh_func_begin0:
## BB#0:                                ## %entry
        pushq   %rbp
Ltmp0:
        movq    %rsp, %rbp
Ltmp1:
Leh_func_end0:
...

The unwind tables then have bad data in them causing all sorts of problems.

Fixes <rdar://problem/8096481>.

llvm-svn: 108473
2010-07-15 23:32:40 +00:00
..
Analysis Teach ScalarEvolution how to fold trunc(undef) and anyext(undef) to undef. 2010-07-15 20:02:11 +00:00
Archive Eliminate some unnessary Path::exists() calls. 2010-05-27 20:51:54 +00:00
AsmParser Factor out metadata parsing into a separate function. 2010-07-14 18:26:50 +00:00
Bitcode Add support for empty metadata nodes: !{}. 2010-07-13 19:33:27 +00:00
CodeGen Handle code gen for the unreachable instruction if it's the only instruction in 2010-07-15 23:32:40 +00:00
CompilerDriver 80-col violation. 2010-07-01 01:00:27 +00:00
ExecutionEngine Convert some tab stops into spaces. 2010-07-12 08:16:59 +00:00
Linker Revert r107205 and r107207. 2010-06-29 22:34:52 +00:00
MC fix indentation and 80 cols 2010-07-15 21:19:31 +00:00
Support Don't pass StringRef by reference. 2010-07-14 22:38:02 +00:00
System Rather than using an ifdef on the target to zero out fields, 2010-07-14 14:32:33 +00:00
Target Split -enable-finite-only-fp-math to two options: 2010-07-15 22:07:12 +00:00
Transforms Don't merge uses when they are targetting fixup sites with 2010-07-15 20:24:58 +00:00
VMCore Don't pass StringRef by reference. 2010-07-14 22:38:02 +00:00
Makefile