oota-llvm.git
15 years agoMove getSubRegisterRegClass from ScheduleDagSDNodesEmit.cpp to a TargetRegisterClass...
Jakob Stoklund Olesen [Tue, 28 Apr 2009 16:34:09 +0000 (16:34 +0000)]
Move getSubRegisterRegClass from ScheduleDagSDNodesEmit.cpp to a TargetRegisterClass method.
Also make the method non-asserting. It will return NULL when given an invalid subreg index.

The method is needed by an upcoming patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70296 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4034. Bug in LiveInterval::join when it's compacting new valno's.
Evan Cheng [Tue, 28 Apr 2009 06:24:09 +0000 (06:24 +0000)]
Fix PR4034. Bug in LiveInterval::join when it's compacting new valno's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70291 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial test commit
Jakob Stoklund Olesen [Tue, 28 Apr 2009 06:15:00 +0000 (06:15 +0000)]
Initial test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70290 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for PR4051. When 2address pass delete an instruction, update kill info when neces...
Evan Cheng [Tue, 28 Apr 2009 02:12:36 +0000 (02:12 +0000)]
Fix for PR4051. When 2address pass delete an instruction, update kill info when necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70279 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agor70270 isn't ready yet. Back this out. Sorry for the noise.
Bill Wendling [Tue, 28 Apr 2009 01:04:53 +0000 (01:04 +0000)]
r70270 isn't ready yet. Back this out. Sorry for the noise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70275 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMassive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
Bill Wendling [Tue, 28 Apr 2009 00:21:31 +0000 (00:21 +0000)]
Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70270 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an obsolete comment.
Dan Gohman [Mon, 27 Apr 2009 22:12:34 +0000 (22:12 +0000)]
Remove an obsolete comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70262 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR 4086, a bug in FP IV elimination.
Dale Johannesen [Mon, 27 Apr 2009 21:03:15 +0000 (21:03 +0000)]
Fix PR 4086, a bug in FP IV elimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70247 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4076. Correctly create live interval of physical register with two-address...
Evan Cheng [Mon, 27 Apr 2009 20:42:46 +0000 (20:42 +0000)]
Fix PR4076. Correctly create live interval of physical register with two-address update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70245 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPermit ChangeCompareStride to rewrite a comparison when the factor
Dan Gohman [Mon, 27 Apr 2009 20:35:32 +0000 (20:35 +0000)]
Permit ChangeCompareStride to rewrite a comparison when the factor
between the comparison's iv stride and the candidate stride is
exactly -1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70244 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd tests for WeakVH and AssertingVH. These pointed out that the overloads for
Jeffrey Yasskin [Mon, 27 Apr 2009 20:32:07 +0000 (20:32 +0000)]
Add tests for WeakVH and AssertingVH.  These pointed out that the overloads for
the comparison operators were not only unnecessary in the presence of the
implicit conversion; they caused ambiguous overload errors. So I deleted them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70243 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach getZeroExtendExpr and getSignExtendExpr to use trip-count
Dan Gohman [Mon, 27 Apr 2009 20:16:15 +0000 (20:16 +0000)]
Teach getZeroExtendExpr and getSignExtendExpr to use trip-count
information to simplify [sz]ext({a,+,b}) to {zext(a),+,[zs]ext(b)},
as appropriate.

These functions and the trip count code each call into the other, so
this requires careful handling to avoid infinite recursion. During
the initial trip count computation, conservative SCEVs are used,
which are subsequently discarded once the trip count is actually
known.

Among other benefits, this change lets LSR automatically eliminate
some unnecessary zext-inreg and sext-inreg operation where the
operand is an induction variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70241 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agogive bitstreamreader an API to ignore names for blocks/records,
Chris Lattner [Mon, 27 Apr 2009 20:04:08 +0000 (20:04 +0000)]
give bitstreamreader an API to ignore names for blocks/records,
only llvm-bcanalyzer wants this info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70239 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't skip the CopyMI when removing kill markers.
Owen Anderson [Mon, 27 Apr 2009 19:55:47 +0000 (19:55 +0000)]
Don't skip the CopyMI when removing kill markers.
This should have no effect on generated code, but makes the intermediate state
of the coalescer more sane.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70238 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNow that PR2957 is resolved, remove a bunch of
Duncan Sands [Mon, 27 Apr 2009 19:33:03 +0000 (19:33 +0000)]
Now that PR2957 is resolved, remove a bunch of
no-longer needed workarounds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70234 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTest for (llvm-gcc) 70231.
Dale Johannesen [Mon, 27 Apr 2009 19:15:09 +0000 (19:15 +0000)]
Test for (llvm-gcc) 70231.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70233 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert accidental testcase reduction
Nate Begeman [Mon, 27 Apr 2009 18:42:40 +0000 (18:42 +0000)]
Revert accidental testcase reduction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70226 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.
Nate Begeman [Mon, 27 Apr 2009 18:41:29 +0000 (18:41 +0000)]
2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.

PR2957

ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
as the shuffle mask.  A value of -1 represents UNDEF.

In addition to eliminating the creation of illegal BUILD_VECTORS just to
represent shuffle masks, we are better about canonicalizing the shuffle mask,
resulting in substantially better code for some classes of shuffles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70225 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrint statistics for each record kind saying the number of bits
Chris Lattner [Mon, 27 Apr 2009 18:15:27 +0000 (18:15 +0000)]
Print statistics for each record kind saying the number of bits
and % abbreviated.  For example:

Record Histogram:
  Count    # Bits   % Abv  Record Kind
  25738   3424174  100.00  SM_SLOC_INSTANTIATION_ENTRY
    814    562079  100.00  SM_SLOC_FILE_ENTRY
    798     34110          SM_HEADER_FILE_INFO
      3     91104  100.00  SM_SLOC_BUFFER_BLOB
      3       498  100.00  SM_SLOC_BUFFER_ENTRY
      1       465          SM_LINE_TABLE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70215 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclean up the output of llvm-bcanalyzer by using printf
Chris Lattner [Mon, 27 Apr 2009 17:59:34 +0000 (17:59 +0000)]
clean up the output of llvm-bcanalyzer by using printf
instead of ostreams for formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70214 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4056. It's possible a physical register def is dead if its implicit use is...
Evan Cheng [Mon, 27 Apr 2009 17:36:47 +0000 (17:36 +0000)]
Fix PR4056. It's possible a physical register def is dead if its implicit use is deleted by two-address pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70213 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlso delete last unused val#.
Evan Cheng [Mon, 27 Apr 2009 17:35:19 +0000 (17:35 +0000)]
Also delete last unused val#.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70212 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename GR8_ABCD to GR8_ABCD_L and create GR8_ABCD_H, and use these
Dan Gohman [Mon, 27 Apr 2009 16:41:36 +0000 (16:41 +0000)]
Rename GR8_ABCD to GR8_ABCD_L and create GR8_ABCD_H, and use these
to precisely describe the h-register subreg register classes.
Thanks to Jakob Stoklund Olesen for spotting this and for the
initial patch!

Also, make getStoreRegOpcode and getLoadRegOpcode aware of the
needs of h registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70211 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename GR8_, GR16_, GR32_, and GR64_ to GR8_ABCD, GR16_ABCD,
Dan Gohman [Mon, 27 Apr 2009 16:33:14 +0000 (16:33 +0000)]
Rename GR8_, GR16_, GR32_, and GR64_ to GR8_ABCD, GR16_ABCD,
GR32_ABCD, and GR64_ABCD, respectively, to help describe them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70210 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBreak up long multi-mnemonic strings into separate lines for readability.
Dan Gohman [Mon, 27 Apr 2009 15:13:28 +0000 (15:13 +0000)]
Break up long multi-mnemonic strings into separate lines for readability.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70209 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the syntax for a PR number in a test.
Dan Gohman [Mon, 27 Apr 2009 15:08:34 +0000 (15:08 +0000)]
Fix the syntax for a PR number in a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70208 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some confusion in the Ada f-e build instructions between
Duncan Sands [Mon, 27 Apr 2009 11:21:35 +0000 (11:21 +0000)]
Fix some confusion in the Ada f-e build instructions between
building without optimization and building with checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70205 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevised 68749 to allow matching of load/stores for address spaces < 256.
Mon P Wang [Mon, 27 Apr 2009 07:22:10 +0000 (07:22 +0000)]
Revised 68749 to allow matching of load/stores for address spaces < 256.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70197 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnder unusual circumstances (jitting a function that causes the creation of
Nick Lewycky [Mon, 27 Apr 2009 05:09:44 +0000 (05:09 +0000)]
Under unusual circumstances (jitting a function that causes the creation of
another stub, but then never calling the jitted function) can cause the JIT to
leave a stub in place. Judging by the comments this is a known deficiency, so
we're just not going to use AssertingVH for the StubToFunctionTy map.

Also shorten some lines longer than 80 columns.

This fixes the "make check" failure with ocaml on x86-64 linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70185 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNow that any size of integer indices are allowed for sequential types, remove the...
Sanjiv Gupta [Mon, 27 Apr 2009 03:21:00 +0000 (03:21 +0000)]
Now that any size of integer indices are allowed for sequential types, remove the unneccessary gyan about promoting them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70181 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake this test slightly more strict.
Dan Gohman [Mon, 27 Apr 2009 03:05:26 +0000 (03:05 +0000)]
Make this test slightly more strict.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70180 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen transforming sext(trunc(load(x))) into sext(smaller load(x)),
Dan Gohman [Mon, 27 Apr 2009 02:00:55 +0000 (02:00 +0000)]
When transforming sext(trunc(load(x))) into sext(smaller load(x)),
the trunc is directly replaced with the smaller load, so don't
try to create a new sext node. This fixes PR4050.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70179 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle ands with ~0 correctly too. This fixes PR4052.
Dan Gohman [Mon, 27 Apr 2009 01:41:10 +0000 (01:41 +0000)]
Handle ands with ~0 correctly too. This fixes PR4052.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70176 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove bugpoint's error messages when it runs out of memory,
Dan Gohman [Mon, 27 Apr 2009 01:30:37 +0000 (01:30 +0000)]
Improve bugpoint's error messages when it runs out of memory,
or when some other std::exception is thrown.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70175 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd two new record types to the blockinfo block:
Chris Lattner [Sun, 26 Apr 2009 22:21:57 +0000 (22:21 +0000)]
Add two new record types to the blockinfo block:
BLOCKNAME and SETRECORDNAME.  This allows a bitcode
file to be self describing with pretty names for
records and blocks in addition to numbers.  This
enhances llvm-bcanalyzer to use this to print prettily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70165 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake BitstreamCursor's copyable and assignable.
Chris Lattner [Sun, 26 Apr 2009 21:07:02 +0000 (21:07 +0000)]
make BitstreamCursor's copyable and assignable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70159 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake a major API change to BitstreamReader: split all the reading
Chris Lattner [Sun, 26 Apr 2009 20:59:02 +0000 (20:59 +0000)]
Make a major API change to BitstreamReader: split all the reading
state out of the BitstreamReader class into a BitstreamCursor class.
Doing this allows the client to have multiple cursors into the same
file, each with potentially different live block stacks and
abbreviation records.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70157 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoI cast, therefore I think I know what I'm doing.
Bill Wendling [Sun, 26 Apr 2009 20:12:38 +0000 (20:12 +0000)]
I cast, therefore I think I know what I'm doing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70151 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse uint64_t instead of unsigned.
Bill Wendling [Sun, 26 Apr 2009 19:46:41 +0000 (19:46 +0000)]
Use uint64_t instead of unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70148 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorevert an incorrect patch. This causes crashes all over the place on a
Chris Lattner [Sun, 26 Apr 2009 19:44:20 +0000 (19:44 +0000)]
revert an incorrect patch.  This causes crashes all over the place on a
64-bit build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70147 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSuppress warnings about conversion shortening 64-bit to 32-bit.
Bill Wendling [Sun, 26 Apr 2009 18:10:20 +0000 (18:10 +0000)]
Suppress warnings about conversion shortening 64-bit to 32-bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70138 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAny size of integral indices are allowed in gep for indexing into sequential types...
Sanjiv Gupta [Sun, 26 Apr 2009 17:14:35 +0000 (17:14 +0000)]
Any size of integral indices are allowed in gep for indexing into sequential types. Also adding a test case to check the indices type allowed into struct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70134 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimprove documentation on build configurations, patch by
Chris Lattner [Sat, 25 Apr 2009 22:24:49 +0000 (22:24 +0000)]
improve documentation on build configurations, patch by
Josef Eisl!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70087 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd testcase for strange types of gep indices
Chris Lattner [Sat, 25 Apr 2009 22:20:49 +0000 (22:20 +0000)]
add testcase for strange types of gep indices

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70085 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a new TypeBuilder helper class, which eases making LLVM IR types.
Chris Lattner [Sat, 25 Apr 2009 22:14:04 +0000 (22:14 +0000)]
Add a new TypeBuilder helper class, which eases making LLVM IR types.
Patch by Jeffrey Yasskin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70084 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimprove documentation around memory lifetimes,
Chris Lattner [Sat, 25 Apr 2009 22:10:06 +0000 (22:10 +0000)]
improve documentation around memory lifetimes,
patch by Jeffrey Yasskin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70083 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoaDd support for building a subset of the llvm tools, patch by Jeffrey Yasskin!
Chris Lattner [Sat, 25 Apr 2009 22:08:52 +0000 (22:08 +0000)]
aDd support for building a subset of the llvm tools, patch by Jeffrey Yasskin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70082 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotestcase and asmparser fix for PR4066
Chris Lattner [Sat, 25 Apr 2009 21:26:00 +0000 (21:26 +0000)]
testcase and asmparser fix for PR4066

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70080 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow aliasee to be a GEP or bitcast instead of just a bitcast.
Chris Lattner [Sat, 25 Apr 2009 21:23:19 +0000 (21:23 +0000)]
Allow aliasee to be a GEP or bitcast instead of just a bitcast.
The real fix for this whole mess is to require the operand of the
alias to be a *GlobalValue* (not a general constant, including
constant exprs) but allow the operand and the alias type to be
unrelated.

This fixes PR4066

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70079 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate docs to not mention gcse/loadvn and mention memdep and
Chris Lattner [Sat, 25 Apr 2009 21:11:37 +0000 (21:11 +0000)]
Update docs to not mention gcse/loadvn and mention memdep and
new stuff.  PR3924.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70077 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse intptr_t.
Bill Wendling [Sat, 25 Apr 2009 21:06:53 +0000 (21:06 +0000)]
Use intptr_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70076 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosize() should return a size_t; avoids a warning for 64 bit machines.
Mon P Wang [Sat, 25 Apr 2009 20:46:59 +0000 (20:46 +0000)]
size() should return a size_t; avoids a warning for 64 bit machines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70072 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReuse unused val#'s to avoid running out of memory in extreme cases.
Evan Cheng [Sat, 25 Apr 2009 20:20:15 +0000 (20:20 +0000)]
Reuse unused val#'s to avoid running out of memory in extreme cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70069 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDenseMap.h needs <new> because it explicitly calls operator new/delete.
Chris Lattner [Sat, 25 Apr 2009 19:50:14 +0000 (19:50 +0000)]
DenseMap.h needs <new> because it explicitly calls operator new/delete.
Patch by John McCall!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70068 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4040: APInt's string constructor is too strict
Chris Lattner [Sat, 25 Apr 2009 18:34:04 +0000 (18:34 +0000)]
Fix PR4040: APInt's string constructor is too strict
patch by Jeff Yasskin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70058 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd support for detecting process features on win64, patch by
Chris Lattner [Sat, 25 Apr 2009 18:27:23 +0000 (18:27 +0000)]
add support for detecting process features on win64, patch by
Nicolas Capens!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70057 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefactor the code to grab the low and high parts of a value
Dan Gohman [Sat, 25 Apr 2009 17:55:53 +0000 (17:55 +0000)]
Refactor the code to grab the low and high parts of a value
using EXTRACT_ELEMENT into a utility function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70056 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReturn null instead of false, as appropriate.
Dan Gohman [Sat, 25 Apr 2009 17:28:45 +0000 (17:28 +0000)]
Return null instead of false, as appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70054 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd several more icmp simplifications. Transform signed comparisons
Dan Gohman [Sat, 25 Apr 2009 17:12:48 +0000 (17:12 +0000)]
Add several more icmp simplifications. Transform signed comparisons
into unsigned ones when the operands are known to have the same
sign bit value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70053 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a top-level comment about DAGCombiner's role in the compiler.
Dan Gohman [Sat, 25 Apr 2009 17:09:45 +0000 (17:09 +0000)]
Add a top-level comment about DAGCombiner's role in the compiler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70052 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle ands with 0 and shifts by 0 correctly. These aren't
Dan Gohman [Sat, 25 Apr 2009 17:05:40 +0000 (17:05 +0000)]
Handle ands with 0 and shifts by 0 correctly. These aren't
common, but indvars shouldn't crash on them. This fixes PR4054.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70051 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:
Torok Edwin [Sat, 25 Apr 2009 10:25:12 +0000 (10:25 +0000)]
Fix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:
Path.cpp:59: warning: case label value exceeds maximum value for type
magic[0] is a (signed) char, but some case values are unsigned (e.g. 0xde).
When magic[0] was 0xde, the switch has taken the default branch instead of case
0xde branch.
Apparently this was the behaviour with older versions of gcc too, but not with g++.
Now g++-4.4 behaves as gcc, and ignores unsigned case values out of range signed
range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70038 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not share a single unknown val# for all the live ranges merged into a physical...
Evan Cheng [Sat, 25 Apr 2009 09:25:19 +0000 (09:25 +0000)]
Do not share a single unknown val# for all the live ranges merged into a physical sub-register live interval. When coalescer is merging in clobbered virtaul register live interval into a physical register live interval, give each virtual register val# a separate val# in the physical register live interval. Otherwise, the coalescer would have lost track of the definitions   information it needs to make correct coalescing decisions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70026 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed the gep example for i16 type indices.
Sanjiv Gupta [Sat, 25 Apr 2009 07:27:44 +0000 (07:27 +0000)]
Fixed the gep example for i16 type indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70019 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange LowerCallResult method so that CCValAssign::BCvt can be used with
Bob Wilson [Sat, 25 Apr 2009 00:33:20 +0000 (00:33 +0000)]
Change LowerCallResult method so that CCValAssign::BCvt can be used with
f64 types.  This is not used for anything yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70006 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR 4057, a crash doing float->char const folding.
Dale Johannesen [Fri, 24 Apr 2009 21:34:13 +0000 (21:34 +0000)]
Fix PR 4057, a crash doing float->char const folding.
This particular one is undefined behavior (although this
isn't related to the crash), so it will no longer do it
at compile time, which seems better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69990 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdjust a comment to reflect what the code does. Splitting a 64-bit argument
Bob Wilson [Fri, 24 Apr 2009 17:05:01 +0000 (17:05 +0000)]
Adjust a comment to reflect what the code does.  Splitting a 64-bit argument
between registers and the stack may be required with the APCS ABI, but it
isn't tied to using a particular version of the ARM architecture.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69978 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix up some problems with getCopyToReg and getCopyFromReg nodes being
Bob Wilson [Fri, 24 Apr 2009 17:00:36 +0000 (17:00 +0000)]
Fix up some problems with getCopyToReg and getCopyFromReg nodes being
chained and "flagged" together.  I also made a few changes to handle the
chain and flag values more consistently.  I found these problems by
inspection so I'm not aware of anything that breaks because of them
(thus no testcase).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69977 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse a bigger hammer to coerce subversion into english.
Gabor Greif [Fri, 24 Apr 2009 17:00:03 +0000 (17:00 +0000)]
Use a bigger hammer to coerce subversion into english.
Patch by Benjamin Kramer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69976 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix multiclass inheritance to limit value resolution to new defs added
David Greene [Fri, 24 Apr 2009 16:55:41 +0000 (16:55 +0000)]
Fix multiclass inheritance to limit value resolution to new defs added
by base multiclasses.  Do not attempt to alter defs from previous base
multiclasses.  This fixes multiple multiclass inheritance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69974 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unnecessary references to f32 types. After specifying that f32
Bob Wilson [Fri, 24 Apr 2009 16:55:25 +0000 (16:55 +0000)]
Remove unnecessary references to f32 types.  After specifying that f32
should be bit-converted to i32, it is sufficient to list only i32 in
subsequent definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69973 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
Rafael Espindola [Fri, 24 Apr 2009 16:55:21 +0000 (16:55 +0000)]
Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69972 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed spaces and the getelementpointer example with i16 type indices.
Sanjiv Gupta [Fri, 24 Apr 2009 16:38:13 +0000 (16:38 +0000)]
Fixed spaces and the getelementpointer example with i16 type indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69971 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR 4004 by including the call to __tls_get_addr in X86tlsaddr. This is not
Rafael Espindola [Fri, 24 Apr 2009 12:59:40 +0000 (12:59 +0000)]
Fix PR 4004 by including the call to __tls_get_addr in X86tlsaddr. This is not
very elegant, but neither is the tls specification :-(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69968 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 69952. Causes testsuite failures on linux x86-64.
Rafael Espindola [Fri, 24 Apr 2009 12:40:33 +0000 (12:40 +0000)]
Revert 69952. Causes testsuite failures on linux x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69967 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a typo noticed by duncan
Chris Lattner [Fri, 24 Apr 2009 06:37:12 +0000 (06:37 +0000)]
fix a typo noticed by duncan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69962 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago"I got annoyed at the compiler warnings from ConstantInt::get(Ty, -1,
Chris Lattner [Fri, 24 Apr 2009 05:30:14 +0000 (05:30 +0000)]
"I got annoyed at the compiler warnings from ConstantInt::get(Ty, -1,
true), and casts make me nervous and are verbose anyway, so here's a
ConstantInt::getSigned(Ty, int64_t) method. Just overloading
ConstantInt::get() to take an int64_t too would cause ambiguous
overload errors."

Patch by Jeffrey Yasskin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69958 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR2957
Nate Begeman [Fri, 24 Apr 2009 03:42:54 +0000 (03:42 +0000)]
PR2957

ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
as the shuffle mask.  A value of -1 represents UNDEF.

In addition to eliminating the creation of illegal BUILD_VECTORS just to
represent shuffle masks, we are better about canonicalizing the shuffle mask,
resulting in substantially better code for some classes of shuffles.

A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69952 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInstead of requiring TLI.LowerCallTo to return an ISD::BUILD_PAIR,
Dan Gohman [Fri, 24 Apr 2009 02:40:23 +0000 (02:40 +0000)]
Instead of requiring TLI.LowerCallTo to return an ISD::BUILD_PAIR,
use ISD::EXTRACT_ELEMENT. SelectionDAG has a special fast-path for
the cast of an EXTRACT_ELEMENT with a BUILD_PAIR operand, for the
common case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69948 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow i16 type indices to gep.
Sanjiv Gupta [Fri, 24 Apr 2009 02:37:54 +0000 (02:37 +0000)]
Allow i16 type indices to gep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69946 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out a bit of code that appears in several places into a
Dan Gohman [Thu, 23 Apr 2009 23:13:24 +0000 (23:13 +0000)]
Factor out a bit of code that appears in several places into a
utility function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69937 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle Void types in ComputeValueVTs. This doesn't currently occur,
Dan Gohman [Thu, 23 Apr 2009 22:50:03 +0000 (22:50 +0000)]
Handle Void types in ComputeValueVTs. This doesn't currently occur,
but this change makes the code more general and easier to adapt for
new purposes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69935 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix spurious indentation in a comment.
Dan Gohman [Thu, 23 Apr 2009 22:41:05 +0000 (22:41 +0000)]
Fix spurious indentation in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69934 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a documentation bug.
David Greene [Thu, 23 Apr 2009 21:27:58 +0000 (21:27 +0000)]
Fix a documentation bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69923 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake BinOps typed and require a type specifier for !nameconcat. This
David Greene [Thu, 23 Apr 2009 21:25:15 +0000 (21:25 +0000)]
Make BinOps typed and require a type specifier for !nameconcat.  This
allows binops to be used in typed contexts such as when passing
arguments to classes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69921 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate comments.
Evan Cheng [Thu, 23 Apr 2009 20:39:31 +0000 (20:39 +0000)]
Update comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69919 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an obvious type.
Evan Cheng [Thu, 23 Apr 2009 20:18:13 +0000 (20:18 +0000)]
Fix an obvious type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69918 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExplicitly pass -tailcallopt=false to these tests so that they
Dan Gohman [Thu, 23 Apr 2009 19:39:41 +0000 (19:39 +0000)]
Explicitly pass -tailcallopt=false to these tests so that they
work as intended no matter what the default setting of that
option is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69911 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for 69795.
Dale Johannesen [Thu, 23 Apr 2009 18:04:04 +0000 (18:04 +0000)]
Testcase for 69795.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69901 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an error in this test.
Dan Gohman [Thu, 23 Apr 2009 15:22:28 +0000 (15:22 +0000)]
Fix an error in this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69893 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange SCEVExpander's expandCodeFor to provide more flexibility
Dan Gohman [Thu, 23 Apr 2009 15:16:49 +0000 (15:16 +0000)]
Change SCEVExpander's expandCodeFor to provide more flexibility
with the persistent insertion point, and change IndVars to make
use of it. This fixes a bug where IndVars was holding on to a
stale insertion point and forcing the SCEVExpander to continue to
use it.

This fixes PR4038.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69892 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBanksel immediate constant will always immediately follow the GA/ES, so scan an insn...
Sanjiv Gupta [Thu, 23 Apr 2009 10:34:58 +0000 (10:34 +0000)]
Banksel immediate constant will always immediately follow the GA/ES, so scan an insn from beginnin to find out the banksel operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69883 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify trunc(extend(x)) in SCEVs, just for completeness. Also fix some odd
Nick Lewycky [Thu, 23 Apr 2009 05:15:08 +0000 (05:15 +0000)]
Simplify trunc(extend(x)) in SCEVs, just for completeness. Also fix some odd
whitespace in the same file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69870 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for PR3909.
Owen Anderson [Thu, 23 Apr 2009 04:33:42 +0000 (04:33 +0000)]
Testcase for PR3909.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69868 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for PR2639.
Owen Anderson [Thu, 23 Apr 2009 04:30:52 +0000 (04:30 +0000)]
Testcase for PR2639.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69867 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for PR2537.
Owen Anderson [Thu, 23 Apr 2009 04:26:42 +0000 (04:26 +0000)]
Testcase for PR2537.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69866 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix typo.
Owen Anderson [Thu, 23 Apr 2009 04:24:19 +0000 (04:24 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69865 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for PR3085.
Owen Anderson [Thu, 23 Apr 2009 04:21:14 +0000 (04:21 +0000)]
Testcase for PR3085.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69863 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd testcase from PR3086.
Owen Anderson [Thu, 23 Apr 2009 04:14:03 +0000 (04:14 +0000)]
Add testcase from PR3086.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69862 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for printing MO_ExternalSymbol operands in
Dan Gohman [Thu, 23 Apr 2009 00:57:37 +0000 (00:57 +0000)]
Add support for printing MO_ExternalSymbol operands in
memory operand tuples. This doesn't ever come up in normal
code however.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69848 91177308-0d34-0410-b5e6-96231b3b80d8