Commit Graph

39777 Commits

Author SHA1 Message Date
Ted Kremenek 2e12c2e790 Hooked up the GRConstants analysis to the driver.
Fixed some compilation errors with GREngine that showed up during
template instantiation.

llvm-svn: 46074
2008-01-16 18:18:48 +00:00
Chris Lattner aebbe4700a add testcase for regression
llvm-svn: 46073
2008-01-16 18:03:52 +00:00
Chris Lattner 52188501f6 Fix a ppc long double regression I introduced yesterday due to a
simplification.  This fixes automotive-basicmath on PPC.

llvm-svn: 46072
2008-01-16 17:59:31 +00:00
Ted Kremenek 2d700ed2ba More cleanups in DoStmt. The NodeSets are now vectors instead of sets, since
node caching in GREngine will guarantee that we do not insert a node twice into
a nodeset.

llvm-svn: 46071
2008-01-16 17:56:25 +00:00
Steve Naroff 17832a48f8 Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function declarations/definitions). Patch by Carl Lewis!
llvm-svn: 46070
2008-01-16 15:01:34 +00:00
Chris Lattner 7ca4d5b1f3 merge a few pieces of code that do the store/load to stack
pattern to use EmitStackConvert now.

llvm-svn: 46066
2008-01-16 07:51:34 +00:00
Chris Lattner 87bc3e7ece rename ExpandBIT_CONVERT to EmitStackConvert, generalizing
it to allow it to emit different load and store kinds.

llvm-svn: 46065
2008-01-16 07:45:30 +00:00
Chris Lattner a2c7ff3386 simplify a bunch of code by using SelectionDAG::CreateStackTemporary
instead of inlining its body.

llvm-svn: 46062
2008-01-16 07:03:22 +00:00
Chris Lattner 91d86242f9 Change legalizeop of FP_ROUND and FP_EXTEND to not fall through
into the ANY_EXTEND/ZERO_EXTEND/SIGN_EXTEND code to simplify it.

Unmerge the code for FP_ROUND and FP_EXTEND from each other to 
make each one simpler.

llvm-svn: 46061
2008-01-16 06:57:07 +00:00
Chris Lattner 6e3379c07b make sure to use a cpu that has sse.
llvm-svn: 46060
2008-01-16 06:32:02 +00:00
Chris Lattner e8bb9f2190 make it more clear that this predicate only applies to scalar FP types.
llvm-svn: 46058
2008-01-16 06:24:21 +00:00
Chris Lattner 14e616ef0b introduce a isTypeInSSEReg predicate, which allows us to simplify
some code.  No functionality change.

llvm-svn: 46055
2008-01-16 06:19:45 +00:00
Chris Lattner 8f7cec859e My previous commit had an incomplete message, it should have been:
make the 'fp return in ST(0)' optimization smart enough to
look through token factor nodes.  THis allows us to compile 
testcases like CodeGen/X86/fp-stack-retcopy.ll into:

_carg:
	subl	$12, %esp
	call	L_foo$stub
	fstpl	(%esp)
	fldl	(%esp)
	addl	$12, %esp
	ret

instead of:

_carg:
	subl	$28, %esp
	call	L_foo$stub
	fstpl	16(%esp)
	movsd	16(%esp), %xmm0
	movsd	%xmm0, 8(%esp)
	fldl	8(%esp)
	addl	$28, %esp
	ret

Still not optimal, but much better and this is a trivial patch.  Fixing 
the rest requires invasive surgery that is is not llvm 2.2 material.

llvm-svn: 46054
2008-01-16 05:56:59 +00:00
Chris Lattner ea001f1db7 make the 'fp return in ST(0)' optimization smart enough to
look through token factor

llvm-svn: 46053
2008-01-16 05:53:06 +00:00
Chris Lattner de5c74f18e various whitespace cleanups, no functionality change.
llvm-svn: 46052
2008-01-16 05:52:18 +00:00
Ted Kremenek 73e5f2bb17 Adjusted DSPtr::Profile method again, since my last patch broke the build.
llvm-svn: 46051
2008-01-16 05:51:13 +00:00
Chris Lattner 2e50a6f90f Factor the ReachesChainWithoutSideEffects out of dag combiner into
a public SDOperand::reachesChainWithoutSideEffects method.  No 
functionality change.

llvm-svn: 46050
2008-01-16 05:49:24 +00:00
Ted Kremenek 29185f17e9 Changed 'Profile' method for DSPtr to incorporate the flags from the
variant type, and not just the pointer value.

llvm-svn: 46049
2008-01-16 05:49:09 +00:00
Devang Patel b3696e4f14 Do not strip llvm.used values.
llvm-svn: 46045
2008-01-16 03:33:05 +00:00
Ted Kremenek fb55354fc9 Renamed some internal classes for the GR-Constant Propagation analysis.
Cleaned up GRConstants::AddBinding to not directly reference the
predecessor node.  Now we just manipulate the current state, and a driver
function creates nodes as needed.

llvm-svn: 46040
2008-01-16 00:53:15 +00:00
Fariborz Jahanian 19d42bf0a5 Typo.
llvm-svn: 46038
2008-01-16 00:09:11 +00:00
Fariborz Jahanian b860cbf052 Added support for rewriting of continue/break statements inside ObjC2's foreach-stmt.
llvm-svn: 46037
2008-01-15 23:58:23 +00:00
Ted Kremenek de8d62b132 Added skeleton implementation of new constant-prop. analysis using
the graph reachability engine.

llvm-svn: 46036
2008-01-15 23:55:06 +00:00
Ted Kremenek 03bc2afa65 Added ctor to GRNodeBuilder.
llvm-svn: 46035
2008-01-15 23:54:22 +00:00
Ted Kremenek 7ea05687be Changed ImmutableMap::find to return an iterator instead of a pointer
to the tree node.

llvm-svn: 46034
2008-01-15 23:53:53 +00:00
Devang Patel 41f375a45c - Introduces versioning macro LLVM_LTO_VERSION
- Communicate symbol visibility
- Communicate code generation model

llvm-svn: 46033
2008-01-15 23:52:34 +00:00
Chris Lattner 5047536879 Commit a piece that I missed before, patch by Alain Frisch
llvm-svn: 46032
2008-01-15 23:27:40 +00:00
Dale Johannesen 00dfb551cc Missed file from previous checkin.
llvm-svn: 46030
2008-01-15 23:25:27 +00:00
Dale Johannesen 59a2250b0d Fix and enable EH for x86-64 Darwin. Adds
ShortenEHDataFor64Bits as a not-very-accurate
abstraction to cover all the changes in DwarfWriter.
Some cosmetic changes to Darwin assembly code for
gcc testsuite compatibility.

llvm-svn: 46029
2008-01-15 23:24:56 +00:00
Owen Anderson 897aed9109 Move some calls to getVRegDef higher in the callgraph, so they don't get executed as frequently in performance sensitive code.
llvm-svn: 46027
2008-01-15 22:58:11 +00:00
Chris Lattner cc7ff8c1dd improve compatibility with mingw, patch by Alain Frisch
llvm-svn: 46026
2008-01-15 22:50:50 +00:00
Chris Lattner f3e1155c41 add a test to ensure that argpromote of one argument doesn't
break the byval attr on some other argument.

llvm-svn: 46025
2008-01-15 22:38:12 +00:00
Anton Korobeynikov 06cbb65cb0 Add description of 'llvm.trap' intrinsic. Also, minor fixes in formatting.
llvm-svn: 46024
2008-01-15 22:31:34 +00:00
Chris Lattner 915ec14073 verify x86 generates ud2 for llvm.trap
llvm-svn: 46023
2008-01-15 22:22:02 +00:00
Steve Naroff abefc391dd Finish up handling all permutations of "complex int" (in Sema::UsualArithmeticConversions()).
A FIXME remains to verify the conversion rules are consistent with GCC.

Thanks to Eli for the new/improved test case...

llvm-svn: 46022
2008-01-15 22:21:49 +00:00
Evan Cheng 51a09143c2 Unbreak the build.
llvm-svn: 46021
2008-01-15 22:19:35 +00:00
Chris Lattner 50baecd31e new testcase for llvm.trap.
llvm-svn: 46020
2008-01-15 22:17:26 +00:00
Chris Lattner 8e07533f20 If someone wants to implement ppc TRAP, they can go for it :)
llvm-svn: 46019
2008-01-15 22:15:02 +00:00
Chris Lattner ec224888a6 The type of the 'abort' node should be pointer type (because
it's a function pointer) not MVT::Other.  This fixes builtin_trap
lowering on ppc, alpha, ia64

llvm-svn: 46018
2008-01-15 22:09:33 +00:00
Chris Lattner 9a249b0ce5 rename SDTRet -> SDTNone.
Move definition of 'trap' sdnode up from x86 instrinfo to targetselectiondag.td.

llvm-svn: 46017
2008-01-15 22:02:54 +00:00
Owen Anderson 1ba66e0cec Remove DefInst from LiveVariables::VarInfo. Use the facilities on MachineRegisterInfo instead.
llvm-svn: 46016
2008-01-15 22:02:46 +00:00
Chris Lattner 3c3fefde06 no need to expand ISD::TRAP to X86ISD::TRAP, just match ISD::TRAP.
llvm-svn: 46015
2008-01-15 21:58:22 +00:00
Chris Lattner ee8df1f4d3 Add support for targets that have a legal ISD::TRAP.
llvm-svn: 46014
2008-01-15 21:58:08 +00:00
Chuck Rose III fe2714fab3 Add files to windows project files. Also include <algorithm> explicitly so that vstudio build works
llvm-svn: 46013
2008-01-15 21:43:17 +00:00
Anton Korobeynikov 59e6d533bd Fix JIT encoding of trap/ud2 instruction
llvm-svn: 46012
2008-01-15 21:40:02 +00:00
Bill Wendling d21d90cf98 Reformatted. It was confusing the other way. No functionality change.
llvm-svn: 46009
2008-01-15 21:16:32 +00:00
Gordon Henriksen 1390ef4163 Fix a memory correctness error noticed by valgrind (harmless in practice).
Thanks to Duncan Sands for noticing it.

llvm-svn: 46007
2008-01-15 20:02:11 +00:00
Duncan Sands 60bd71603b Testcase for gimplify_expr crash caused by an
unexpected placeholder_expr.

llvm-svn: 46006
2008-01-15 19:55:41 +00:00
Steve Naroff 6fcfd0581d - Change Type::isComplexType() to exlude GCC's complex integer extension. In general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec).
- Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType().

This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite).

llvm-svn: 46005
2008-01-15 19:36:10 +00:00
Evan Cheng 4f7437f8af Oops. Forgot to commit this.
llvm-svn: 46003
2008-01-15 07:49:54 +00:00