Dan Gohman [Sun, 3 May 2009 05:46:20 +0000 (05:46 +0000)]
Revert r70645 for now; it's causing a variety of regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70661
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 3 May 2009 03:49:08 +0000 (03:49 +0000)]
Revert r70630. Go back to appending ".b" to internal globals when shrinking
them to bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70653
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 21:20:51 +0000 (21:20 +0000)]
Add an svn:ignore for unittests/VMCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70646
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 21:19:20 +0000 (21:19 +0000)]
Convert ScalarEvolution to use CallbackVH for its internal map. This
makes ScalarEvolution::deleteValueFromRecords, and it's code that
subtly needed to be called before ReplaceAllUsesWith, unnecessary.
It also makes ValueDeletionListener unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70645
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 21:10:48 +0000 (21:10 +0000)]
Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from me
to make the copy constructor and destructor protected, and corresponding
adjustments to the unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70644
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 21:03:21 +0000 (21:03 +0000)]
Include <limits.h> to get the definition of CHAR_BIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70643
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 20:22:10 +0000 (20:22 +0000)]
The second argument to RecursivelyDeleteTriviallyDeadInstructions has
a default value, and will hopefully be going away soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70642
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 18:29:22 +0000 (18:29 +0000)]
Previously, RecursivelyDeleteDeadInstructions provided an option
of returning a list of pointers to Values that are deleted. This was
unsafe, because the pointers in the list are, by nature of what
RecursivelyDeleteDeadInstructions does, always dangling. Replace this
with a simple callback mechanism. This may eventually be removed if
all clients can reasonably be expected to use CallbackVH.
Use this to factor out the dead-phi-cycle-elimination code from LSR
utility function, and generalize it to use the
RecursivelyDeleteTriviallyDeadInstructions utility function.
This makes LSR more aggressive about eliminating dead PHI cycles;
adjust tests to either be less trivial or to simply expect fewer
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70636
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 17:43:35 +0000 (17:43 +0000)]
When ScalarEvolution is told to forget the trip count for a loop, have
it also forget any SCEVs associated with loop-header PHIs in the loop,
as they may be dependent on trip count information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70633
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 17:29:26 +0000 (17:29 +0000)]
Tell ScalarEvolution that the loop is being deleted before actually
deleting it. This will let ScalarEvolution be more complete about
updating its records.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70632
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 2 May 2009 16:21:50 +0000 (16:21 +0000)]
Don't append ".b" to the names of globals that are being shrunk to booleans.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70630
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 05:36:01 +0000 (05:36 +0000)]
Don't split critical edges during the AddUsersIfInteresting phase
of LSR. This makes the AddUsersIfInteresting phase of LSR a pure
analysis instead of a phase that potentially does CFG modifications.
The conditions where this code would actually perform a split are
rare, and in the cases where it actually would do a split the split
is usually undone by CodeGenPrepare, and in cases where splits
actually survive into codegen, they appear to hurt more often than
they help.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70625
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 2 May 2009 01:29:12 +0000 (01:29 +0000)]
Add Base.td to svn:ignore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70619
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 May 2009 23:54:26 +0000 (23:54 +0000)]
'The attached patch fixes an issue where llc -march=cpp fails with
"Invalid primitive type" on input containing the x86_fp80 type.'
Patch by Collin Winter!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70610
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 May 2009 23:48:33 +0000 (23:48 +0000)]
Drop the default assumption about alignment down to 2 bits from 3. This apparently
helps some problems on win32 platforms (PR4119)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70603
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 1 May 2009 21:58:05 +0000 (21:58 +0000)]
Change the description string of the LoopInfo pass.
"Construction" makes it sound like a pass that might
modify the CFG to construct natural loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70580
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Fri, 1 May 2009 20:47:53 +0000 (20:47 +0000)]
Prevent looping when DenseSet is abused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70572
91177308-0d34-0410-b5e6-
96231b3b80d8
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