Commit Graph

42921 Commits

Author SHA1 Message Date
Chris Lattner 96e2dbe008 use continue to reduce indentation
llvm-svn: 60192
2008-11-27 23:00:20 +00:00
Chris Lattner c6c481cdfc remove doConstantPropagation and dceInstruction, they are just
wrappers around the interesting code and use an obscure iterator
abstraction that dates back many many years.

Move EraseDeadInstructions to Transforms/Utils and name it
RecursivelyDeleteTriviallyDeadInstructions.

llvm-svn: 60191
2008-11-27 22:57:53 +00:00
Chris Lattner 5ef9ebf787 simplify code.
llvm-svn: 60190
2008-11-27 22:56:14 +00:00
Chris Lattner c92fa42ddd simplify this logic.
llvm-svn: 60189
2008-11-27 22:46:09 +00:00
Nick Lewycky edd5d3e4e9 Also update the README.
llvm-svn: 60188
2008-11-27 22:41:45 +00:00
Nick Lewycky 4ab50b93c8 Chris prefers icmp/select over udiv!
llvm-svn: 60187
2008-11-27 22:41:10 +00:00
Nick Lewycky b3dc4ad5b4 Add a synthetic missed optimization.
llvm-svn: 60186
2008-11-27 22:12:22 +00:00
Nick Lewycky 69941fd0a0 Add a couple of missed optimizations on integer vectors. Multiply and divide
by 1, as well as multiply by -1.

llvm-svn: 60182
2008-11-27 20:21:08 +00:00
Chris Lattner 4059f43b74 defensive patch: if CGP is merging a block with the entry block, make sure
it ends up being the entry block.

llvm-svn: 60180
2008-11-27 19:29:14 +00:00
Chris Lattner 5dfbfcd80d Fix PR3138: if we merge the entry block into another block, make sure to
move the other block back up into the entry position!

llvm-svn: 60179
2008-11-27 19:25:19 +00:00
Nick Lewycky 2c96bdd8d6 Silence a warning.
Despite changing the order of evaluation, this doesn't actually change the
meaning of the statement.

llvm-svn: 60177
2008-11-27 17:29:52 +00:00
Nuno Lopes 50343cd2fe fix build on some machines. thanks buildbot
llvm-svn: 60175
2008-11-27 16:42:44 +00:00
Nuno Lopes d5c2a144e1 fix my previous commit r60064: compare strings instead of pointers
llvm-svn: 60174
2008-11-27 16:37:02 +00:00
Chris Lattner e0d019def6 switch InstCombine::visitLoadInst to use
FindAvailableLoadedValue

llvm-svn: 60169
2008-11-27 08:56:30 +00:00
Chris Lattner 378b041f03 improve const correctness.
llvm-svn: 60168
2008-11-27 08:39:18 +00:00
Chris Lattner c6ae56d23f enhance FindAvailableLoadedValue to make use of AliasAnalysis
if it has it.

llvm-svn: 60167
2008-11-27 08:18:12 +00:00
Chris Lattner 72f16e70f0 move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.
llvm-svn: 60166
2008-11-27 08:10:05 +00:00
Bill Wendling c6075401c2 Get rid of bogus "control may reach end of non-void function ‘...’ being
inlined" message.

llvm-svn: 60165
2008-11-27 08:00:12 +00:00
Chris Lattner d6204bed3d simplify this code a bit.
llvm-svn: 60164
2008-11-27 07:54:38 +00:00
Chris Lattner 206250284d Use the new MergeBasicBlockIntoOnlyPred function.
llvm-svn: 60163
2008-11-27 07:54:12 +00:00
Chris Lattner 99d6809ac1 move MergeBasicBlockIntoOnlyPred to Transforms/Utils.
llvm-svn: 60162
2008-11-27 07:43:12 +00:00
Bill Wendling 077eb6fcc2 XFAil test due to reverting of patch.
llvm-svn: 60161
2008-11-27 07:34:10 +00:00
Chris Lattner 240051aace rename ThreadBlock to ProcessBlock, since it does other things than
just simple threading.

llvm-svn: 60157
2008-11-27 07:20:04 +00:00
Bill Wendling 128f032cc8 Comment out code that isn't entirely correct.
llvm-svn: 60156
2008-11-27 07:18:35 +00:00
Misha Brukman c9813bda47 Fixed HTML closing tag, cleaned up some spacing.
llvm-svn: 60153
2008-11-27 06:41:20 +00:00
Sanjiv Gupta 7ae1a84465 Removing redundant semicolons. No functionality change.
llvm-svn: 60149
2008-11-27 05:58:04 +00:00
Chris Lattner 98d89d1b1b Make jump threading substantially more powerful, in the following ways:
1. Make it fold blocks separated by an unconditional branch.  This enables
   jump threading to see a broader scope.
2. Make jump threading able to eliminate locally redundant loads when they
   feed the branch condition of a block.  This frequently occurs due to
   reg2mem running.
3. Make jump threading able to eliminate *partially redundant* loads when
   they feed the branch condition of a block.  This is common in code with
   lots of loads and stores like C++ code and 255.vortex.

This implements thread-loads.ll and rdar://6402033.

Per the fixme's, several pieces of this should be moved into Transforms/Utils.

llvm-svn: 60148
2008-11-27 05:07:53 +00:00
Evan Cheng b133907e61 Eliminate a compile time warning.
llvm-svn: 60145
2008-11-27 02:29:25 +00:00
Evan Cheng 3761143755 Avoid inserting noop's in the middle of a loop.
llvm-svn: 60141
2008-11-27 01:16:00 +00:00
Evan Cheng 83bdb38965 On x86 favors folding short immediate into some arithmetic operations (e.g. add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size.
e.g.
movl 4(%esp), %eax
addl $4, %eax

is 2 bytes shorter than

movl $4, %eax
addl 4(%esp), %eax

llvm-svn: 60139
2008-11-27 00:49:46 +00:00
Dale Johannesen 73bc0ba4c9 Add a missing case in visitADD.
llvm-svn: 60137
2008-11-27 00:43:21 +00:00
Evan Cheng d1dda5339d Add -march=x86.
llvm-svn: 60135
2008-11-27 00:37:06 +00:00
Ted Kremenek 143b058a8e Add typedef to StringMapEntry.
llvm-svn: 60134
2008-11-27 00:17:25 +00:00
Mikhail Glushenkov 6f4cb52c71 Disallow multiple edges.
llvm-svn: 60127
2008-11-26 22:59:45 +00:00
Bill Wendling a69ced6b68 Add x86-specific test for add-with-overflow intrinsics.
llvm-svn: 60125
2008-11-26 22:42:19 +00:00
Bill Wendling 751a694ad3 Generate something sensible for an [SU]ADDO op when the overflow/carry flag is
the conditional for the BRCOND statement. For instance, it will generate:

    addl %eax, %ecx
    jo LOF

instead of

    addl %eax, %ecx
    ; About 10 instructions to compare the signs of LHS, RHS, and sum.
    jl LOF

llvm-svn: 60123
2008-11-26 22:37:40 +00:00
Chris Lattner 397a11ccd8 Turn on my codegen prepare heuristic by default. It doesn't affect
performance in most cases on the Grawp tester, but does speed some 
things up (like shootout/hash by 15%).  This also doesn't impact 
compile time in a noticable way on the Grawp tester.

It also, of course, gets the testcase it was designed for right :)

llvm-svn: 60120
2008-11-26 22:16:44 +00:00
Bill Wendling 6e41adddab Small formatting change.
llvm-svn: 60113
2008-11-26 19:19:05 +00:00
Bill Wendling 0f5541e4cf Update to explain how ssp and sspreq attributes override each other.
llvm-svn: 60112
2008-11-26 19:07:40 +00:00
Devang Patel 1e916900ba Fix typo.
llvm-svn: 60111
2008-11-26 18:13:11 +00:00
Evan Cheng fc371c6c1d Cosmetic.
llvm-svn: 60110
2008-11-26 18:00:00 +00:00
Duncan Sands d1ba7908cf Check that running the DAG combiner between type
and operation legalization does something useful.

llvm-svn: 60108
2008-11-26 16:44:30 +00:00
Mikhail Glushenkov b21abb9d48 Describe some more options in the man page.
llvm-svn: 60105
2008-11-26 13:40:08 +00:00
Sanjiv Gupta 80810f8c6b Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.
llvm-svn: 60102
2008-11-26 11:19:00 +00:00
Mikhail Glushenkov 5b4e3b88eb Fix the -I option (llvmc -I dir1 -I dir2 didn't work).
llvm-svn: 60101
2008-11-26 10:57:31 +00:00
Mikhail Glushenkov f9e0513415 Refactor Tools.td to remove repetition.
llvm-svn: 60100
2008-11-26 10:56:56 +00:00
Mikhail Glushenkov 3ac10202c0 Small fix: the error message was incorrect in some cases.
llvm-svn: 60099
2008-11-26 10:55:45 +00:00
Sanjiv Gupta 83c70fa3dc Emit declaration for globals and externs.
Custom lower AND, OR, XOR bitwise operations.

llvm-svn: 60098
2008-11-26 10:53:50 +00:00
Dan Gohman 002a2cb207 Fish kill flag annotations in PUSH instructions.
llvm-svn: 60095
2008-11-26 06:39:12 +00:00
Dan Gohman 3336b1f06b LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
and the LiveInterval.h top-level comment and accordingly. This fixes blocks
having spurious live-in registers in boundary cases.

llvm-svn: 60092
2008-11-26 05:50:31 +00:00
Chris Lattner fef04acc50 teach the new heuristic how to handle inline asm.
llvm-svn: 60088
2008-11-26 04:59:11 +00:00
Devang Patel 3bc9e25df2 Disable -loop-index-split for now.
llvm-svn: 60087
2008-11-26 04:58:14 +00:00
Ted Kremenek e076257b8c Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.
llvm-svn: 60085
2008-11-26 03:33:13 +00:00
Chris Lattner 6d71b7fb95 Improve ValueAlreadyLiveAtInst with a cheap and dirty, but effective
heuristic: the value is already live at the new memory operation if
it is used by some other instruction in the memop's block.  This is
cheap and simple to compute (moreso than full liveness).

This improves the new heuristic even more.  For example, it cuts two
out of three new instructions out of 255.vortex:DbmFileInGrpHdr, 
which is one of the functions that the heuristic regressed.  This
overall eliminates another 40 instructions from 403.gcc and visibly
reduces register pressure in 255.vortex (though this only actually
ends up saving the 2 instructions from the whole program).

llvm-svn: 60084
2008-11-26 03:20:37 +00:00
Nick Lewycky ea0bd51cae __fastcall and __stdcall are mingw extensions to gcc for windows. Use the
__attribute__ notation which is supported on more platforms.

llvm-svn: 60083
2008-11-26 03:17:27 +00:00
Chris Lattner e34fe2c52d Start rewroking a subpiece of the profitability heuristic to be
phrased in terms of liveness instead of as a horrible hack.  :)

In pratice, this doesn't change the generated code for either 
255.vortex or 403.gcc, but it could cause minor code changes in 
theory.  This is framework for coming changes.

llvm-svn: 60082
2008-11-26 03:02:41 +00:00
Zhongxing Xu 50e6f82ce4 Adjust indent.
llvm-svn: 60081
2008-11-26 02:57:24 +00:00
Chris Lattner 8b291e66eb add a long-overdue AllocaInst::isStaticAlloca method.
llvm-svn: 60080
2008-11-26 02:54:17 +00:00
Bill Wendling 3d14916b3e Add test for rdar://6394879.
llvm-svn: 60079
2008-11-26 02:21:12 +00:00
Chris Lattner 383a797f42 add a comment, make save/restore logic more obvious.
llvm-svn: 60076
2008-11-26 02:11:11 +00:00
Chris Lattner eb3e4fb6fb This adds in some code (currently disabled unless you pass
-enable-smarter-addr-folding to llc) that gives CGP a better
cost model for when to sink computations into addressing modes.
The basic observation is that sinking increases register 
pressure when part of the addr computation has to be available
for other reasons, such as having a use that is a non-memory
operation.  In cases where it works, it can substantially reduce
register pressure.

This code is currently an overall win on 403.gcc and 255.vortex
(the two things I've been looking at), but there are several 
things I want to do before enabling it by default:

1. This isn't doing any caching of results, so it is much slower 
   than it could be.  It currently slows down release-asserts llc 
   by 1.7% on 176.gcc: 27.12s -> 27.60s.
2. This doesn't think about inline asm memory operands yet.
3. The cost model botches the case when the needed value is live
   across the computation for other reasons.

I'll continue poking at this, and eventually turn it on as llcbeta.

llvm-svn: 60074
2008-11-26 02:00:14 +00:00
Evan Cheng 496b042e20 Revert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble first before trying to convert it to an integer.
llvm-svn: 60072
2008-11-26 01:11:57 +00:00
Chris Lattner a9ab165b08 Teach CodeGenPrepare to look through Bitcast instructions when attempting to
optimize addressing modes.  This allows us to optimize things like isel-sink2.ll
into:

	movl	4(%esp), %eax
	cmpb	$0, 4(%eax)
	jne	LBB1_2	## F
LBB1_1:	## TB
	movl	$4, %eax
	ret
LBB1_2:	## F
	movzbl	7(%eax), %eax
	ret

instead of:

_test:
	movl	4(%esp), %eax
	cmpb	$0, 4(%eax)
	leal	4(%eax), %eax
	jne	LBB1_2	## F
LBB1_1:	## TB
	movl	$4, %eax
	ret
LBB1_2:	## F
	movzbl	3(%eax), %eax
	ret

This shrinks (e.g.) 403.gcc from 1133510 to 1128345 lines of .s.

Note that the 2008-10-16-SpillerBug.ll testcase is dubious at best, I doubt
it is really testing what it thinks it is.

llvm-svn: 60068
2008-11-26 00:26:16 +00:00
Chris Lattner f0e01def8c fix an over-reduced test.
llvm-svn: 60067
2008-11-26 00:12:08 +00:00
Chris Lattner 0f98f74c74 this doesn't need EH
llvm-svn: 60066
2008-11-26 00:03:26 +00:00
Nuno Lopes b472c9fac7 change AnnotationManager to use 'const char*' instead of std::string. this fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time)
llvm-svn: 60064
2008-11-26 00:00:44 +00:00
Oscar Fuentes c4430484bc CMake: llvmc2 is now known as llvmc.
llvm-svn: 60052
2008-11-25 22:18:49 +00:00
Mikhail Glushenkov e9eeb0d562 Add a man page for llvmc. Really basic for now, will be updated later.
llvm-svn: 60049
2008-11-25 21:38:38 +00:00
Mikhail Glushenkov 98d5ed5cb7 Since the old llvmc was removed, rename llvmc2 to llvmc.
llvm-svn: 60048
2008-11-25 21:38:12 +00:00
Mikhail Glushenkov 67630080b9 Make -fsyntax-only, -include and -emit-llvm work for C++ and Objective-C/C++.
llvm-svn: 60047
2008-11-25 21:35:20 +00:00
Mikhail Glushenkov 86d5fa8f28 docs: Add author info + fix incorrect code example.
llvm-svn: 60046
2008-11-25 21:34:53 +00:00
Mikhail Glushenkov eafa1dd9d9 Small documentation update.
llvm-svn: 60045
2008-11-25 21:34:29 +00:00
Mikhail Glushenkov cb0ffa0182 Document the plugin priority feature.
llvm-svn: 60044
2008-11-25 21:34:01 +00:00
Bill Wendling b4ff5322c1 A simplification for checking whether the signs of the operands and sum differ. Thanks, Duncan.
llvm-svn: 60043
2008-11-25 19:40:17 +00:00
Evan Cheng 2e5aeff676 convertToSignExtendedInteger should return opInvalidOp instead of asserting if sematics of float does not allow arithmetics.
llvm-svn: 60042
2008-11-25 19:00:29 +00:00
Dan Gohman bb1298e6d4 Suppress warnings.
llvm-svn: 60041
2008-11-25 18:53:54 +00:00
Chris Lattner c09f2c2bb0 This method got renamed, thanks to Mattias Holm for pointing this out.
llvm-svn: 60039
2008-11-25 18:34:50 +00:00
Scott Michel 910046d174 CellSPU:
(a) Remove conditionally removed code in SelectXAddr. Basically, hope for the
    best that the A-form and D-form address predicates catch everything before
    the code decides to emit a X-form address.
(b) Expand vector store test cases to include the usual suspects.

llvm-svn: 60034
2008-11-25 17:29:43 +00:00
Nuno Lopes ab6d607ff7 add info about how to run the tests with valgrind
llvm-svn: 60030
2008-11-25 15:57:52 +00:00
Bill Wendling bf592fccd4 Now with the correct type for the 0.
llvm-svn: 60016
2008-11-25 08:19:22 +00:00
Bill Wendling d06c625b95 Get rid of unused variable.
llvm-svn: 60015
2008-11-25 08:13:20 +00:00
Bill Wendling 4498b47677 Hacker's Delight says, "Signed integer overflow of addition occurs if and only
if the operands have the same sign and the sum has sign opposite to that of the
operands."

llvm-svn: 60014
2008-11-25 08:12:19 +00:00
Chris Lattner f3e95505c5 Teach MatchScaledValue to handle Scales by 1 with MatchAddr (which
can recursively match things) and scales by 0 by ignoring them.
This triggers once in 403.gcc, saving 1 (!!!!) instruction in the 
whole huge app.

llvm-svn: 60013
2008-11-25 07:25:26 +00:00
Chris Lattner 728f90220a significantly refactor all the addressing mode matching logic
into a new AddressingModeMatcher class.  This makes it easier
to reason about and reduces passing around of stuff, but has
no functionality change.

llvm-svn: 60012
2008-11-25 07:09:13 +00:00
Chris Lattner 58f49d2916 refactor all the constantexpr/instruction handling code out into a
new FindMaximalLegalAddressingModeForOperation helper method.

llvm-svn: 60011
2008-11-25 05:15:49 +00:00
Chris Lattner a3fbff15b9 another minor tweak
llvm-svn: 60010
2008-11-25 04:47:41 +00:00
Chris Lattner d616ef5683 minor cleanups no functionality change.
llvm-svn: 60009
2008-11-25 04:42:10 +00:00
Oscar Fuentes 669db413ff CMake: Documented two cmake variables.
llvm-svn: 60008
2008-11-25 04:23:36 +00:00
Scott Michel 8e17d02a1e CellSPU: Relax constraints on when to generate a X-form address, evidently
they were too tight according to bug 3126.

Fix bug 3126.

llvm-svn: 60006
2008-11-25 04:03:47 +00:00
Scott Michel 5149430c6e CellSPU: test should use shlqby, not shlqbyi
llvm-svn: 60001
2008-11-25 01:30:37 +00:00
Bill Wendling aec5a56446 XFAIL this test. A recent CellSPU check-in broke it.
llvm-svn: 60000
2008-11-25 00:56:34 +00:00
Dan Gohman ad2134d45d Initial support for anti-dependence breaking. Currently this code does not
introduce any new spilling; it just uses unused registers.

Refactor the SUnit topological sort code out of the RRList scheduler and
make use of it to help with the post-pass scheduler.

llvm-svn: 59999
2008-11-25 00:52:40 +00:00
Scott Michel 524c284aef CellSPU: Fix mnemonic typo in pattern; "shlqbyi" -> "shlqby".
llvm-svn: 59998
2008-11-25 00:23:16 +00:00
Bill Wendling a307020800 Testcase for constant CFStrings.
llvm-svn: 59992
2008-11-24 23:28:09 +00:00
Chris Lattner 6416a6b7a0 rearrange and tidy some code, no functionality change.
llvm-svn: 59990
2008-11-24 22:44:16 +00:00
Chris Lattner d917c8c8fe minor cleanups to debug code, no functionality change.
llvm-svn: 59989
2008-11-24 22:40:05 +00:00
Chris Lattner 18065ce9fc reenable test
llvm-svn: 59986
2008-11-24 21:27:20 +00:00
Chris Lattner d78894197a reenable the right part of the code.
llvm-svn: 59985
2008-11-24 21:26:21 +00:00
Bill Wendling e6fe59df6d Temporarily XFAIL this test. r59976 and r59972 broke it.
llvm-svn: 59981
2008-11-24 20:43:33 +00:00
Dan Gohman b5e055fa51 Move the scheduler constructor functions to SchedulerRegistry.h, to
simplify header dependencies for front-ends that just want to choose
a scheduler and don't need all the scheduling machinery declarations.

llvm-svn: 59978
2008-11-24 19:53:21 +00:00
Dan Gohman c693a36757 Fix an unused-parameter warning.
llvm-svn: 59977
2008-11-24 19:51:59 +00:00
Chris Lattner 992a541002 revert an accidental commit, this fixes the regression on test/CodeGen/X86/isel-sink.ll
llvm-svn: 59976
2008-11-24 19:40:34 +00:00
Chris Lattner 53d6a07869 Fix 3113: If we have a dead cyclic PHI, replace the whole thing
with an undef.

llvm-svn: 59972
2008-11-24 19:25:36 +00:00
Bill Wendling 66835479d7 - Make lowering of "add with overflow" customizable by back-ends.
- Mark "add with overflow" as having a custom lowering for X86. Give it a null
  lowering representation for now.

llvm-svn: 59971
2008-11-24 19:21:46 +00:00
Scott Michel 2e5df906f8 CellSPU:
(a) Slight rethink on i64 zero/sign/any extend code - use a shuffle to
    directly zero-extend i32 to i64, but use rotates and shifts for
    sign extension. Also ensure unified register consistency.
(b) Add new test harness for i64 operations: i64ops.ll

llvm-svn: 59970
2008-11-24 18:20:46 +00:00
Dan Gohman 5cc12a8e31 Check in the rest of this change. The isAntiDep flag needs to be passed
to removePred because an SUnit can both data-depend and anti-depend
on the same SUnit.

llvm-svn: 59969
2008-11-24 17:33:52 +00:00
Dan Gohman d2b10368ed Pass the isAntiDep argument.
llvm-svn: 59968
2008-11-24 17:24:27 +00:00
Dan Gohman 11e4be3717 Run post-RA scheduling after branch folding, as it tends to
obscure tail-merging opportunities.

llvm-svn: 59967
2008-11-24 17:22:52 +00:00
Dan Gohman 8ef449828f Fix a few HTML tidiness issues.
llvm-svn: 59966
2008-11-24 17:18:39 +00:00
Scott Michel efc8c7a292 CellSPU:
(a) Improve the extract element code: there's no need to do gymnastics with
    rotates into the preferred slot if a shuffle will do the same thing.
(b) Rename a couple of SPUISD pseudo-instructions for readability and better
    semantic correspondence.
(c) Fix i64 sign/any/zero extension lowering.

llvm-svn: 59965
2008-11-24 17:11:17 +00:00
Dan Gohman f3bfcf9748 Delete some spurious characters.
llvm-svn: 59964
2008-11-24 16:45:15 +00:00
Dan Gohman 970a547554 Fix some "</p>"s.
llvm-svn: 59963
2008-11-24 16:35:31 +00:00
Dan Gohman 1e6f511050 Some documentation for LegalizeTypes.
llvm-svn: 59962
2008-11-24 16:27:17 +00:00
Matthijs Kooijman 1dc8363d95 Minor fix debug for register allocation debug output.
llvm-svn: 59961
2008-11-24 16:01:21 +00:00
Duncan Sands dc2dac181a If the type legalizer actually legalized anything
(this doesn't happen that often, since most code
does not use illegal types) then follow it by a
DAG combiner run that is allowed to generate
illegal operations but not illegal types.  I didn't
modify the target combiner code to distinguish like
this between illegal operations and illegal types,
so it will not produce illegal operations as well
as not producing illegal types.

llvm-svn: 59960
2008-11-24 14:53:14 +00:00
Matthijs Kooijman 75339657bd Fix comments.
llvm-svn: 59958
2008-11-24 11:44:00 +00:00
Torok Edwin 9bc1a6554e NULL, unique pointers from malloc(0), and freed pointers are legal values for
noalias attribute parameters/return values.

llvm-svn: 59955
2008-11-24 08:02:24 +00:00
Evan Cheng 977e7be9d4 Move target independent td files from lib/Target/ to include/llvm/Target so they can be distributed along with the header files.
llvm-svn: 59953
2008-11-24 07:34:46 +00:00
Evan Cheng a8fd1f2c8e Eliminate some unused variable compile time warnings.
llvm-svn: 59952
2008-11-24 07:09:49 +00:00
Bill Wendling 411eaa5c57 Test add-with-overflow with fast ISel.
llvm-svn: 59945
2008-11-24 05:23:38 +00:00
Nick Lewycky d59572cb22 Seriously strengthen the guarantee offered by noalias on a function's return
value. It must now be as if the pointer were allocated and has not escaped to
the caller. Thanks to Dan Gohman for pointing out the error in the original
and helping devise this definition.

llvm-svn: 59940
2008-11-24 05:00:44 +00:00
Nick Lewycky f5ffcbcd0b Extend the 'noalias' attribute to function return values. This is intended to
indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).

No changes to the bitcode reader/writer, asm printer or verifier were needed.

llvm-svn: 59934
2008-11-24 03:41:24 +00:00
Mon P Wang 35a70ec131 Added missing description for -disable-mmx option.
llvm-svn: 59929
2008-11-24 02:10:43 +00:00
Bill Wendling 2278f8f5e1 Add support for llvm.uadd.with.overflow.
llvm-svn: 59926
2008-11-24 01:38:29 +00:00
Scott Michel 037fe56069 Roll back rev 59890, since Chris says this can never happen.
llvm-svn: 59914
2008-11-23 19:22:48 +00:00
Duncan Sands 8d6e2e13d5 Rename SetCCResultContents to BooleanContents. In
practice these booleans are mostly produced by SetCC,
however the concept is more general.

llvm-svn: 59911
2008-11-23 15:47:28 +00:00
Chris Lattner ddd7581c73 Make JIT::runFunction handle functions with non-C calling conventions.
llvm-svn: 59904
2008-11-23 08:00:11 +00:00
Mon P Wang 0aa8f0a549 Added -disable-mmx using a patch from Preston Gurd.
llvm-svn: 59901
2008-11-23 04:37:22 +00:00
Mon P Wang 2967480f54 Added check to avoid generating extract subvector beyond the end of the vector when normalizing vector shuffles.
llvm-svn: 59900
2008-11-23 04:35:05 +00:00
Misha Brukman 50de2b2365 Fixed named anchor for llvm.stackprotector intrinsic.
llvm-svn: 59893
2008-11-22 23:55:29 +00:00
Scott Michel 0be0339baa CellSPU: Fix bug 3056. Varadic extract_element was not implemented (nor was it
ever conceived to occur).

llvm-svn: 59891
2008-11-22 23:50:42 +00:00
Scott Michel fe96a906ef Check for NULL before traversing the isa<> type hierarchy checking with a
NULL-based reference.

Note: Encountered this a few times on Tiger + gcc 4.0.1. Might just be a
platform-specific compiler issue, but it's good defensive programming in any
case.

llvm-svn: 59890
2008-11-22 23:49:26 +00:00
Chris Lattner 1fdb4310e3 Describe how the JIT maps fields to MachineOperands, patch by
JP Bonn!

llvm-svn: 59876
2008-11-22 19:10:48 +00:00
Anton Korobeynikov bff4b37af5 Make a convenient helper for printing offsets.
llvm-svn: 59872
2008-11-22 16:15:34 +00:00
Bill Wendling 5424e6d4ec Cleanup of the [SU]ADDO type legalization code. Patch by Duncan!
"It simplifies the type legalization part a bit, and produces better code by
teaching SelectionDAG about the extra bits in an i8 SADDO/UADDO node.  In
essence, I spontaneously decided that on x86 this i8 boolean result would be
either 0 or 1, and on other platforms 0/1 or 0/-1, depending on whether the
platform likes it's boolean zero extended or sign extended."

llvm-svn: 59864
2008-11-22 07:24:01 +00:00
Bill Wendling be8e7f851c - Move conversion of [SU]ADDO from DAG combiner into legalizer.
- Add "promote integer type" stuff to the legalizer for these nodes.

llvm-svn: 59847
2008-11-22 00:22:52 +00:00
Devang Patel 702f45df58 Fix build failure.
llvm-svn: 59844
2008-11-21 21:00:20 +00:00
Devang Patel cb181bb203 Silence unused variable warnings.
llvm-svn: 59841
2008-11-21 20:00:59 +00:00
Devang Patel b885a91a12 Document TEST=dbgopt
llvm-svn: 59839
2008-11-21 19:35:57 +00:00
Dan Gohman 57d0b88830 Correctly set the isCtrl flag for chain dependencies.
llvm-svn: 59837
2008-11-21 19:17:25 +00:00
Dan Gohman 546bcfe8d6 Update comments.
llvm-svn: 59836
2008-11-21 19:16:58 +00:00
Dan Gohman 8dfa51c5ef Update comments.
llvm-svn: 59834
2008-11-21 19:10:41 +00:00
Chris Lattner dd7083452f reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an
arbitrary integer width for the count.

llvm-svn: 59823
2008-11-21 16:42:48 +00:00
Bill Wendling 4bce2bff88 Revert r59802. It was breaking the build of llvm-gcc:
g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic'
make[3]: *** [llvm-convert.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

llvm-svn: 59809
2008-11-21 09:09:41 +00:00
Sanjiv Gupta 09a203765a Make mem[cpy,move,set] intrinsics overloaded.
llvm-svn: 59802
2008-11-21 07:49:09 +00:00
Bill Wendling 0b5be6c5e0 Default to converting UADDO to the generic form that SADDO is converted to.
llvm-svn: 59801
2008-11-21 07:44:30 +00:00
Nick Lewycky 07d726ec4d Optimize (x/y)*y into x-(x%y) in general. Div and rem are about the same, and
a subtract is cheaper than a multiply. This generalizes an existing transform.

llvm-svn: 59800
2008-11-21 07:33:58 +00:00
Duraid Madina 132f6b472c LLVM does have a fortran FE!
llvm-svn: 59795
2008-11-21 06:26:56 +00:00
Mon P Wang c311360909 Clean up normalization of shuffles
llvm-svn: 59792
2008-11-21 04:25:21 +00:00
Scott Michel c6918c1ffa CellSPU:
(a) Fix bgs 3052, 3057
(b) Incorporate Duncan's suggestions re: i1 promotion
(c) Indentation updates.

llvm-svn: 59790
2008-11-21 02:56:16 +00:00