Commit Graph

40810 Commits

Author SHA1 Message Date
Chris Lattner a00c808d40 dead pass
llvm-svn: 47324
2008-02-19 07:58:11 +00:00
Chris Lattner c3591a0d48 remove the LowerSelect pass. The last client was the old Sparc backend, which is long dead by now.
llvm-svn: 47323
2008-02-19 07:49:17 +00:00
Chris Lattner 032fb2eda9 remove the lower packed pass. It can never work and even the parts that
could work don't work fully.  This fixes PR1705.  Oh yeah, we don't have
packed types anymore either ;-)

llvm-svn: 47322
2008-02-19 07:39:17 +00:00
Owen Anderson e92e303582 Refactor this method a bit, and correct a test that was completely wrong but happened to work out anyways. :-)
llvm-svn: 47321
2008-02-19 07:07:51 +00:00
Chris Lattner f7b7ba9c5a isa+cast -> dyncast.
llvm-svn: 47320
2008-02-19 06:53:20 +00:00
Chris Lattner c130e3afc4 simplify this code again, try 2 :)
llvm-svn: 47319
2008-02-19 06:52:38 +00:00
Owen Anderson e71d6e37b2 Fix a comment.
llvm-svn: 47318
2008-02-19 06:51:23 +00:00
Owen Anderson d2d7c6b309 In addition to arguments passed to it, memcpy (and all other calls) can ModRef pointers that alias their arguments as well. This fixes PR2057.
llvm-svn: 47317
2008-02-19 06:47:18 +00:00
Chris Lattner d2a02fe840 fix the second half of PR2041: __restrict is ok in c90 mode, even if
restrict isn't.

llvm-svn: 47316
2008-02-19 06:46:10 +00:00
Owen Anderson 806cbde53b Major improvements to yesterday's return slot optimization. Remove some unneccessary constraints,
and add some others that should have been in from the first place.  Document the whole thing better.

llvm-svn: 47315
2008-02-19 06:35:43 +00:00
Chris Lattner b4c6cc9587 Fix some minor issues folding undef, PR2052
llvm-svn: 47314
2008-02-19 06:22:12 +00:00
Chris Lattner 0fe6bce9ce fdiv/frem of undef can produce undef, because the undef operand
can be a SNaN.  We could be more aggressive and turn this into 
unreachable, but that is less nice, and not really worth it.

llvm-svn: 47313
2008-02-19 06:12:18 +00:00
Chris Lattner 5f9f34d070 regenerate
llvm-svn: 47312
2008-02-19 04:36:25 +00:00
Chris Lattner 95816b9dee Fix PR2060 by rejecting invalid types for integer constants.
llvm-svn: 47311
2008-02-19 04:36:07 +00:00
Owen Anderson c0c3cd8e27 Factor the profitability check for return slot optimization out into a static function.
At some point in the future, this check will become smarter.

llvm-svn: 47310
2008-02-19 03:27:34 +00:00
Owen Anderson 551b8eeb5c An sret parameter is required to be the first parameter, so there's no need to loop
over all the parameters of the callee looking for it.

llvm-svn: 47309
2008-02-19 03:15:29 +00:00
Nick Lewycky 0e2e21b8b9 Don't spew stats to stderr.
llvm-svn: 47308
2008-02-19 03:11:47 +00:00
Owen Anderson 336824f102 Cleanup some of my patches from yesterday. Refactor the check for which xform
to apply to a memcpy into processInstruction.  Also, fix a bug in the check due to
missing braces.

llvm-svn: 47307
2008-02-19 03:09:45 +00:00
Nick Lewycky b54a803a2e Fix up the run line for this new test.
llc: for the -info-output-file option:  requires a value!

llvm-svn: 47306
2008-02-19 02:58:36 +00:00
Owen Anderson ffca8e99b2 Fix Transforms/GVN/memcpy.ll, which Chris broke in r47275 by reordering the branches. memcpy's are a kind of CallInst.
llvm-svn: 47305
2008-02-19 02:53:23 +00:00
Ted Kremenek 86dc7ae58e Fixed bug classof() bug with RValues that could cause an UninitializedVal
or UnknownVal to be interpreted as an actual NonLValue/LValue.

llvm-svn: 47304
2008-02-19 02:34:18 +00:00
Ted Kremenek dbb1a3724c For now, --grsimple skips analyzing functions in header files.
llvm-svn: 47303
2008-02-19 02:33:31 +00:00
Evan Cheng 634a8f9275 New test.
llvm-svn: 47302
2008-02-19 02:09:58 +00:00
Evan Cheng 3266ff9a6f PR1909: Tail merging pass ran wild. It makes no sense to merge blocks in order to save a single instruction since a branch will be inserted for each BB.
llvm-svn: 47301
2008-02-19 02:09:37 +00:00
Evan Cheng 3b56f506e7 Me not like duplicated comments.
llvm-svn: 47300
2008-02-19 02:05:16 +00:00
Ted Kremenek 8b51dc2754 Added back explicit state/node creation when visiting IntegerLiterals and
CharacterLiterals.  This may not be a permanent solution; it doesn't cost that
much, however, to create a few additional states, and solves a whole bunch
of edge cases when handling ?, ||, and &&.

llvm-svn: 47299
2008-02-19 02:01:16 +00:00
Ted Kremenek e0188e6ad7 Added boilerplate transfer function support for CallExprs.
llvm-svn: 47298
2008-02-19 01:44:53 +00:00
Tanya Lattner e1d2df0738 Remove llvm-upgrade and update tests.
llvm-svn: 47297
2008-02-19 01:44:26 +00:00
Tanya Lattner 3f04773f78 Remove llvm-upgrade and update tests.
llvm-svn: 47296
2008-02-19 01:41:04 +00:00
Nate Begeman 22011e90c9 Allow ArraySubscriptExpr to be a base node for vector dereference. This
allows you to do things like 
typedef __attribute__(( ocu_vector_type(4))) float float4;
float4 *x;
float y = x[0][2];

llvm-svn: 47295
2008-02-19 01:11:03 +00:00
Ted Kremenek 58cc30b64b Added FIXME for properly handling local arrays using symbolic LValues.
For now we just treat their values as "Unknown."

llvm-svn: 47294
2008-02-19 00:29:51 +00:00
Ted Kremenek 0f7130adc4 --grsimple now reports the number of nodes in the ExplodedGraph for
an analyzed function.

GRExprEngine now records stores to "uninitialized lvalues" (which are sinks in
the ExplodedGraph).

llvm-svn: 47293
2008-02-19 00:22:37 +00:00
Lauro Ramos Venancio c58fc4052e A global without initializer must be emitted as weak.
Fix Olden/bh test.

llvm-svn: 47292
2008-02-19 00:04:15 +00:00
Evan Cheng 6200c225e0 - When DAG combiner is folding a bit convert into a BUILD_VECTOR, it should check if it's essentially a SCALAR_TO_VECTOR. Avoid turning (v8i16) <10, u, u, u> to <10, 0, u, u, u, u, u, u>. Instead, simply convert it to a SCALAR_TO_VECTOR of the proper type.
- X86 now normalize SCALAR_TO_VECTOR to (BIT_CONVERT (v4i32 SCALAR_TO_VECTOR)). Get rid of X86ISD::S2VEC.

llvm-svn: 47290
2008-02-18 23:04:32 +00:00
Ted Kremenek a6f63d94a5 Added "size()" and "empty()" methods to ExplodedGraphImpl.
llvm-svn: 47289
2008-02-18 23:00:23 +00:00
Ted Kremenek 346169fa3d Added more assertions and checks in transfer function logic to check for
UninitializedVals and UnknownVals.

llvm-svn: 47288
2008-02-18 22:57:02 +00:00
Nick Lewycky fefd0202c9 Correctly fold divide-by-constant, even when faced with overflow.
llvm-svn: 47287
2008-02-18 22:48:05 +00:00
Lauro Ramos Venancio dec89733a7 Implement multi-dimension array initalizer.
Fix McCat/08-main test.

llvm-svn: 47286
2008-02-18 22:44:02 +00:00
Ted Kremenek 86e793937a Running -grsimple now emits diagnostics about the time spent analyzing each function. Will
probably make this a separate command line option later.

Added "--analyze-function" option to the driver to (gradually) allow different
analyses to only be run on specific functions. Currently only --grsimple uses
this option.

llvm-svn: 47285
2008-02-18 21:21:23 +00:00
Ted Kremenek 3b1beb224b Temporary solution to push analysis through to analyzing PCRE.
We will implement symbol "unification" later.

llvm-svn: 47284
2008-02-18 21:19:49 +00:00
Dan Gohman c589243107 Chris pointed out that it's not necessary to set i64 MUL to Expand
on x86-32 since i64 itself is not a Legal type. And, update some
comments.

llvm-svn: 47282
2008-02-18 19:34:53 +00:00
Evan Cheng b2e4b7adde - Remove the previous check which broke coalescer-commute3.ll
- For now, conservatively ignore copy MI whose source is a physical register. Commuting its def MI can cause a physical register live interval to be live through a loop (since we know it's live coming into the def MI).

llvm-svn: 47281
2008-02-18 18:56:31 +00:00
Chris Lattner 6bb6a55f01 upgrade some tests.
llvm-svn: 47280
2008-02-18 18:46:39 +00:00
Nate Begeman 0fddc34485 Add a note
llvm-svn: 47279
2008-02-18 18:39:23 +00:00
Chris Lattner a827205670 Add a note about sext from i1 plus flags use.
llvm-svn: 47278
2008-02-18 18:30:13 +00:00
Dan Gohman a589ee11bb Don't mark scalar integer multiplication as Expand on x86, since x86
has plain one-result scalar integer multiplication instructions.
This avoids expanding such instructions into MUL_LOHI sequences that
must be special-cased at isel time, and avoids the problem with that
code that provented memory operands from being folded.

This fixes PR1874, addressesing the most common case. The uncommon
cases of optimizing multiply-high operations will require work
in DAGCombiner.

llvm-svn: 47277
2008-02-18 17:55:26 +00:00
Chris Lattner 1e3c501cb8 Transforming -A + -B --> -(A + B) isn't safe for FP, thanks
to Dale for noticing this!

llvm-svn: 47276
2008-02-18 17:50:16 +00:00
Chris Lattner 0af5601028 minor code simplification, no functionality change.
llvm-svn: 47275
2008-02-18 17:47:29 +00:00
Chris Lattner 23fe6630e3 make this just a bit more strict.
llvm-svn: 47274
2008-02-18 17:33:10 +00:00
Duncan Sands 85fab3a3ad Simplify caller updating using a CallSite, as
requested by Chris.  While there, do the same
for an existing function committed by someone
called "lattner" :)

llvm-svn: 47273
2008-02-18 17:32:13 +00:00