Commit Graph

60243 Commits

Author SHA1 Message Date
Eli Friedman fd8b335ca4 Minor improvement to FCOPYSIGN to use BIT_CONVERT in cases where the
corresponding integer type is legal.

llvm-svn: 72373
2009-05-24 20:29:11 +00:00
Torok Edwin 26895b518b Move Rewriter.clear() earlier, to avoid triggerring the AssertingVH by
one of the RecursivelyDeleteTriviallyDeadInstructions.
Add a comment explaining why the cache needs to be cleared.

llvm-svn: 72372
2009-05-24 20:08:21 +00:00
Torok Edwin 5349cf5f4b Instead of clearing the rewriter, don't attempt to rewrite dead phi nodes.
Also fix 80 column violation.

llvm-svn: 72371
2009-05-24 19:36:09 +00:00
Eli Friedman 2d49c4f98d Make sure an invalid concatentaion doesn't insert whitespace before
the RHS.  Fixes assembler-with-cpp issue reported on cfe-dev.

llvm-svn: 72370
2009-05-24 19:25:46 +00:00
Dan Gohman 4486da5b78 When rewriting the loop exit test with the canonical induction variable,
leave the original comparison in place if it has other uses, since the
other uses won't be dominated by the new comparison instruction.

llvm-svn: 72369
2009-05-24 19:11:38 +00:00
Dan Gohman 3cdfe749e0 Fix this code for hosts where std::vector doesn't have .data().
Use &Ops[0] instead, which is safe since Ops will never be empty here.

llvm-svn: 72368
2009-05-24 19:02:45 +00:00
Dan Gohman fb56cf1b1d When replacing a floating-point comparison with an integer
comparison, use takeName to give the integer comparison a name.

llvm-svn: 72367
2009-05-24 18:09:01 +00:00
Dan Gohman 291c2e04bd Generalize SCEVExpander::visitAddRecExpr's GEP persuit, and avoid
sending SCEVUnknowns to expandAddToGEP. This avoids the need for
expandAddToGEP to bend the rules and peek into SCEVUnknown
expressions.

Factor out the code for testing whether a SCEV can be factored by
a constant for use in a GEP index. This allows it to handle
SCEVAddRecExprs, by recursing.

As a result, SCEVExpander can now put more things in GEP indices,
so it emits fewer explicit mul instructions.

llvm-svn: 72366
2009-05-24 18:06:31 +00:00
Dan Gohman 071156c19c When the low bits of one operand of an add are zero, that number
of low bits of the other operand are preserved in the output.

llvm-svn: 72365
2009-05-24 18:02:35 +00:00
Torok Edwin d184bc209c The rewriter may hold references to instructions that are deleted because they are trivially dead.
Fix by clearing the rewriter cache before deleting the trivially dead
instructions.
Also make InsertedExpressions use an AssertingVH to catch these
bugs easier.

llvm-svn: 72364
2009-05-24 14:23:16 +00:00
Eli Friedman fe87034cef Rewrite ISD::FCOPYSIGN lowering to never use i64. Not really ideal, but
it's late, and I don't have any better ideas at the moment.  Fixes PR4257.

llvm-svn: 72363
2009-05-24 10:21:20 +00:00
Torok Edwin 6ee6f73973 Make bugpoint emit a bugpoint-reduced-blocks.bc, because bugpoint itself
can crash during instruction simplification (for example if it creates a
broken module).

llvm-svn: 72362
2009-05-24 09:40:47 +00:00
Torok Edwin 5bd3f7b4a2 Add -disable-global-remove option to bugpoint.
Sometimes when bugpointing a crash the bugpoint-reduced-simplified.bc reproduces
a totally different bug than the original one ("GV doesn't have initializer").
Although its useful to report that bug too, I need a way to reduce the original
bug, hence I introduced -disable-global-remove.

llvm-svn: 72361
2009-05-24 09:31:04 +00:00
Eli Friedman cd2e0cd297 Update for CMakeLists; untested, so tell me if there are issues.
llvm-svn: 72360
2009-05-24 09:13:13 +00:00
Eli Friedman a4e1675dac Remove checks of getTypeAction from LegalizeOp; we already assert that
all results and all operands are legal, so this change shouldn't affect 
behavior at all.

llvm-svn: 72359
2009-05-24 08:42:01 +00:00
Eli Friedman 5e0d150689 Disable type legalization in LegalizeDAG.
This leaves around 4000 lines of dead code; I'll clean that up 
in subsequent commits.

llvm-svn: 72358
2009-05-24 02:46:31 +00:00
Nick Lewycky aab930a5db Remove border around table used for layout.
llvm-svn: 72357
2009-05-24 02:46:06 +00:00
Eli Friedman 9c6ab1a34d Make the PPC backend use a legal type for the operands to the BUILD_VECTOR
nodes it generates.

llvm-svn: 72356
2009-05-24 02:03:36 +00:00
Daniel Dunbar 91b418ea3c Another tweak to the clang Getting Started page.
llvm-svn: 72355
2009-05-24 01:40:10 +00:00
Daniel Dunbar b402d5c32d Minor updates to the clang Getting Started page.
llvm-svn: 72354
2009-05-24 01:00:12 +00:00
Mike Stump b9f2518626 Propagate volatile for implicit property refernces.
llvm-svn: 72353
2009-05-23 23:52:31 +00:00
Mike Stump 9afc476d4a Propagate volatile around for property references.
llvm-svn: 72352
2009-05-23 23:48:13 +00:00
Eli Friedman 7badee92ad Fix a bug in the expansion of EXTRACT_SUBVECTOR in
ExpandExtractFromVectorThroughStack.

llvm-svn: 72351
2009-05-23 23:03:28 +00:00
Eli Friedman 2199ed399f Make the X86 backend mark EXTRACT_SUBVECTOR as Expand, at least for the
moment.

llvm-svn: 72350
2009-05-23 22:44:52 +00:00
Eli Friedman 40afdb63ec Add a proper implementation of EXTRACT_SUBVECTOR legalization that
doesn't split legal vector operands.  This is necessary because the 
type legalization (and therefore, vector splitting) code will be going 
away soon.

llvm-svn: 72349
2009-05-23 22:37:25 +00:00
Mike Stump 5e9e61b8d2 Track volatile aggregate copies better. I'm hoping someone else will decide
how to get the backend to know that the operation is volatile.

llvm-svn: 72348
2009-05-23 22:29:41 +00:00
Mike Stump 332ec2ce81 Fix thinko, and implement aggregate volatile reads.
llvm-svn: 72347
2009-05-23 22:01:27 +00:00
Mike Stump 23abd46b79 More volatile fixes. Can't testcase these yet as ultimately volatile
is still ignored.

llvm-svn: 72344
2009-05-23 21:40:07 +00:00
Torok Edwin 86ced8af3d Use latin symbols. I was told not everybody has a UTF-8 capable editor.
llvm-svn: 72343
2009-05-23 20:40:47 +00:00
Mike Stump ca9fc09c61 Collapse a few FIXMEs together and refactor to make fixing the code easier.
llvm-svn: 72342
2009-05-23 20:28:01 +00:00
Mike Stump 93700fc988 Add support for volatile RValues.
llvm-svn: 72341
2009-05-23 20:21:36 +00:00
Torok Edwin cfe9db7380 Write family name last, as other entries in this file.
llvm-svn: 72340
2009-05-23 20:21:09 +00:00
Torok Edwin 0b6513df48 Add myself.
llvm-svn: 72339
2009-05-23 20:19:52 +00:00
Anton Korobeynikov 0b91cc4260 Add ARMv7 architecture, Cortex processors and different FPU modes handling.
llvm-svn: 72337
2009-05-23 19:51:43 +00:00
Anton Korobeynikov fa6f1eea36 Emit ARM Build Attributes
llvm-svn: 72336
2009-05-23 19:51:20 +00:00
Anton Korobeynikov 08bf4c0f5a Propagate CPU string out of SubtargetFeatures
llvm-svn: 72335
2009-05-23 19:50:50 +00:00
Daniel Dunbar b8fb96905d Fix use after free, found by Benjamin Kramer.
llvm-svn: 72333
2009-05-23 18:55:58 +00:00
Jay Foad c1fca9fb3a Work around a page size issue on Cygwin.
llvm-svn: 72332
2009-05-23 17:57:59 +00:00
Torok Edwin be6a9a151a Fix PR4254.
The DAGCombiner created a negative shiftamount, stored in an
unsigned variable. Later the optimizer eliminated the shift entirely as being
undefined.
Example: (srl (shl X, 56) 48). ShiftAmt is 4294967288.
Fix it by checking that the shiftamount is positive, and storing in a signed
variable.

llvm-svn: 72331
2009-05-23 17:29:48 +00:00
Fariborz Jahanian ba74e5daa5 Test for David Chisnall's -fobjc-sender-dependent-dispatch patch.
llvm-svn: 72330
2009-05-23 17:03:50 +00:00
Torok Edwin a602caf369 stat64/open64/lseek64 for the interpreter
llvm-svn: 72329
2009-05-23 16:23:59 +00:00
Torok Edwin 7996339dd8 available_externall linkage is not local, this was confusing the codegenerator,
and it wasn't generating calls through @PLT for these functions.
hasLocalLinkage() is now false for available_externally,
I attempted to fix the inliner and dce to handle available_externally properly.
It passed make check.

llvm-svn: 72328
2009-05-23 14:06:57 +00:00
Eli Friedman 53a71147ba Fix test to account for legalization changes; I think this ends up
running an extra DAGCombine pass which improves the code a bit.

llvm-svn: 72326
2009-05-23 13:15:11 +00:00
Eli Friedman da90dd6d72 Add a new step to legalization to legalize vector math operations. This
will allow simplifying LegalizeDAG to eliminate type legalization.  (I 
have a patch to do that, but it's not quite finished; I'll commit it 
once it's finished and I've fixed any review comments for this patch.)  
See the comment at the beginning of 
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp for more details on the
motivation for this patch.

llvm-svn: 72325
2009-05-23 12:35:30 +00:00
Eli Friedman dfe4f25355 Make the x86 backend custom-lower UINT_TO_FP and FP_TO_UINT on 32-bit
systems instead of attempting to promote them to a 64-bit SINT_TO_FP or 
FP_TO_SINT.  This is in preparation for removing the type legalization 
code from LegalizeDAG: once type legalization is gone from LegalizeDAG, 
it won't be able to handle the i64 operand/result correctly.

This isn't quite ideal, but I don't think any other operation for any 
target ends up in this situation, so treating this case specially seems 
reasonable.

llvm-svn: 72324
2009-05-23 09:59:16 +00:00
Mike Stump 8673657275 One step to fixing up codegen for a=b, where a is a volatile struct.
llvm-svn: 72315
2009-05-23 04:13:59 +00:00
Eli Friedman 57406b2783 Add IEEE quad support to DefineFloatMacros.
llvm-svn: 72314
2009-05-23 03:50:01 +00:00
Daniel Dunbar 223db1c9e5 Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.
- Otherwise we may incorrectly miss generation of some write barriers.

llvm-svn: 72313
2009-05-23 02:49:02 +00:00
Oscar Fuentes eeac588471 CMake: Use libdl only when available. Fixes build on FreeBSD.
llvm-svn: 72311
2009-05-23 02:37:24 +00:00
Eli Friedman f98fc352b8 PR4247: Widen the buffer slightly so it can hold all the definitions for
PPC double double.

(No testcase because no normal target uses the format at the moment.)

llvm-svn: 72310
2009-05-23 02:03:39 +00:00