1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 08:23:21 +01:00
llvm-mirror/test/Transforms
Chris Lattner e74d980a02 make simplifycfg insert an llvm.trap before the 'unreachable' it introduces
when it detects undefined behavior.  llvm.trap generally codegens into some
thing really small (e.g. a 2 byte ud2 instruction on x86) and debugging this
sort of thing is "nontrivial".  For example, we now compile:

void foo() { *(int*)0 = 42; }

into:

_foo:
	pushl	%ebp
	movl	%esp, %ebp
	ud2

Some may even claim that this is a security hole, though that seems dubious
to me.  This addresses rdar://7958343 - Optimizing away null dereference 
potentially allows arbitrary code execution

llvm-svn: 103356
2010-05-08 22:15:59 +00:00
..
ABCD
ADCE
ArgumentPromotion Fix rdar://7879828 - crash in CallGraph, a self host issue. 2010-04-20 00:46:50 +00:00
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp
DeadArgElim Preserve debug info attached with call instruction while eliminating dead argument. 2010-04-30 20:23:54 +00:00
DeadStoreElimination
FunctionAttrs
GlobalDCE
GlobalOpt Use llvm.foo as the intrinsic, rather than llvm.dbg.value. Since the 2010-05-04 20:09:25 +00:00
GVN Fix PR7052, patch by Jakub Staszak! 2010-05-08 20:01:44 +00:00
IndVarSimplify Remove the Expr member from IVUsers. Instead of remembering the expression, 2010-04-19 21:48:58 +00:00
Inline revert r102831. We already delete dead readonly calls in 2010-05-01 17:19:38 +00:00
InstCombine Teach instcombine to transform a bitcast/(zext|trunc)/bitcast sequence 2010-05-08 21:50:26 +00:00
Internalize
IPConstantProp
JumpThreading fix PR6743, a case where we'd delete an instruction before using it 2010-04-10 18:26:57 +00:00
LCSSA
LICM
LoopDeletion
LoopIndexSplit Check for side effects before splitting loop. 2010-05-03 18:06:58 +00:00
LoopRotate
LoopSimplify
LoopStrengthReduce
LoopUnroll
LoopUnswitch RewriteLoopBodyWithConditionConstant can end up rewriting the 2010-04-20 05:09:16 +00:00
LowerInvoke
LowerSetJmp
LowerSwitch
Mem2Reg Update test to use valid debug info. 2010-05-07 20:34:00 +00:00
MemCpyOpt
MergeFunc
PruneEH fix some failures my callgraph dump format change broke. 2010-04-23 18:38:40 +00:00
Reassociate
ScalarRepl move comment. 2010-04-16 01:05:52 +00:00
SCCP fix PR6940: sitofp(undef) folds to 0.0, not undef. 2010-04-26 18:21:23 +00:00
SimplifyCFG make simplifycfg insert an llvm.trap before the 'unreachable' it introduces 2010-05-08 22:15:59 +00:00
SimplifyLibCalls
Sink Add an LLVM IR version of code sinking. This uses the same simple algorithm 2010-05-07 15:40:13 +00:00
SRETPromotion
SSI
StripSymbols
TailCallElim Refine the detection of seemingly infinitely recursive calls where the 2010-04-16 15:57:50 +00:00
TailDup