Commit Graph

41734 Commits

Author SHA1 Message Date
Ted Kremenek
6c50479737 When processing the transfer function for a statement, evaluate
RemoveDeadBindings early because (1) it will always be called and (2) we can
dispatch to a plug-in transfer function that can evaluate the effect of dead
symbols (not yet added).

llvm-svn: 48114
2008-03-09 18:28:41 +00:00
Ted Kremenek
2d063bef8b Refactored guards for "GRExprEngine::RemoveDeadBindings" directly into the
method. This paves the way for other alterations to RemoveDeadBindings that are
transparent to its callers.

llvm-svn: 48113
2008-03-09 18:05:48 +00:00
Nick Lewycky
0ac65c3b99 And again.
llvm-svn: 48112
2008-03-09 17:13:05 +00:00
Nick Lewycky
929703b29e Braces belong here. No functionality change.
llvm-svn: 48111
2008-03-09 17:11:18 +00:00
Anton Korobeynikov
971a4660a0 Temporary XFAIL the test, until I'll commit a fix
llvm-svn: 48110
2008-03-09 16:24:04 +00:00
Nick Lewycky
83750d9caf SCCP also needs to be taught to follow unwind_to
llvm-svn: 48109
2008-03-09 09:44:38 +00:00
Chris Lattner
ce5f841bb5 fp_round's produced by getCopyFromParts should always be exact, because
they are produced by calls (which are known exact) and by cross block copies
which are known to be produced by extends.

This improves:

define double @test2() {
	%tmp85 = call double asm sideeffect "fld0", "={st(0)}"()
	ret double %tmp85
}

from:

_test2:
	subl	$20, %esp
	# InlineAsm Start
	fld0
	# InlineAsm End
	fstpl	8(%esp)
	movsd	8(%esp), %xmm0
	movsd	%xmm0, (%esp)
	fldl	(%esp)
	addl	$20, %esp
	#FP_REG_KILL
	ret

to:

_test2:
	# InlineAsm Start
	fld0
	# InlineAsm End
	#FP_REG_KILL
	ret

by avoiding a f64 <-> f80 trip

llvm-svn: 48108
2008-03-09 09:38:46 +00:00
Chris Lattner
86829f0ff7 teach X86InstrInfo::copyRegToReg how to copy into ST(0) from
an RFP register class.

Teach ScheduleDAG how to handle CopyToReg with different src/dst 
reg classes.

This allows us to compile trivial inline asms that expect stuff
on the top of x87-fp stack.

llvm-svn: 48107
2008-03-09 09:15:31 +00:00
Nick Lewycky
271506f29c Don't eliminate blocks that are only reachable by unwind_to.
llvm-svn: 48106
2008-03-09 08:50:23 +00:00
Chris Lattner
9e07537e8c Add ScheduleDAG support for copytoreg where the src/dst register are
in different register classes, e.g. copy of ST(0) to RFP*.  This gets
some really trivial inline asm working that plops things on the top of
stack (PR879)

llvm-svn: 48105
2008-03-09 08:49:15 +00:00
Chris Lattner
b79bafcec8 add some code to support cross-register class copying from
RST -> RFP{32/64/80}.  We only handle ST(0) for now.

llvm-svn: 48104
2008-03-09 08:46:19 +00:00
Tanya Lattner
aa6f5c9ddd Remove llvm-upgrade and update tests.
llvm-svn: 48103
2008-03-09 08:16:40 +00:00
Ted Kremenek
cfd8b19ef7 Bug fix in the transfer function for compound assignments: if the value
of the LHS expressions is Unknown, the value of the entire expression
does not evaluate to the RHS (as is the case with normal assignments).

llvm-svn: 48102
2008-03-09 08:12:37 +00:00
Chris Lattner
c4c9dde04c rearrange some code, no functionality change.
llvm-svn: 48101
2008-03-09 07:58:04 +00:00
Chris Lattner
381bbdb924 fix 80 col violation
llvm-svn: 48100
2008-03-09 07:51:01 +00:00
Nick Lewycky
42445be0df Firstly, having a BranchInst isn't exclusive with having an unwind_to.
Secondly, we have to check whether the branch is actually pointing to the block
with the unwind in it. We could have gotten here because of the unwind_to alone.

llvm-svn: 48099
2008-03-09 07:50:37 +00:00
Chris Lattner
459f518703 claim ST(x) registers are 80 bits, which is true. This doesn't affect
codegen yet because these can't be spilled (they don't exist until after RA).

llvm-svn: 48098
2008-03-09 07:49:01 +00:00
Chris Lattner
83b3473dd8 extend fp values with FP_EXTEND not FP_ROUND.
llvm-svn: 48097
2008-03-09 07:47:22 +00:00
Nick Lewycky
f3d637fa14 A BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_to
at all.

llvm-svn: 48096
2008-03-09 07:36:38 +00:00
Gordon Henriksen
95f4b77b0d This patch cleans up the OCaml bindings so that they format nicely with
ocamldoc. It does not yet hook into the build system, though.

Patch by Erick Tryzelaar!

llvm-svn: 48095
2008-03-09 07:17:38 +00:00
Chris Lattner
4c869594bc rename FP_SETRESULT -> FP_SET_ST0
llvm-svn: 48094
2008-03-09 07:08:44 +00:00
Chris Lattner
d587e580a6 rename FpGETRESULT32 -> FpGET_ST0_32 etc. Add support for
isel'ing value preserving FP roundings from one fp stack reg to another
into a noop, instead of stack traffic.

llvm-svn: 48093
2008-03-09 07:05:32 +00:00
Chris Lattner
a6ce71fb84 reduce this testcase more
llvm-svn: 48092
2008-03-09 06:57:21 +00:00
Anders Carlsson
a3a96afb51 Handle the 'n' constraint
llvm-svn: 48091
2008-03-09 06:02:02 +00:00
Chris Lattner
b6387c8a74 Finish implementing a readme entry: when inserting an i64 variable
into a vector of zeros or undef, and when the top part is obviously
zero, we can just use movd + shuffle.  This allows us to compile
vec_set-B.ll into:

_test3:
	movl	$1234567, %eax
	andl	4(%esp), %eax
	movd	%eax, %xmm0
	ret

instead of:

_test3:
	subl	$28, %esp
	movl	$1234567, %eax
	andl	32(%esp), %eax
	movl	%eax, (%esp)
	movl	$0, 4(%esp)
	movq	(%esp), %xmm0
	addl	$28, %esp
	ret

llvm-svn: 48090
2008-03-09 05:42:06 +00:00
Chris Lattner
6af064641f Fix a ted-o
llvm-svn: 48089
2008-03-09 05:25:01 +00:00
Nick Lewycky
11fc6f8765 Update the block cloner which fixes bugpoint on code using unwind_to (phew!)
and also update the cloning interface's major user, the loop optimizations.

llvm-svn: 48088
2008-03-09 05:24:34 +00:00
Ted Kremenek
ebe5c8520c Fixed crash where SetBlkExpr would attempt to query the liveness data when
we weren't processing a statement within a basic block.

llvm-svn: 48087
2008-03-09 05:15:50 +00:00
Nick Lewycky
5ce9b521d7 Update the inliner and simplifycfg to handle unwind_to.
llvm-svn: 48086
2008-03-09 05:10:13 +00:00
Nick Lewycky
cc24104703 Two things. Preserve the unwind_to when splitting a BB.
Add the ability to remove just one instance of a BB from a phi node. This fixes
the compile error in the tree now.

llvm-svn: 48085
2008-03-09 05:04:48 +00:00
Nick Lewycky
4d0ed842b1 Prune the unwind_to labels on BBs that don't need them. Another step in the
removal of invoke, PR1269.

llvm-svn: 48084
2008-03-09 04:55:16 +00:00
Chris Lattner
d2d3441ddb improve comment.
llvm-svn: 48083
2008-03-09 04:49:35 +00:00
Chris Lattner
f7ad82df8c move PP::LookupFile from PPLexerChange -> PPDirectives.cpp
llvm-svn: 48082
2008-03-09 04:17:44 +00:00
Chris Lattner
e35109726c Add PPLexerChange.cpp to the project.
llvm-svn: 48081
2008-03-09 04:14:55 +00:00
Chris Lattner
1eed734c9c Move a bunch more code out of Preprocessor.cpp into PPLexerChange.cpp
llvm-svn: 48080
2008-03-09 04:10:46 +00:00
Ted Kremenek
03ab156041 Bug fix: Don't call RemoveDeadBindings more than once (can kill newly generated values to Block-Level Expressions).
llvm-svn: 48079
2008-03-09 03:30:59 +00:00
Chris Lattner
8962015386 split macro expansion support out of Preprocessor.cpp into PPMacroExpansion.cpp
Rename Directives.cpp -> PPDirectives.cpp since it implements part of the
Preprocessor class.

llvm-svn: 48078
2008-03-09 03:13:06 +00:00
Nate Begeman
aca747a34a Propagate calling convention information to function declarations and CallInst
instructions.

llvm-svn: 48077
2008-03-09 03:09:36 +00:00
Chris Lattner
1d4000ba50 rename HandleEndOfMacro -> HandleEndOfTokenLexer
llvm-svn: 48076
2008-03-09 03:04:16 +00:00
Chris Lattner
7ff66fb91e split the MacroArgs class out of TokenLexer.cpp/h into
MacroArgs.cpp/h

llvm-svn: 48075
2008-03-09 02:55:12 +00:00
Chris Lattner
d5917cef95 update documentation
llvm-svn: 48074
2008-03-09 02:27:26 +00:00
Chris Lattner
285c0c1150 rename some MacroExpander-related ivars to TokenLexer.
llvm-svn: 48073
2008-03-09 02:26:03 +00:00
Chris Lattner
5bb36002be Rename MacroExpander.cpp/h -> TokenLexer.cpp/h
llvm-svn: 48072
2008-03-09 02:22:57 +00:00
Chris Lattner
95d72cdf0f rename the MacroExpander class to TokenLexer. It handles both
token streams and macro lexing, so a more generic name is useful.

llvm-svn: 48071
2008-03-09 02:18:51 +00:00
Chris Lattner
d7daed1478 rename MacroTokens -> Tokens. When this is a token stream, there is no macro
involved.

llvm-svn: 48070
2008-03-09 02:07:49 +00:00
Nate Begeman
6127ae4cde fix clang xcode build
llvm-svn: 48069
2008-03-09 01:55:39 +00:00
Chris Lattner
f64b352660 split preprocesor directive handling out of Preprocessor.cpp into Directives.cpp
llvm-svn: 48068
2008-03-09 01:54:53 +00:00
Chris Lattner
e4a6b18c2e secondary targets are gone, simplify this.
llvm-svn: 48067
2008-03-09 01:36:43 +00:00
Chris Lattner
22ad07ca07 simplify triple processing code now that there can be only one arch specified.
llvm-svn: 48066
2008-03-09 01:35:13 +00:00
Chris Lattner
1e178ea988 be more quiet when building headers.
llvm-svn: 48065
2008-03-09 01:29:23 +00:00