oota-llvm.git
15 years agoAllow a user of libLTO to specify the full pathname of the gcc executable to
Nick Lewycky [Thu, 30 Apr 2009 15:24:09 +0000 (15:24 +0000)]
Allow a user of libLTO to specify the full pathname of the gcc executable to
run when assembling.

Wire this up to the gold plugin. You can now pass --plugin-opt gcc=/foo/bar/gcc
and it will run that gcc instead of looking for it on the path.

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

15 years agoMove helper functions for optimizing division by constant into the APInt
Jay Foad [Thu, 30 Apr 2009 10:15:35 +0000 (10:15 +0000)]
Move helper functions for optimizing division by constant into the APInt
class.

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

15 years agoSet mayLoad on MOVZX32_NOREXrm8 too.
Dan Gohman [Thu, 30 Apr 2009 03:11:48 +0000 (03:11 +0000)]
Set mayLoad on MOVZX32_NOREXrm8 too.

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

15 years agoFix ScalarEvolution::print to print a value for any Instruction with
Dan Gohman [Thu, 30 Apr 2009 01:30:18 +0000 (01:30 +0000)]
Fix ScalarEvolution::print to print a value for any Instruction with
a SCEVable type, not just integer types.

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

15 years agoMark MOV8mr_NOREX and MOV8rm_NOREX as mayStore / mayLoad respectively.
Evan Cheng [Thu, 30 Apr 2009 00:58:57 +0000 (00:58 +0000)]
Mark MOV8mr_NOREX and MOV8rm_NOREX as mayStore / mayLoad respectively.

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

15 years agoRemove unused flags.
Bill Wendling [Thu, 30 Apr 2009 00:57:51 +0000 (00:57 +0000)]
Remove unused flags.

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

15 years agofix a regression handling indirect results: these need to be considered
Chris Lattner [Thu, 30 Apr 2009 00:48:50 +0000 (00:48 +0000)]
fix a regression handling indirect results: these need to be considered
memory operands otherwise the writebacks get lost when the inline asm
doesn't otherwise have side effects.  This fixes rdar://6839427, though
clang really shouldn't generate these anymore.

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

15 years agoFix the JIT bindings for ocaml.
Bill Wendling [Thu, 30 Apr 2009 00:43:39 +0000 (00:43 +0000)]
Fix the JIT bindings for ocaml.

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

15 years agoremove progname which is never set. PR4085
Chris Lattner [Thu, 30 Apr 2009 00:24:33 +0000 (00:24 +0000)]
remove progname which is never set. PR4085

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

15 years agoError out with bad optimization level specified.
Bill Wendling [Wed, 29 Apr 2009 23:46:43 +0000 (23:46 +0000)]
Error out with bad optimization level specified.

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

15 years agoRemove LTO optimization level.
Bill Wendling [Wed, 29 Apr 2009 23:40:42 +0000 (23:40 +0000)]
Remove LTO optimization level.

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

15 years agoInstead of passing in an unsigned value for the optimization level, use an enum,
Bill Wendling [Wed, 29 Apr 2009 23:29:43 +0000 (23:29 +0000)]
Instead of passing in an unsigned value for the optimization level, use an enum,
which better identifies what the optimization is doing. And is more flexible for
future uses.

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

15 years agoAdd support for a character after a command line option. Like '-Os'.
Bill Wendling [Wed, 29 Apr 2009 23:26:16 +0000 (23:26 +0000)]
Add support for a character after a command line option. Like '-Os'.

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

15 years agoPrint correct instruction in dump.
Dale Johannesen [Wed, 29 Apr 2009 22:57:20 +0000 (22:57 +0000)]
Print correct instruction in dump.

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

15 years agoFix infinite recursion in the C++ code which handles movddup by making it unnecessary.
Nate Begeman [Wed, 29 Apr 2009 22:47:44 +0000 (22:47 +0000)]
Fix infinite recursion in the C++ code which handles movddup by making it unnecessary.

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

15 years agoImplement getSCEVAtScope for SCEV cast expressions.
Dan Gohman [Wed, 29 Apr 2009 22:29:01 +0000 (22:29 +0000)]
Implement getSCEVAtScope for SCEV cast expressions.

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

15 years agoGeneralize the cast-of-addrec folding to handle folding of SCEVs like
Dan Gohman [Wed, 29 Apr 2009 22:28:28 +0000 (22:28 +0000)]
Generalize the cast-of-addrec folding to handle folding of SCEVs like
(sext i8 {-128,+,1} to i64) to i64 {-128,+,1}, where the iteration
crosses from negative to positive, but is still safe if the trip
count is within range.

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

15 years agoReword and tidy up some comments.
Dan Gohman [Wed, 29 Apr 2009 22:01:05 +0000 (22:01 +0000)]
Reword and tidy up some comments.

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

15 years agoDon't use 'false' for 'fast isel' here.
Bill Wendling [Wed, 29 Apr 2009 21:22:00 +0000 (21:22 +0000)]
Don't use 'false' for 'fast isel' here.

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

15 years agoFix this test to match the new output from scalar-evolution.
Dan Gohman [Wed, 29 Apr 2009 21:06:20 +0000 (21:06 +0000)]
Fix this test to match the new output from scalar-evolution.

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

15 years agoMachineInstr::isRegTiedTo{Use,Def}Operand can safely be made const.
Jakob Stoklund Olesen [Wed, 29 Apr 2009 20:57:16 +0000 (20:57 +0000)]
MachineInstr::isRegTiedTo{Use,Def}Operand can safely be made const.

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

15 years agoInclude the source type in SCEV cast expression debug output, and
Dan Gohman [Wed, 29 Apr 2009 20:27:52 +0000 (20:27 +0000)]
Include the source type in SCEV cast expression debug output, and
print sext, zext, and trunc, instead of signextend, zeroextend,
and truncate, respectively, for consistency with the main IR.

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

15 years agoUpdate comment, replace theoretically impossible check with an assert.
Nate Begeman [Wed, 29 Apr 2009 18:13:31 +0000 (18:13 +0000)]
Update comment, replace theoretically impossible check with an assert.

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

15 years agoFix recent regression in gcc.dg/pr26719.c (6835035).
Dale Johannesen [Wed, 29 Apr 2009 16:38:47 +0000 (16:38 +0000)]
Fix recent regression in gcc.dg/pr26719.c (6835035).

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

15 years agoAdd directive to declare external globals.
Sanjiv Gupta [Wed, 29 Apr 2009 08:23:18 +0000 (08:23 +0000)]
Add directive to declare external globals.

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

15 years agospillPhysRegAroundRegDefsUses() may have invalidated iterators stored in fixed_ Inter...
Evan Cheng [Wed, 29 Apr 2009 07:16:34 +0000 (07:16 +0000)]
spillPhysRegAroundRegDefsUses() may have invalidated iterators stored in fixed_ IntervalPtrs. Reset them.

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

15 years agotestcase for PR4082
Chris Lattner [Wed, 29 Apr 2009 06:46:27 +0000 (06:46 +0000)]
testcase for PR4082

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

15 years agoImplement review feedback for vector shuffle work.
Nate Begeman [Wed, 29 Apr 2009 05:20:52 +0000 (05:20 +0000)]
Implement review feedback for vector shuffle work.

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

15 years agoAdd a public method called getAddressSpace() to the GlobalAddressSDNode.
Sanjiv Gupta [Wed, 29 Apr 2009 04:43:24 +0000 (04:43 +0000)]
Add a public method called getAddressSpace() to the GlobalAddressSDNode.

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

15 years agoDisable the load-shrinking optimization from looking at
Chris Lattner [Wed, 29 Apr 2009 03:45:07 +0000 (03:45 +0000)]
Disable the load-shrinking optimization from looking at
anything larger than 64-bits, avoiding a crash.  This should
really be fixed to use APInts, though type legalization happens
to help us out and we get good code on the attached testcase at
least.

This fixes rdar://6836460

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

15 years agoUpdate comments to reflect the current code.
Dan Gohman [Wed, 29 Apr 2009 01:54:20 +0000 (01:54 +0000)]
Update comments to reflect the current code.

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

15 years agoAdd some more doxygen comments to SCEVAddRec.
Dan Gohman [Wed, 29 Apr 2009 00:59:03 +0000 (00:59 +0000)]
Add some more doxygen comments to SCEVAddRec.

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

15 years agoDetermine allocation 'preference' with right register class. I haven't seen this...
Evan Cheng [Wed, 29 Apr 2009 00:42:27 +0000 (00:42 +0000)]
Determine allocation 'preference' with right register class. I haven't seen this changing codegen so no test case.

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

15 years agoThe second part of the change from -fast to -O#. This changes the JIT to accept
Bill Wendling [Wed, 29 Apr 2009 00:32:19 +0000 (00:32 +0000)]
The second part of the change from -fast to -O#. This changes the JIT to accept
an optimization level instead of a simple boolean telling it to generate code
"fast" or the other type of "fast".

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

15 years agoSecond attempt:
Bill Wendling [Wed, 29 Apr 2009 00:15:41 +0000 (00:15 +0000)]
Second attempt:

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'll change the JIT with a follow-up patch.

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

15 years agoCorrect comment.
Bill Wendling [Wed, 29 Apr 2009 00:09:22 +0000 (00:09 +0000)]
Correct comment.

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

15 years agoAs with r70333, give the primary induction variable a use so
Dan Gohman [Tue, 28 Apr 2009 22:05:13 +0000 (22:05 +0000)]
As with r70333, give the primary induction variable a use so
that it can't be trivially eliminated.

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

15 years agoMake this testcase slightly less trivial, so that it doesn't fail
Dan Gohman [Tue, 28 Apr 2009 22:03:26 +0000 (22:03 +0000)]
Make this testcase slightly less trivial, so that it doesn't fail
if indvars happens to optimize away the unused primary induction
variable.

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

15 years agoFix a grammaro in a comment.
Dan Gohman [Tue, 28 Apr 2009 21:54:23 +0000 (21:54 +0000)]
Fix a grammaro in a comment.

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

15 years agoProperly print 'P' modifier on inline asm memory operands.
Anton Korobeynikov [Tue, 28 Apr 2009 21:49:33 +0000 (21:49 +0000)]
Properly print 'P' modifier on inline asm memory operands.
This should fix PR3379 and PR4064.
Patch inspired by Edwin Török!

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

15 years agoFix trailing whitespace and 80-col. violations in recent TableGen changes.
Bob Wilson [Tue, 28 Apr 2009 19:41:44 +0000 (19:41 +0000)]
Fix trailing whitespace and 80-col. violations in recent TableGen changes.

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

15 years agoMove getMatchingSuperReg() out of coalescer and into TargetRegisterInfo.
Evan Cheng [Tue, 28 Apr 2009 18:29:27 +0000 (18:29 +0000)]
Move getMatchingSuperReg() out of coalescer and into TargetRegisterInfo.

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

15 years agoTest for llvm-gcc bug fixed by 70301.
Dale Johannesen [Tue, 28 Apr 2009 17:16:30 +0000 (17:16 +0000)]
Test for llvm-gcc bug fixed by 70301.

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

15 years agoGlobalValue is always pointer type, so an assert isn't required.
Sanjiv Gupta [Tue, 28 Apr 2009 16:39:45 +0000 (16:39 +0000)]
GlobalValue is always pointer type, so an assert isn't required.

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

15 years agoFix choice of version of Windows callback to use to consider not only the Visual...
Stefanus Du Toit [Tue, 28 Apr 2009 16:37:58 +0000 (16:37 +0000)]
Fix choice of version of Windows callback to use to consider not only the Visual Studio version, but also the Windows SDK version.

Patch by Tareq Siraj.

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

15 years agoDon't coalesce a physical register with an incompatible virtual register.
Jakob Stoklund Olesen [Tue, 28 Apr 2009 16:34:35 +0000 (16:34 +0000)]
Don't coalesce a physical register with an incompatible virtual register.

If the physical register does not belong to the virtual register's regclass,
don't coalesce. The physical register could be an invalid operand for an
instruction using the vreg.

The regclass matching is done after determining the actual subregisters being copied.

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

15 years agoInitialized arrays can be in any address space.
Sanjiv Gupta [Tue, 28 Apr 2009 16:34:20 +0000 (16:34 +0000)]
Initialized arrays can be in any address space.

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

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