Misha Brukman [Fri, 1 May 2009 20:40:51 +0000 (20:40 +0000)]
HTML-escape '>' as '>' in sample C++ code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70569
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 1 May 2009 17:55:32 +0000 (17:55 +0000)]
Allow CONCAT_VECTORS nodes to be legal or have custom lowering for some targets.
Changes to take advantage of this will come later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70560
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 17:13:31 +0000 (17:13 +0000)]
Actually insert inserted instructions into the InsertedValues map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70557
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 17:08:34 +0000 (17:08 +0000)]
Add an accessor method to allow clients to test if a given expression
is associated with a SCEV expansion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70556
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 17:07:43 +0000 (17:07 +0000)]
Make RequiresTypeConversion canonicalize the types before calling the
target hooks canLosslesslyBitCastTo and isTruncateFree. This allows
targets to avoid worrying about handling all combinations of integer
and pointer types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70555
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 17:02:22 +0000 (17:02 +0000)]
When printing a SCEVUnknown with pointer type, don't print an
artificial "ptrtoint", as it tends to clutter up complicated
expressions. The cast operators now print both source and
destination types, which is usually sufficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70554
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 17:00:00 +0000 (17:00 +0000)]
Short-circuit inttoptr-ptrtoint constant expressions; these aren't
always folded by the regular constant folder because it doesn't have
TargetData information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70553
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 16:58:31 +0000 (16:58 +0000)]
Make SCEVExpander::addInsertedValue able to accept Values, not just
Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70552
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 16:56:32 +0000 (16:56 +0000)]
Minor whitespace fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70551
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 16:44:56 +0000 (16:44 +0000)]
Fix an 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70550
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 16:44:18 +0000 (16:44 +0000)]
When creating cast scevs, canonicalize the destination type. This
avoids duplicate scevs that differ only in type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70549
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 16:33:33 +0000 (16:33 +0000)]
Fix a compiler warning on hosts where uint64_t isn't unsigned long long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70548
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 16:29:14 +0000 (16:29 +0000)]
Fix some code to work if TargetLowering is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70546
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 1 May 2009 08:40:06 +0000 (08:40 +0000)]
Simplify more code and add timer stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70539
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 1 May 2009 08:35:12 +0000 (08:35 +0000)]
Simplify more code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70537
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Fri, 1 May 2009 08:33:47 +0000 (08:33 +0000)]
hasSCEV() was declared in ScalarEvolution.h, but never defined. This must have
gone lost during the pImpl conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70536
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 1 May 2009 08:32:14 +0000 (08:32 +0000)]
Simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70534
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 1 May 2009 08:25:13 +0000 (08:25 +0000)]
Fix whitespace. It was confusing me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70533
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 1 May 2009 01:47:55 +0000 (01:47 +0000)]
Lets install the manual page with install-clang! Radar
6838692
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70529
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 1 May 2009 01:03:49 +0000 (01:03 +0000)]
Code clean up. Bye bye PhysRegTracker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70524
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 30 Apr 2009 23:50:26 +0000 (23:50 +0000)]
Fix compilation for some targets other than x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70522
91177308-0d34-0410-b5e6-
96231b3b80d8
Stefanus Du Toit [Thu, 30 Apr 2009 23:28:50 +0000 (23:28 +0000)]
Add a comment to refer to the section of the programmer's manual that explains what the pointer tagging in Use is for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70521
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 30 Apr 2009 23:22:31 +0000 (23:22 +0000)]
Make DebugLoc independent of DwarfWriter.
-Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable*
-Remove DwarfWriter::getOrCreateSourceID
-Make necessary changes for the above (fix callsites, etc.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70520
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 30 Apr 2009 23:01:58 +0000 (23:01 +0000)]
Set FnEnd in JITEmitter::finishFunction to point strictly to the end of function's machine code.
Don't include memory allocated for global variables during relocations resolution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70517
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 30 Apr 2009 22:33:41 +0000 (22:33 +0000)]
Add a mention of TypeBuilder to the programmer's manual, and clean up the class
comment a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70515
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 30 Apr 2009 21:24:03 +0000 (21:24 +0000)]
Join cross class copies using getCommonSubClass()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70513
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 30 Apr 2009 21:23:32 +0000 (21:23 +0000)]
getCommonSubClass() - Calculate the largest common sub-class of two register
classes.
This is implemented as a function rather than a method on TargetRegisterClass
because it is symmetric in its arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70512
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 30 Apr 2009 21:22:44 +0000 (21:22 +0000)]
Slightly change TableGen's definition of a register subclass.
A subclass is allowed to have a larger spill size than the superclass, and the
spill alignment must be a multiple of the superclass alignment. This causes
the following new subclass relations:
=== Alpha ===
F4RC -> F8RC
=== PPC ===
F4RC -> F8RC
=== SPU ===
R8C -> R16C -> R32C/R32FP -> R64C/R64FP -> GPRC/VECREG
=== X86 ===
FR32 -> FR64 -> VR128
RFP32 -> RFP64 -> RFP80
These subclass relations are consistent with the behaviour of -join-cross-class-copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70511
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 30 Apr 2009 20:48:53 +0000 (20:48 +0000)]
Add some comments, and tidy up some whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70510
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 30 Apr 2009 20:47:05 +0000 (20:47 +0000)]
Extend ScalarEvolution's getBackedgeTakenCount to be able to
compute an upper-bound value for the trip count, in addition to
the actual trip count. Use this to allow getZeroExtendExpr and
getSignExtendExpr to fold casts in more cases.
This may eventually morph into a more general value-range
analysis capability; there are certainly plenty of places where
more complete value-range information would allow more folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70509
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 30 Apr 2009 18:39:57 +0000 (18:39 +0000)]
Add a smarter heuristic to determine when to coalesce a virtual register with a physical one. More specifically, it avoid tying a virtual register in the loop with a physical register defined / used outside the loop. When it determines it's not profitable, it will use the physical register as the allocation preference instead.
This is *not* turned on by default. Testing indicates this is just as likely to pessimize code. The main issue seems to be allocation preference doesn't work effectively. That will change once I've taught register allocator "swapping".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70503
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 30 Apr 2009 18:26:19 +0000 (18:26 +0000)]
Rename the CurMultiClass formal parameter of TGParser::AddSubMultiClass
so that it doesn't shadow the instance variable of the same name.
Make the parameter names in method declarations match the definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70502
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 30 Apr 2009 17:46:20 +0000 (17:46 +0000)]
Remove unnecessary "class" keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70499
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 30 Apr 2009 17:35:11 +0000 (17:35 +0000)]
Change forward declaration of MultiClass to use the "struct" keyword instead
of "class", so that it matches the subsequent definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70498
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 30 Apr 2009 17:09:22 +0000 (17:09 +0000)]
Make dataflow iteration possible on Value*, not only on User*: df_ext_iterator<Value*, SmallPtrSet<const Value*, 16> >
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70496
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 30 Apr 2009 16:40:30 +0000 (16:40 +0000)]
Don't try to mix integers and pointers in an icmp instruction
in getSCEVAtScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70495
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 30 Apr 2009 15:29:26 +0000 (15:29 +0000)]
Oops! Missed a file in my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70491
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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