oota-llvm.git
15 years agoReverse order of memory arguments
Anton Korobeynikov [Sun, 3 May 2009 13:09:40 +0000 (13:09 +0000)]
Reverse order of memory arguments

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

15 years agoRemove bogus pattern
Anton Korobeynikov [Sun, 3 May 2009 13:09:24 +0000 (13:09 +0000)]
Remove bogus pattern

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

15 years agoCorrect asmprinting of memory operands
Anton Korobeynikov [Sun, 3 May 2009 13:09:10 +0000 (13:09 +0000)]
Correct asmprinting of memory operands

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

15 years agoMatch wrapper node for address
Anton Korobeynikov [Sun, 3 May 2009 13:08:51 +0000 (13:08 +0000)]
Match wrapper node for address

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

15 years agoAdd lowering for global address nodes. Not pretty efficient though.
Anton Korobeynikov [Sun, 3 May 2009 13:08:33 +0000 (13:08 +0000)]
Add lowering for global address nodes. Not pretty efficient though.

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

15 years agoSome early full call lowering draft for direct calls
Anton Korobeynikov [Sun, 3 May 2009 13:08:13 +0000 (13:08 +0000)]
Some early full call lowering draft for direct calls

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

15 years agoAdd call frame setup instruction elimination and lowerid for bunch of call-related...
Anton Korobeynikov [Sun, 3 May 2009 13:07:54 +0000 (13:07 +0000)]
Add call frame setup instruction elimination and lowerid for bunch of call-related stuff.

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

15 years agoAdd CALL lowering.
Anton Korobeynikov [Sun, 3 May 2009 13:07:31 +0000 (13:07 +0000)]
Add CALL lowering.

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

15 years agoAdd bunch of mem-whatever patterns
Anton Korobeynikov [Sun, 3 May 2009 13:07:10 +0000 (13:07 +0000)]
Add bunch of mem-whatever patterns

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

15 years agoAdd bunch of reg-mem inst patterns
Anton Korobeynikov [Sun, 3 May 2009 13:06:46 +0000 (13:06 +0000)]
Add bunch of reg-mem inst patterns

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

15 years agoAdd normal and trunc stores
Anton Korobeynikov [Sun, 3 May 2009 13:06:26 +0000 (13:06 +0000)]
Add normal and trunc stores

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

15 years agoBasic support for mem=>reg moves
Anton Korobeynikov [Sun, 3 May 2009 13:06:03 +0000 (13:06 +0000)]
Basic support for mem=>reg moves

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

15 years agoAdd 8-bit insts. zext behaviour is not modelled yet
Anton Korobeynikov [Sun, 3 May 2009 13:05:42 +0000 (13:05 +0000)]
Add 8-bit insts. zext behaviour is not modelled yet

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

15 years agoAdd 8-bit regclass and pattern for sext_inreg
Anton Korobeynikov [Sun, 3 May 2009 13:05:22 +0000 (13:05 +0000)]
Add 8-bit regclass and pattern for sext_inreg

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

15 years agoAdd pattern for OR
Anton Korobeynikov [Sun, 3 May 2009 13:05:00 +0000 (13:05 +0000)]
Add pattern for OR

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

15 years agoAdd reg-imm variants
Anton Korobeynikov [Sun, 3 May 2009 13:04:41 +0000 (13:04 +0000)]
Add reg-imm variants

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

15 years agoAdd hint to nop
Anton Korobeynikov [Sun, 3 May 2009 13:04:23 +0000 (13:04 +0000)]
Add hint to nop

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

15 years agoAdd more instructions
Anton Korobeynikov [Sun, 3 May 2009 13:04:06 +0000 (13:04 +0000)]
Add more instructions

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

15 years agoCleanup
Anton Korobeynikov [Sun, 3 May 2009 13:03:50 +0000 (13:03 +0000)]
Cleanup

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

15 years agoAdd dummy lowering for shifts
Anton Korobeynikov [Sun, 3 May 2009 13:03:33 +0000 (13:03 +0000)]
Add dummy lowering for shifts

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

15 years agoWe don't have any div at all - thus mark it as expensive
Anton Korobeynikov [Sun, 3 May 2009 13:03:14 +0000 (13:03 +0000)]
We don't have any div at all - thus mark it as expensive

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

15 years agoWe're not going to spend 100% of time in interrupts, do we? :)
Anton Korobeynikov [Sun, 3 May 2009 13:02:57 +0000 (13:02 +0000)]
We're not going to spend 100% of time in interrupts, do we? :)

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

15 years agoAdd simple reg-reg add.
Anton Korobeynikov [Sun, 3 May 2009 13:02:39 +0000 (13:02 +0000)]
Add simple reg-reg add.

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

15 years agogas uses lower letter for register names
Anton Korobeynikov [Sun, 3 May 2009 13:02:22 +0000 (13:02 +0000)]
gas uses lower letter for register names

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

15 years agoAdd code enough for emission of reg-reg and reg-imm moves. This allows us to compile...
Anton Korobeynikov [Sun, 3 May 2009 13:02:04 +0000 (13:02 +0000)]
Add code enough for emission of reg-reg and reg-imm moves. This allows us to compile "ret i16 0" properly!

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

15 years agoAdd function body printing routine
Anton Korobeynikov [Sun, 3 May 2009 13:01:41 +0000 (13:01 +0000)]
Add function body printing routine

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

15 years agoAdd 'msp430' target triple recognizer
Anton Korobeynikov [Sun, 3 May 2009 13:01:23 +0000 (13:01 +0000)]
Add 'msp430' target triple recognizer

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

15 years agoMake emit{Prologue,Epilogue}() noop for now
Anton Korobeynikov [Sun, 3 May 2009 13:01:04 +0000 (13:01 +0000)]
Make emit{Prologue,Epilogue}() noop for now

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

15 years agoAdd callee-saved regs & reg classes getter hooks
Anton Korobeynikov [Sun, 3 May 2009 13:00:46 +0000 (13:00 +0000)]
Add callee-saved regs & reg classes getter hooks

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

15 years agoAdd simple FP indicator for given function hook
Anton Korobeynikov [Sun, 3 May 2009 13:00:28 +0000 (13:00 +0000)]
Add simple FP indicator for given function hook

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

15 years agoProvide set of reserved registers
Anton Korobeynikov [Sun, 3 May 2009 13:00:11 +0000 (13:00 +0000)]
Provide set of reserved registers

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

15 years agoAdd proper ISD::RET lowering
Anton Korobeynikov [Sun, 3 May 2009 12:59:50 +0000 (12:59 +0000)]
Add proper ISD::RET lowering

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

15 years agoAdd first draft of MSP430 calling convention stuff and draft of ISD::FORMAL_ARGUMENTS...
Anton Korobeynikov [Sun, 3 May 2009 12:59:33 +0000 (12:59 +0000)]
Add first draft of MSP430 calling convention stuff and draft of ISD::FORMAL_ARGUMENTS node lowering.

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

15 years agoFix register names, fix register allocation order, handle frame pointer.
Anton Korobeynikov [Sun, 3 May 2009 12:59:16 +0000 (12:59 +0000)]
Fix register names, fix register allocation order, handle frame pointer.

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

15 years agoClearify the usage and add some debug stuff
Anton Korobeynikov [Sun, 3 May 2009 12:58:58 +0000 (12:58 +0000)]
Clearify the usage and add some debug stuff

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

15 years agoCleanup
Anton Korobeynikov [Sun, 3 May 2009 12:58:40 +0000 (12:58 +0000)]
Cleanup

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

15 years agoAdd cmake script. No idea whether it works or not :)
Anton Korobeynikov [Sun, 3 May 2009 12:58:22 +0000 (12:58 +0000)]
Add cmake script. No idea whether it works or not :)

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

15 years agoAdd a note
Anton Korobeynikov [Sun, 3 May 2009 12:58:05 +0000 (12:58 +0000)]
Add a note

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

15 years agoTypo
Anton Korobeynikov [Sun, 3 May 2009 12:57:47 +0000 (12:57 +0000)]
Typo

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

15 years agoDummy MSP430 backend
Anton Korobeynikov [Sun, 3 May 2009 12:57:15 +0000 (12:57 +0000)]
Dummy MSP430 backend

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

15 years ago-Move the DwarfWriter::ValidDebugInfo check to a static DIDescriptor::ValidDebugInfo
Argyrios Kyrtzidis [Sun, 3 May 2009 08:50:41 +0000 (08:50 +0000)]
-Move the DwarfWriter::ValidDebugInfo check to a static DIDescriptor::ValidDebugInfo
-Create DebugLocs without the need to have a DwarfWriter around

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

15 years agoRevert r70645 for now; it's causing a variety of regressions.
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

15 years agoRevert r70630. Go back to appending ".b" to internal globals when shrinking
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

15 years agoAdd an svn:ignore for unittests/VMCore.
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

15 years agoConvert ScalarEvolution to use CallbackVH for its internal map. This
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

15 years agoApply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from me
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

15 years agoInclude <limits.h> to get the definition of CHAR_BIT.
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

15 years agoThe second argument to RecursivelyDeleteTriviallyDeadInstructions has
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

15 years agoPreviously, RecursivelyDeleteDeadInstructions provided an option
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

15 years agoWhen ScalarEvolution is told to forget the trip count for a loop, have
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

15 years agoTell ScalarEvolution that the loop is being deleted before actually
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

15 years agoDon't append ".b" to the names of globals that are being shrunk to booleans.
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

15 years agoDon't split critical edges during the AddUsersIfInteresting phase
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

15 years agoAdd Base.td to svn:ignore.
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

15 years ago'The attached patch fixes an issue where llc -march=cpp fails with
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

15 years agoDrop the default assumption about alignment down to 2 bits from 3. This apparently
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

15 years agoChange the description string of the LoopInfo pass.
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

15 years agoPrevent looping when DenseSet is abused.
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

15 years agoHTML-escape '>' as '&gt;' in sample C++ code.
Misha Brukman [Fri, 1 May 2009 20:40:51 +0000 (20:40 +0000)]
HTML-escape '>' as '&gt;' in sample C++ code.

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

15 years agoAllow CONCAT_VECTORS nodes to be legal or have custom lowering for some targets.
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

15 years agoActually insert inserted instructions into the InsertedValues map.
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

15 years agoAdd an accessor method to allow clients to test if a given expression
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

15 years agoMake RequiresTypeConversion canonicalize the types before calling the
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

15 years agoWhen printing a SCEVUnknown with pointer type, don't print an
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

15 years agoShort-circuit inttoptr-ptrtoint constant expressions; these aren't
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

15 years agoMake SCEVExpander::addInsertedValue able to accept Values, not just
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

15 years agoMinor whitespace fix.
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

15 years agoFix an 80-column violation.
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

15 years agoWhen creating cast scevs, canonicalize the destination type. This
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

15 years agoFix a compiler warning on hosts where uint64_t isn't unsigned long long.
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

15 years agoFix some code to work if TargetLowering is not available.
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

15 years agoSimplify more code and add timer stuff.
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

15 years agoSimplify more code.
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

15 years agohasSCEV() was declared in ScalarEvolution.h, but never defined. This must have
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

15 years agoSimplify some code.
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

15 years agoFix whitespace. It was confusing me.
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

15 years agoLets install the manual page with install-clang! Radar 6838692
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

15 years agoCode clean up. Bye bye PhysRegTracker.
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

15 years agoFix compilation for some targets other than x86.
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

15 years agoAdd a comment to refer to the section of the programmer's manual that explains what...
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

15 years agoMake DebugLoc independent of DwarfWriter.
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

15 years agoSet FnEnd in JITEmitter::finishFunction to point strictly to the end of function...
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

15 years agoAdd a mention of TypeBuilder to the programmer's manual, and clean up the class
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

15 years agoJoin cross class copies using getCommonSubClass()
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

15 years agogetCommonSubClass() - Calculate the largest common sub-class of two register
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

15 years agoSlightly change TableGen's definition of a register subclass.
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

15 years agoAdd some comments, and tidy up some whitespace.
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

15 years agoExtend ScalarEvolution's getBackedgeTakenCount to be able to
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

15 years agoAdd a smarter heuristic to determine when to coalesce a virtual register with a physi...
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

15 years agoRename the CurMultiClass formal parameter of TGParser::AddSubMultiClass
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

15 years agoRemove unnecessary "class" keywords.
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

15 years agoChange forward declaration of MultiClass to use the "struct" keyword instead
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

15 years agoMake dataflow iteration possible on Value*, not only on User*: df_ext_iterator<Value...
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

15 years agoDon't try to mix integers and pointers in an icmp instruction
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

15 years agoOops! Missed a file in my last commit.
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

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