llvm-6502/test/Transforms
Chris Lattner c7d7e0cbe0 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103356 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 22:15:59 +00:00
..
ABCD Revert my previous patch to ABCD and fix things the right way. There are two problems addressed 2009-11-09 00:44:44 +00:00
ADCE Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
ArgumentPromotion Fix rdar://7879828 - crash in CallGraph, a self host issue. 2010-04-20 00:46:50 +00:00
BlockPlacement Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
BranchFolding Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
CodeExtractor Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
CodeGenPrepare Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
ConstantMerge 1. modernize the constantmerge pass, using densemap/smallvector. 2010-02-12 18:17:23 +00:00
ConstProp fix PR6197 - infinite recursion in ipsccp due to block addresses 2010-02-01 19:35:08 +00:00
DeadArgElim Preserve debug info attached with call instruction while eliminating dead argument. 2010-04-30 20:23:54 +00:00
DeadStoreElimination add newlines at the end of files. 2010-04-07 22:53:17 +00:00
FunctionAttrs Fix a README item: have functionattrs look through selects and 2010-01-06 15:37:47 +00:00
GlobalDCE Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
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 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
IPConstantProp Delete useless trailing semicolons. 2010-01-05 17:55:26 +00:00
JumpThreading fix PR6743, a case where we'd delete an instruction before using it 2010-04-10 18:26:57 +00:00
LCSSA Make isLCSSA ignore uses in blocks not reachable from the entry block, 2010-03-09 01:53:33 +00:00
LICM Remove dead debug info intrinsics. 2010-01-05 01:10:40 +00:00
LoopDeletion Make LoopSimplify change conditional branches in loop exiting blocks 2010-02-25 06:57:05 +00:00
LoopIndexSplit Check for side effects before splitting loop. 2010-05-03 18:06:58 +00:00
LoopRotate Delete useless trailing semicolons. 2010-01-05 17:55:26 +00:00
LoopSimplify Make Loop::getLoopLatch() work on loops which don't have preheaders, as 2009-11-20 20:51:18 +00:00
LoopStrengthReduce When determining a canonical insert position, don't climb deeper 2010-04-09 22:07:05 +00:00
LoopUnroll Teach getSmallConstantTripMultiple about Shl operators. 2009-11-20 01:09:34 +00:00
LoopUnswitch RewriteLoopBodyWithConditionConstant can end up rewriting the 2010-04-20 05:09:16 +00:00
LowerInvoke Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LowerSetJmp Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LowerSwitch Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
Mem2Reg Update test to use valid debug info. 2010-05-07 20:34:00 +00:00
MemCpyOpt Reapply address space patch after fixing an issue in MemCopyOptimizer. 2010-04-04 03:10:48 +00:00
MergeFunc Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
PruneEH fix some failures my callgraph dump format change broke. 2010-04-23 18:38:40 +00:00
Reassociate fix a nice subtle reassociate bug which would only occur 2010-03-05 07:18:54 +00:00
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 Reapply address space patch after fixing an issue in MemCopyOptimizer. 2010-04-04 03:10:48 +00:00
Sink Add an LLVM IR version of code sinking. This uses the same simple algorithm 2010-05-07 15:40:13 +00:00
SRETPromotion Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
SSI Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
StripSymbols Update test. 2009-09-09 02:41:50 +00:00
TailCallElim Refine the detection of seemingly infinitely recursive calls where the 2010-04-16 15:57:50 +00:00
TailDup Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00