Commit Graph

45633 Commits

Author SHA1 Message Date
Chris Lattner 34fc5a0eaa implement linking of globals to functions, in one direction
(replacing a function with a global).  This is needed when building
llvm itself with LTO on darwin, because of the EXPLICIT_SYMBOL hack
in lib/system/DynamicLibrary.cpp.

Implementation of linking the other way will need to wait for a 
cleanup of LinkFunctionProtos.

llvm-svn: 53546
2008-07-14 06:49:45 +00:00
Chris Lattner 177a3008e1 wrap long lines, remove some code from a non-assert build.
llvm-svn: 53545
2008-07-14 05:52:33 +00:00
Chris Lattner eab49263b5 Fix a bunch of bugs handling vector compare constant expressions, fixing
PR2317.

llvm-svn: 53544
2008-07-14 05:17:31 +00:00
Chris Lattner c5098a2877 Document and fix Constant::getVectorElements to return an empty vector
when presented with a constant expr.

If ConstantExpr::getV[IF]Cmp to work when ConstantFoldCompareInstruction
returns an undef or constant expr.  

llvm-svn: 53541
2008-07-14 05:10:41 +00:00
Chris Lattner 2831ad28be If a function calls setjmp, never inline it into other functions. This is
a hack around the fact that we don't represent the CFG correctly for sj/lj.
It fixes PR2486.

llvm-svn: 53540
2008-07-14 00:46:56 +00:00
Chris Lattner 6f5ea6e49c simplify some code, shuffle and insertelt always return a vector.
llvm-svn: 53538
2008-07-14 00:32:20 +00:00
Chris Lattner 3b81a821b4 whitespace fix.
llvm-svn: 53537
2008-07-14 00:28:45 +00:00
Chris Lattner 0c5183d9a5 doxygenate comments and wrap to 80 cols.
llvm-svn: 53536
2008-07-14 00:27:31 +00:00
Chris Lattner 8377c02308 Add a note.
llvm-svn: 53535
2008-07-14 00:19:59 +00:00
Chris Lattner 16395e51f4 Fix PR2506 by being a bit more careful about reverse fact propagation when
disproving a condition.  This actually compiles the existing testcase
(udiv_select_to_select_shift) to:

define i64 @test(i64 %X, i1 %Cond) {
entry:
	%divisor1.t = lshr i64 %X, 3		; <i64> [#uses=1]
	%quotient2 = lshr i64 %X, 3		; <i64> [#uses=1]
	%sum = add i64 %divisor1.t, %quotient2		; <i64> [#uses=1]
	ret i64 %sum
}

instead of:

define i64 @test(i64 %X, i1 %Cond) {
entry:
	%quotient1.v = select i1 %Cond, i64 3, i64 4		; <i64> [#uses=1]
	%quotient1 = lshr i64 %X, %quotient1.v		; <i64> [#uses=1]
	%quotient2 = lshr i64 %X, 3		; <i64> [#uses=1]
	%sum = add i64 %quotient1, %quotient2		; <i64> [#uses=1]
	ret i64 %sum
}

llvm-svn: 53534
2008-07-14 00:15:52 +00:00
Chris Lattner 80b03a1b49 Fix mishandling of the infinite loop case when merging two blocks. This
fixes PR2540.

llvm-svn: 53533
2008-07-13 22:23:11 +00:00
Chris Lattner 834ab4ec1b more refactoring. Use early exits instead of really complex logic.
No functionality change.

llvm-svn: 53532
2008-07-13 22:04:41 +00:00
Chris Lattner 5eed37224a improve comments.
llvm-svn: 53531
2008-07-13 21:55:46 +00:00
Chris Lattner 9aada1d755 factor another large hunk of code out into its own function.
No functionality change.

llvm-svn: 53530
2008-07-13 21:53:26 +00:00
Chris Lattner 8afd2f3016 add a description.
llvm-svn: 53529
2008-07-13 21:27:36 +00:00
Chris Lattner 55eaae1e0c Final bit of simplification for FoldBranchToCommonDest.
llvm-svn: 53528
2008-07-13 21:20:19 +00:00
Chris Lattner 1b317ea48a simplify logic a bit
llvm-svn: 53527
2008-07-13 21:15:11 +00:00
Chris Lattner 2e25b8f444 Refactor some code out into its own helper function, getting rid of crazy multiline
conditionals and commenting the code better.

No functionality change.

llvm-svn: 53526
2008-07-13 21:12:01 +00:00
Duncan Sands 2e6f7b49bf Fix comment.
llvm-svn: 53525
2008-07-13 20:14:38 +00:00
Cedric Venet 455298f2d6 test commit. Remove previously added line.
llvm-svn: 53524
2008-07-13 19:42:06 +00:00
Chris Lattner 501c3b67fd Fix PR2231 - opt -internalize -std-compile-opts should run internalize first
llvm-svn: 53523
2008-07-13 19:35:21 +00:00
Cedric Venet 1e43f55933 test commit. Add a blank line.
llvm-svn: 53522
2008-07-13 19:34:37 +00:00
Cedric Venet bea0963a5c Remove deleted files from VC++ project.
llvm-svn: 53521
2008-07-13 11:12:36 +00:00
Argyrios Kyrtzidis 07b8b63f9f Use of NextToken() makes ParseIdentifierStatement unnecessary.
Simplify the parser by removing Parser::ParseIdentifierStatement.

llvm-svn: 53520
2008-07-12 21:04:42 +00:00
Argyrios Kyrtzidis 715eabcef5 Convert CRLF -> LF line endings.
llvm-svn: 53519
2008-07-12 20:28:04 +00:00
Cedric Venet 71262487c3 Added two new files to VC++ project.
llvm-svn: 53518
2008-07-12 19:24:14 +00:00
Ted Kremenek 0017db2ff5 Inline typedef for alist_iterator::pointer to work with MSVC++.
llvm-svn: 53517
2008-07-12 18:28:46 +00:00
Nick Lewycky b5688ccf57 Stop creating extraneous smax/umax in SCEV. This removes a regression where we
started complicating many loops ('for' loops, in fact).

llvm-svn: 53508
2008-07-12 07:41:32 +00:00
Nick Lewycky e424236c4e operator[] is not defined for list::iterator. Overload it in ilist::iterator
to prevent silly things from happening accidentally. PR2171

llvm-svn: 53507
2008-07-12 07:00:52 +00:00
Nick Lewycky f76aa23b54 Enhance analysis of srem.
Remove dead code analyzing urem. 'urem' of power-of-2 is canonicalized to an
'and' instruction.

llvm-svn: 53506
2008-07-12 05:04:38 +00:00
Evan Cheng 32e376f354 Implement llvm.atomic.cmp.swap.i32 on PPC. Patch by Gary Benson!
llvm-svn: 53505
2008-07-12 02:23:19 +00:00
Evan Cheng 2b3c52d5c4 Typos.
llvm-svn: 53504
2008-07-12 02:22:07 +00:00
Evan Cheng e0a352e8e7 Fix PR2536: a nasty spiller bug. If a two-address instruction uses a register but the use portion of its live range is not part of its liveinterval, it must be defined by an implicit_def. In that case, do not spill the use. e.g.
8   %reg1024<def> = IMPLICIT_DEF
12  %reg1024<def> = INSERT_SUBREG %reg1024<kill>, %reg1025, 2

The live range [12, 14) are not part of the r1024 live interval since it's defined by an implicit def. It will not conflicts with live interval of r1025. Now suppose both registers are spilled, you can easily see a situation where both registers are reloaded before the INSERT_SUBREG and both target registers that would overlap.

llvm-svn: 53503
2008-07-12 01:56:02 +00:00
Evan Cheng ef8412c822 Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
llvm-svn: 53502
2008-07-12 01:38:51 +00:00
Chris Lattner 477c4be1e9 expand casts to handle what isIntegerConstantExpr handles.
Casts from pointers remain a problem. :)

llvm-svn: 53501
2008-07-12 01:15:53 +00:00
Chris Lattner 7174bf3722 Add support for __builtin_type_compatible_p, enums, etc.
llvm-svn: 53500
2008-07-12 00:38:25 +00:00
Chris Lattner 9941570ce9 start remembering diagnostics for various cases, add some missing
code.  Switch to Eli's getIntWidth method.

llvm-svn: 53499
2008-07-12 00:14:42 +00:00
Dan Gohman 9a542a4d5f Add a utility function to MachineInstr for testing whether an instruction
has exactly one MachineMemOperand, and change some X86 lowering code to
make use of it.

llvm-svn: 53498
2008-07-12 00:10:52 +00:00
Ted Kremenek 20704a0ce8 Updated latest checker build. This build includes the new check for type-compatibility of the return types of ObjC methods.
llvm-svn: 53496
2008-07-11 23:29:43 +00:00
Ted Kremenek e5b5953672 Tidy up error message.
llvm-svn: 53493
2008-07-11 23:17:01 +00:00
Ted Kremenek ba1196298a Add CSS for word wrapping of long message bubbles.
llvm-svn: 53492
2008-07-11 23:13:22 +00:00
Chris Lattner cdf34e7668 Provide a structure for passing down 'is evaluated' and passing up
diagnosic+loc info for i-c-e evaluation.

llvm-svn: 53490
2008-07-11 22:52:41 +00:00
Dan Gohman 0e52a0c89e Fix spelling of "hierarchy" in comments.
llvm-svn: 53489
2008-07-11 22:51:32 +00:00
Ted Kremenek dfc7b3d329 Update Xcode project.
llvm-svn: 53488
2008-07-11 22:48:58 +00:00
Dan Gohman cd9b66e5c1 Fix typos in comments.
llvm-svn: 53487
2008-07-11 22:48:20 +00:00
Dan Gohman 02c7c6cb33 Include a frame index in the "fixed stack" pseudo source value
instead of using the frame index for the SVOffset, which was
inconsistent.

llvm-svn: 53486
2008-07-11 22:44:52 +00:00
Ted Kremenek 1a74784517 Minor tweaks to the ImmutableList iterator interface.
Added partial specialization of DenseMapInfo<T> for ImmutableList.

llvm-svn: 53485
2008-07-11 22:43:07 +00:00
Bill Wendling 5c77307c2b Porting r53478 into mainline:
Update to build_llvm. Don't output a floating point number for the version.

llvm-svn: 53484
2008-07-11 22:42:10 +00:00
Ted Kremenek afe2c0be34 Run by default: -check-objc-methodsigs
llvm-svn: 53483
2008-07-11 22:41:43 +00:00
Ted Kremenek 3bfb314c25 Add new check: -check-objc-methodsigs. This check scans methods in
ObjCImplementationDecls and sees if a ancestor class defines a method with the
same selector but with a different type signature. Right now it just compares
return types, and mainly looks at differences in primitive values. The checking
will be expanded in the future.

llvm-svn: 53482
2008-07-11 22:40:47 +00:00