Commit Graph

45577 Commits

Author SHA1 Message Date
Douglas Gregor b874bd9f41 Really, really fix PointerUnion3::is
llvm-svn: 68079
2009-03-31 00:34:31 +00:00
Dan Gohman adccd30533 Except in asm-verbose mode, avoid printing labels for blocks that are
only reachable via fall-through edges. This dramatically reduces the
number of labels printed, and thus also the number of labels the
assembler must parse and remember.

llvm-svn: 68073
2009-03-30 22:55:17 +00:00
Devang Patel 6e68bd007a Loop Index Split can eliminate a loop if it can determin if loop body is executed only once. There was a bug in determining IV based value of the iteration for which the loop body is executed. Fix it.
llvm-svn: 68071
2009-03-30 22:24:10 +00:00
Douglas Gregor d33a33cedb Make PointerUnion3::get work properly
llvm-svn: 68067
2009-03-30 21:44:13 +00:00
Evan Cheng a84a318873 When optimzing a mul by immediate into two, the resulting mul's should get a x86 specific node to avoid dag combiner from hacking on them further.
llvm-svn: 68066
2009-03-30 21:36:47 +00:00
Evan Cheng 09f5be8146 Turn a 2-address instruction into a 3-address one when it's profitable even if the two-address operand is killed.
e.g.
%reg1024<def> = MOV r1
%reg1025<def> = ADD %reg1024, %reg1026
r0            = MOV %reg1025

If it's not possible / profitable to commute ADD, then turning ADD into a LEA saves a copy.

llvm-svn: 68065
2009-03-30 21:34:07 +00:00
Chris Lattner 32f4959ee4 update comment.
llvm-svn: 68060
2009-03-30 20:44:04 +00:00
Bill Wendling 2f52e6488f Balance out quote in debug output.
llvm-svn: 68059
2009-03-30 20:32:22 +00:00
Bill Wendling 5f0d97c571 Fix grammar-o in comment.
llvm-svn: 68057
2009-03-30 20:30:02 +00:00
Chris Lattner 8aa8f5bf6a add a PointerUnion3 class and generalize PointerUnion to work with
anything pointer-like, which may or may not actually be a pointer.

llvm-svn: 68056
2009-03-30 20:29:27 +00:00
Chris Lattner 73acaa8862 fix the PointerLikeTypeTraits specialization for PointerIntPair to
allow the traits to be specified as well.

llvm-svn: 68055
2009-03-30 20:28:50 +00:00
Dan Gohman ff62c62b7c Constify arguments in isSuccessor and isLayoutSuccessor.
llvm-svn: 68054
2009-03-30 20:06:29 +00:00
Dan Gohman d3899dc52f Update the polygen grammer to reflect that zext and sext are no longer
valid argument attributes (zeroext and signext are).

llvm-svn: 68053
2009-03-30 19:59:02 +00:00
John Mosby 169927e7ef docs/TestingGuide.html: correction to prev. text (objdir!=srcdir required for running test-suite), removed refs to llvm-test
llvm-svn: 68051
2009-03-30 18:56:53 +00:00
Bob Wilson 57178e8822 Fix comment to match function name.
llvm-svn: 68050
2009-03-30 18:49:37 +00:00
Devang Patel 7a78f3abd3 getEntryFor() may invalidate DenseMap iterator.
Walking an invalidated iterator is not a good idea.

llvm-svn: 68047
2009-03-30 18:34:47 +00:00
Mike Stump 9d98cc6b93 Add ccc back for now.
llvm-svn: 68038
2009-03-30 17:43:04 +00:00
Anton Korobeynikov 1a7432742c Clearify local/global relocations wording
llvm-svn: 68037
2009-03-30 17:38:00 +00:00
Anton Korobeynikov 56709fdffe Fix thinko: put stuff with both global and local relocations into data.rel{.ro}, not .local
llvm-svn: 68036
2009-03-30 17:37:43 +00:00
Anton Korobeynikov 71278a5be8 Tweak test for recent relro stuff
llvm-svn: 68035
2009-03-30 15:28:40 +00:00
Anton Korobeynikov 255a3cbfb4 Fix infinite looping
llvm-svn: 68034
2009-03-30 15:28:21 +00:00
Anton Korobeynikov d5e8e93a92 Properly propagate Kind.
llvm-svn: 68033
2009-03-30 15:28:00 +00:00
Anton Korobeynikov 7c5f3c40ca Do not propagate ELF-specific stuff (data.rel) into other targets. This simplifies code and also ensures correctness.
llvm-svn: 68032
2009-03-30 15:27:43 +00:00
Anton Korobeynikov c247fd396c Add data.rel stuff
llvm-svn: 68031
2009-03-30 15:27:03 +00:00
Chris Lattner a01a563813 fix some validation problems.
llvm-svn: 68026
2009-03-30 06:34:59 +00:00
Evan Cheng 471ed6e460 Forgot this test.
llvm-svn: 68025
2009-03-30 06:17:34 +00:00
John Mosby b92a76ff4f Clarify section on setting up and running test-suite
llvm-svn: 68023
2009-03-30 04:37:51 +00:00
Misha Brukman d326656d9c Updated the comment for isArithmeticShift() to match reality.
llvm-svn: 68016
2009-03-29 20:41:38 +00:00
Bill Wendling 8fde3036bf Constify check. This fixes PR3900.
llvm-svn: 68013
2009-03-29 20:08:56 +00:00
Anton Korobeynikov f3cf04f900 Testcase for recent ro/relocs stuff
llvm-svn: 68008
2009-03-29 17:14:57 +00:00
Anton Korobeynikov bea241a5f5 IA64 is as weird as Alpha wrt r/o relocs :)
llvm-svn: 68007
2009-03-29 17:14:35 +00:00
Anton Korobeynikov 014a86f216 Alpha always requires global relocations to be r/w regardless of PIC.
llvm-svn: 68006
2009-03-29 17:14:14 +00:00
Anton Korobeynikov 088ebede53 Honour relocation behaviour stuff for ro objects
llvm-svn: 68005
2009-03-29 17:13:49 +00:00
Anton Korobeynikov 7437b59caf Extend the relocation tracker handler, so we can filter on different 'kinds' of relocations required.
llvm-svn: 68004
2009-03-29 17:13:18 +00:00
Duncan Sands d21581eaa1 Fix PR3899: add support for extracting floats from vectors
when using -soft-float.
Based on a patch by Jakob Stoklund Olesen.

llvm-svn: 67996
2009-03-29 13:51:06 +00:00
Chris Lattner 6694cdf215 add missing space.
llvm-svn: 67995
2009-03-29 13:26:05 +00:00
Chris Lattner 5b52baeeef add some comments, add a dyn_cast method.
llvm-svn: 67992
2009-03-29 07:03:30 +00:00
Chris Lattner e50f47971b When forming sentinels for empty/tombstone, make sure to respect the
pointer's expected number of zero low-bits.

This should fix the breakage I introduced recently.

llvm-svn: 67990
2009-03-29 06:33:22 +00:00
Chris Lattner 3a6dc751ac add helper method.
llvm-svn: 67989
2009-03-29 06:32:46 +00:00
Chris Lattner a9c6de15fb Add a simple type-safe bit-mangling pointer union class. This allows
you to do things like:

  ///    PointerUnion<int*, float*> P;
  ///    P = (int*)0;
  ///    printf("%d %d", P.is<int*>(), P.is<float*>()); // prints "1 0"
  ///    X = P.get<int*>();     // ok.
  ///    Y = P.get<float*>();   // runtime assertion failure.
  ///    Z = P.get<double*>();  // does not compile.
  ///    P = (float*)0;
  ///    Y = P.get<float*>();   // ok.
  ///    X = P.get<int*>();     // runtime assertion failure.

llvm-svn: 67987
2009-03-29 06:06:02 +00:00
Chris Lattner 35c0232cb0 Allow a specific PointerIntPair instance to use a specific Pointer trait:
some pointer instances have properties that not all of a type have.

llvm-svn: 67986
2009-03-29 06:02:20 +00:00
Chris Lattner d4ff5fce81 Add a PointerLikeTypeTraits specialization for uintptr_t
llvm-svn: 67985
2009-03-29 06:00:21 +00:00
Chris Lattner 9bb25a192a Value* only has 2 bits free as well.
llvm-svn: 67984
2009-03-29 05:45:43 +00:00
Chris Lattner eb71b17705 Replace the PointerLikeTypeTraits::getNumLowBitsAvailable
function with a new NumLowBitsAvailable enum, which makes the
value available as an integer constant expression.

Add PointerLikeTypeTraits specializations for Instruction* and
Use** since they are only guaranteed 4-byte aligned.

Enhance PointerIntPair to know about (and enforce) the alignment
specified by PointerLikeTypeTraits.  This should allow things 
like PointerIntPair<PointerIntPair<void*, 1,bool>, 1, bool> 
because the inner one knows that 2 low bits are free.

llvm-svn: 67979
2009-03-29 04:32:37 +00:00
Chris Lattner a00f0d7e4c rename PointerLikeTypeInto to PointerLikeTypeTraits, add trait for
# low bits free, and move to its own header.

llvm-svn: 67973
2009-03-29 00:39:30 +00:00
Chris Lattner 8eda11bd9d now that you can put a PointerIntPair in a SmallPtrSet, remove some
hackish workarounds from memdep

llvm-svn: 67971
2009-03-29 00:24:04 +00:00
Chris Lattner dc2999b4df teach SmallPtrSet that PointerIntPair is "basically a pointer".
llvm-svn: 67970
2009-03-29 00:18:42 +00:00
Chris Lattner 356d974a93 add a note
llvm-svn: 67953
2009-03-28 19:26:55 +00:00
Rafael Espindola 1f11c3c36f Use array_lengthof
llvm-svn: 67950
2009-03-28 19:02:18 +00:00
Rafael Espindola 6ff3dabbb4 Have only one definition of X86AddrNumOperands.
llvm-svn: 67949
2009-03-28 18:55:31 +00:00