oota-llvm.git
16 years agoProvide a hook to set the code generation debug options to investigate lto failures.
Devang Patel [Thu, 3 Jul 2008 22:53:14 +0000 (22:53 +0000)]
Provide a  hook to set the code generation debug options to investigate lto failures.

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

16 years agoBacked out 53031.
Evan Cheng [Thu, 3 Jul 2008 18:20:14 +0000 (18:20 +0000)]
Backed out 53031.

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

16 years agoBack out 53091 for now.
Evan Cheng [Thu, 3 Jul 2008 18:11:29 +0000 (18:11 +0000)]
Back out 53091 for now.

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

16 years agoUse information already present in the ValueTable to fast-fail when we know there...
Owen Anderson [Thu, 3 Jul 2008 17:44:33 +0000 (17:44 +0000)]
Use information already present in the ValueTable to fast-fail when we know there won't be a value number match.  This speeds up GVN on a case where there are very few redundancies by ~25%.

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

16 years agoDo not try to update dominator info while manipulating CFG. This code does not handl...
Devang Patel [Thu, 3 Jul 2008 17:37:52 +0000 (17:37 +0000)]
Do not try to update dominator info while manipulating CFG.  This code does not handle all cases and keeps invalid dom info around some cases, which misleads other passes down stream.

Right now, dom info is recaluclated in the end if the loop is switched.

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

16 years agoRemove the ability for ADCE to remove unreachable blocks in loop nests, because,...
Owen Anderson [Thu, 3 Jul 2008 17:21:41 +0000 (17:21 +0000)]
Remove the ability for ADCE to remove unreachable blocks in loop nests, because, as Eli pointed out, SimplifyCFG already does this.

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

16 years ago- Remove calls to copyKillDeadInfo which is an N^2 function. Instead, propagate kill...
Evan Cheng [Thu, 3 Jul 2008 09:09:37 +0000 (09:09 +0000)]
- Remove calls to copyKillDeadInfo which is an N^2 function. Instead, propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc.
- Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list.

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

16 years agoisel load folding is disabled at -fast. Now hoist the check up to the top level to...
Evan Cheng [Thu, 3 Jul 2008 08:39:51 +0000 (08:39 +0000)]
isel load folding is disabled at -fast. Now hoist the check up to the top level to save some time.

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

16 years agoAdd newline at the end of Constants.cpp.
Matthijs Kooijman [Thu, 3 Jul 2008 07:46:41 +0000 (07:46 +0000)]
Add newline at the end of Constants.cpp.

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

16 years agollvm-gcc sometimes marks external declarations hidden, because intializers are
Anton Korobeynikov [Thu, 3 Jul 2008 07:43:14 +0000 (07:43 +0000)]
llvm-gcc sometimes marks external declarations hidden, because intializers are
processed separately. Honour such situation and emit PIC relocations properly
in such case.

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

16 years agoRemove unused function.
Bill Wendling [Thu, 3 Jul 2008 07:10:03 +0000 (07:10 +0000)]
Remove unused function.

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

16 years agoPreserve dom info.
Devang Patel [Thu, 3 Jul 2008 07:04:22 +0000 (07:04 +0000)]
Preserve dom info.

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

16 years agoKeep track of inherited analysis (e.g. dominator tree).
Devang Patel [Thu, 3 Jul 2008 07:02:30 +0000 (07:02 +0000)]
Keep track of inherited analysis (e.g. dominator tree).

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

16 years agoRemove extra FIXME
Devang Patel [Thu, 3 Jul 2008 06:50:04 +0000 (06:50 +0000)]
Remove extra FIXME

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

16 years agoReconstruct dom info, if loop is unswitched.
Devang Patel [Thu, 3 Jul 2008 06:48:21 +0000 (06:48 +0000)]
Reconstruct dom info, if loop is unswitched.

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

16 years agoLoopUnswitch does not preserve dominator info in all cases.
Devang Patel [Thu, 3 Jul 2008 05:55:03 +0000 (05:55 +0000)]
LoopUnswitch does not preserve dominator info in all cases.

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

16 years agoReapply r52988, "Simplify addRegisterKilled and addRegisterDead." The
Dan Gohman [Thu, 3 Jul 2008 01:18:51 +0000 (01:18 +0000)]
Reapply r52988, "Simplify addRegisterKilled and addRegisterDead." The
254.gap failure was not due to this mod.

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

16 years agoUse operator new instead of new char[].
Dan Gohman [Thu, 3 Jul 2008 00:59:36 +0000 (00:59 +0000)]
Use operator new instead of new char[].

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

16 years agoUse operator new instead of new char[].
Dan Gohman [Thu, 3 Jul 2008 00:53:09 +0000 (00:53 +0000)]
Use operator new instead of new char[].

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

16 years agoAvoid unnecessarily copying APInt objects.
Dan Gohman [Thu, 3 Jul 2008 00:52:03 +0000 (00:52 +0000)]
Avoid unnecessarily copying APInt objects.

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

16 years agoCorrect a comment.
Dan Gohman [Thu, 3 Jul 2008 00:51:05 +0000 (00:51 +0000)]
Correct a comment.

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

16 years agoUse std::replace instead of std::find and push_back.
Evan Cheng [Thu, 3 Jul 2008 00:28:27 +0000 (00:28 +0000)]
Use std::replace instead of std::find and push_back.

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

16 years agoUndo previous patch. It is not that simple to fix dom info here.
Devang Patel [Thu, 3 Jul 2008 00:08:13 +0000 (00:08 +0000)]
Undo previous patch. It is not that simple to fix dom info here.

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

16 years ago- Add LiveVariables::replaceKillInstruction. This does a subset of instructionChanged...
Evan Cheng [Thu, 3 Jul 2008 00:07:19 +0000 (00:07 +0000)]
- Add LiveVariables::replaceKillInstruction. This does a subset of instructionChanged. That is, it only update the VarInfo.kills if the new instruction is known to have the correct dead and kill markers.
- CommuteInstruction copies kill / dead markers over to new instruction. So use replaceKillInstruction instead.

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

16 years agocommuteInstruction should preserve dead markers.
Evan Cheng [Thu, 3 Jul 2008 00:04:51 +0000 (00:04 +0000)]
commuteInstruction should preserve dead markers.

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

16 years agoMake LiveVariables even more optional, by making it optional in the call to TargetIns...
Owen Anderson [Wed, 2 Jul 2008 23:41:07 +0000 (23:41 +0000)]
Make LiveVariables even more optional, by making it optional in the call to TargetInstrInfo::convertToThreeAddressInstruction
Also, if LV isn't around, then TwoAddr doesn't need to be updating flags, since they won't have been set in the first place.

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

16 years agoReplace a few uses of SelectionDAG::getTargetNode with
Dan Gohman [Wed, 2 Jul 2008 23:23:19 +0000 (23:23 +0000)]
Replace a few uses of SelectionDAG::getTargetNode with
SelectionDAG::SelectNodeTo in the instruction selector. This
updates existing nodes in place instead of creating new ones.

Go back to selecting ISD::DBG_LABEL nodes into
TargetInstrInfo::DBG_LABEL nodes instead of leaving them
unselected, now that SelectNodeTo allows us to update them
in place.

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

16 years agoPreserve dom info while simplifing loop after the unswitch.
Devang Patel [Wed, 2 Jul 2008 22:58:54 +0000 (22:58 +0000)]
Preserve dom info while simplifing loop after the unswitch.

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

16 years agoAdd a couple more helper functions to deal with
Eric Christopher [Wed, 2 Jul 2008 22:57:59 +0000 (22:57 +0000)]
Add a couple more helper functions to deal with
creating global constant strings and pointers
to global constant strings.

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

16 years agoRevert r52988. It broke 254.gap on x86-64.
Dan Gohman [Wed, 2 Jul 2008 22:12:55 +0000 (22:12 +0000)]
Revert r52988. It broke 254.gap on x86-64.

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

16 years agoTwoAddressInstructionPass doesn't really require LiveVariables, it just needs to...
Owen Anderson [Wed, 2 Jul 2008 21:28:58 +0000 (21:28 +0000)]
TwoAddressInstructionPass doesn't really require LiveVariables, it just needs to update it if it's already around.

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

16 years agoVStudio x64 build fixes. Looks like the x64 projects got out of date and this brings...
Chuck Rose III [Wed, 2 Jul 2008 21:02:51 +0000 (21:02 +0000)]
VStudio x64 build fixes.  Looks like the x64 projects got out of date and this brings them up to code.  I've built the project with these new vcproj files for win32 and x64 both debug and release.

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

16 years agoUse ADCE instead of just DCE. ADCE will better clean up after jump threading,
Owen Anderson [Wed, 2 Jul 2008 18:42:07 +0000 (18:42 +0000)]
Use ADCE instead of just DCE.  ADCE will better clean up after jump threading,
for instance.

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

16 years agoUse df_ext_iterator to capture the reachable set without allocating an extra set.
Owen Anderson [Wed, 2 Jul 2008 18:41:09 +0000 (18:41 +0000)]
Use df_ext_iterator to capture the reachable set without allocating an extra set.
Also, move large sets and vectors out of instance variables and onto the stack,
and give them more reasonable sizes.

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

16 years agoAvoid a redundant call.
Owen Anderson [Wed, 2 Jul 2008 18:15:31 +0000 (18:15 +0000)]
Avoid a redundant call.

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

16 years agoAdd support to ADCE for pruning unreachable blocks. This addresses the final
Owen Anderson [Wed, 2 Jul 2008 18:05:19 +0000 (18:05 +0000)]
Add support to ADCE for pruning unreachable blocks.  This addresses the final
part of PR2509.

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

16 years agoMake the default min align of CreateStackTemporary to be 1
Mon P Wang [Wed, 2 Jul 2008 17:50:10 +0000 (17:50 +0000)]
Make the default min align of CreateStackTemporary to be 1

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

16 years agoAdd a new getMergeValues method that does not need
Duncan Sands [Wed, 2 Jul 2008 17:40:58 +0000 (17:40 +0000)]
Add a new getMergeValues method that does not need
to be passed the list of value types, and use this
where appropriate.  Inappropriate places are where
the value type list is already known and may be
long, in which case the existing method is more
efficient.

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

16 years agoUse DenseSet rather than SmallPtrSet for the alive set. Using SmallPtrSet
Owen Anderson [Wed, 2 Jul 2008 17:32:04 +0000 (17:32 +0000)]
Use DenseSet rather than SmallPtrSet for the alive set.  Using SmallPtrSet
with a huge "size" parameter is actually quite inefficient.

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

16 years agoHave DenseSet::insert return a bool indicating whether the insertion succeeded or...
Owen Anderson [Wed, 2 Jul 2008 17:29:59 +0000 (17:29 +0000)]
Have DenseSet::insert return a bool indicating whether the insertion succeeded or not.

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

16 years agoA better fix for PR2503 that doesn't pessimize GVN in the presence of unreachable...
Owen Anderson [Wed, 2 Jul 2008 17:20:16 +0000 (17:20 +0000)]
A better fix for PR2503 that doesn't pessimize GVN in the presence of unreachable blocks.

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

16 years agoFixed problem in EmitStackConvert where the source and target type
Mon P Wang [Wed, 2 Jul 2008 17:07:12 +0000 (17:07 +0000)]
Fixed problem in EmitStackConvert where the source and target type
have different alignment by creating a stack slot with the max
alignment of source and target type.

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

16 years agoinstead of aborting on shifts of i1, just implicitly fold them.
Chris Lattner [Wed, 2 Jul 2008 17:01:57 +0000 (17:01 +0000)]
instead of aborting on shifts of i1, just implicitly fold them.
The dag combiner can produce a shift of i1 when folding icmp i1's.

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

16 years agoUpdate link to testing guide to use the new title.
Matthijs Kooijman [Wed, 2 Jul 2008 13:54:58 +0000 (13:54 +0000)]
Update link to testing guide to use the new title.

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

16 years agoFix typo compounded by a cut-and-pasto.
Duncan Sands [Wed, 2 Jul 2008 10:03:53 +0000 (10:03 +0000)]
Fix typo compounded by a cut-and-pasto.

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

16 years agoLet AnalyzeNewNode take care of calling ExpungeNode.
Duncan Sands [Wed, 2 Jul 2008 09:56:41 +0000 (09:56 +0000)]
Let AnalyzeNewNode take care of calling ExpungeNode.
This makes sure that all new nodes are expunged, not
just those the top node of a new subtree.

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

16 years ago- Use a faster priority comparison function if -fast.
Evan Cheng [Wed, 2 Jul 2008 09:23:51 +0000 (09:23 +0000)]
- Use a faster priority comparison function if -fast.
- Code clean up.

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

16 years agooptimize StringMap::clear
Chris Lattner [Wed, 2 Jul 2008 05:30:45 +0000 (05:30 +0000)]
optimize StringMap::clear

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

16 years agoAdd a new (simple) StringMap::clear method, patch by Pratik
Chris Lattner [Wed, 2 Jul 2008 05:26:32 +0000 (05:26 +0000)]
Add a new (simple) StringMap::clear method, patch by Pratik
Solanki!

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

16 years agoreuse vectors.
Devang Patel [Wed, 2 Jul 2008 01:44:29 +0000 (01:44 +0000)]
reuse vectors.

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

16 years agoFix comment.
Devang Patel [Wed, 2 Jul 2008 01:31:19 +0000 (01:31 +0000)]
Fix comment.

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

16 years agoPreserve loop data so that it is not fetched everytime it is needed.
Devang Patel [Wed, 2 Jul 2008 01:18:13 +0000 (01:18 +0000)]
Preserve loop data so that it is not fetched everytime it is needed.
Keep track of currentLoop.

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

16 years agoUse the canonical form for getting an empty structure.
Bill Wendling [Wed, 2 Jul 2008 00:50:02 +0000 (00:50 +0000)]
Use the canonical form for getting an empty structure.

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

16 years agoSorry. I couldn't sleep at night knowing I put these ugly casts into the source tree.
Bill Wendling [Wed, 2 Jul 2008 00:35:47 +0000 (00:35 +0000)]
Sorry. I couldn't sleep at night knowing I put these ugly casts into the source tree.

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

16 years agoImplemented operator!= for the ImmutableList iterator.
Ted Kremenek [Wed, 2 Jul 2008 00:06:55 +0000 (00:06 +0000)]
Implemented operator!= for the ImmutableList iterator.

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

16 years agoAdd a version of AddString that takes a const char* so we can avoid extraneous
Owen Anderson [Tue, 1 Jul 2008 23:49:59 +0000 (23:49 +0000)]
Add a version of AddString that takes a const char* so we can avoid extraneous
conversions to std::string.

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

16 years agoDarwin doesn't need exception handling information for the "move" info when
Bill Wendling [Tue, 1 Jul 2008 23:34:48 +0000 (23:34 +0000)]
Darwin doesn't need exception handling information for the "move" info when
debug information is being output, because it's leet!

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

16 years agoAvoid creating expensive comment string if it's not going to be printed.
Evan Cheng [Tue, 1 Jul 2008 23:18:29 +0000 (23:18 +0000)]
Avoid creating expensive comment string if it's not going to be printed.

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

16 years agoNo need to use std::distance. We can just count the number of operands
Owen Anderson [Tue, 1 Jul 2008 22:34:11 +0000 (22:34 +0000)]
No need to use std::distance.  We can just count the number of operands
much more cheaply.

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

16 years agoAdded partial specialization of FoldingSetTrait for pointers.
Ted Kremenek [Tue, 1 Jul 2008 22:30:13 +0000 (22:30 +0000)]
Added partial specialization of FoldingSetTrait for pointers.

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

16 years agoSimplify addRegisterKilled and addRegisterDead.
Evan Cheng [Tue, 1 Jul 2008 22:21:21 +0000 (22:21 +0000)]
Simplify addRegisterKilled and addRegisterDead.

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

16 years ago- Update comments.
Bill Wendling [Tue, 1 Jul 2008 22:08:01 +0000 (22:08 +0000)]
- Update comments.
- Don't use GlobalVariable::LinkageTypes when unsigned works.

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

16 years agoConsidering predecessors of exit blocks gets
Dale Johannesen [Tue, 1 Jul 2008 21:50:49 +0000 (21:50 +0000)]
Considering predecessors of exit blocks gets
us a little more tail merging.

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

16 years agoFix longstanding thinko: don't exclude
Dale Johannesen [Tue, 1 Jul 2008 21:50:14 +0000 (21:50 +0000)]
Fix longstanding thinko:  don't exclude
predessors of exit blocks from tail merging
consideration.

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

16 years agoFix dom tree compare. Don't forget to compare children!
Devang Patel [Tue, 1 Jul 2008 21:41:00 +0000 (21:41 +0000)]
Fix dom tree compare. Don't forget to compare children!

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

16 years agoDisable dom info verifier by default.
Devang Patel [Tue, 1 Jul 2008 21:36:11 +0000 (21:36 +0000)]
Disable dom info verifier by default.

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

16 years agoEliminate a compile time warning.
Evan Cheng [Tue, 1 Jul 2008 21:35:46 +0000 (21:35 +0000)]
Eliminate a compile time warning.

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

16 years agoAdd a version of AsmPrinter::EOL that takes a const char* so that we don't have to...
Owen Anderson [Tue, 1 Jul 2008 21:16:27 +0000 (21:16 +0000)]
Add a version of AsmPrinter::EOL that takes a const char* so that we don't have to do as many implicit std::string constructions.
Unfortunately, this doesn't appear to translate to a real speedup in practice.

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

16 years agoRemove warning about initialization order.
Bill Wendling [Tue, 1 Jul 2008 21:00:31 +0000 (21:00 +0000)]
Remove warning about initialization order.

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

16 years agoFix typos in comments.
Devang Patel [Tue, 1 Jul 2008 19:50:56 +0000 (19:50 +0000)]
Fix typos in comments.
Thanks for the feedback!

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

16 years agoDAGSize should not be public.
Evan Cheng [Tue, 1 Jul 2008 18:49:06 +0000 (18:49 +0000)]
DAGSize should not be public.

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

16 years agoPrune a few dependencies on MachineFunction.h.
Dan Gohman [Tue, 1 Jul 2008 18:15:35 +0000 (18:15 +0000)]
Prune a few dependencies on MachineFunction.h.

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

16 years agoDo run ComputeLiveOutVRegInfo with -fast.
Evan Cheng [Tue, 1 Jul 2008 18:15:04 +0000 (18:15 +0000)]
Do run ComputeLiveOutVRegInfo with -fast.

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

16 years agoMake ilist_traits<MachineBasicBlock>'s Parent member private.
Dan Gohman [Tue, 1 Jul 2008 18:13:58 +0000 (18:13 +0000)]
Make ilist_traits<MachineBasicBlock>'s Parent member private.

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

16 years agoFix apostrophes in a comment.
Dan Gohman [Tue, 1 Jul 2008 18:12:31 +0000 (18:12 +0000)]
Fix apostrophes in a comment.

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

16 years agoDo not use computationally expensive scheduling heuristics with -fast.
Evan Cheng [Tue, 1 Jul 2008 18:05:03 +0000 (18:05 +0000)]
Do not use computationally expensive scheduling heuristics with -fast.

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

16 years agoApply Chris' suggestion.
Evan Cheng [Tue, 1 Jul 2008 17:59:20 +0000 (17:59 +0000)]
Apply Chris' suggestion.

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

16 years agoAdd dom info verifier.
Devang Patel [Tue, 1 Jul 2008 17:44:24 +0000 (17:44 +0000)]
Add dom info verifier.

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

16 years agoMake the subregister hashtable output more readable by wrapping the lines,
Owen Anderson [Tue, 1 Jul 2008 17:34:38 +0000 (17:34 +0000)]
Make the subregister hashtable output more readable by wrapping the lines,
and mark it const along with the associated changes to TargetRegisterInfo.

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

16 years agoUse delete[] instead of free on an array created with new[].
Owen Anderson [Tue, 1 Jul 2008 15:56:31 +0000 (15:56 +0000)]
Use delete[] instead of free on an array created with new[].

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

16 years agoHighlight that getMergeValues optimization is
Duncan Sands [Tue, 1 Jul 2008 08:00:49 +0000 (08:00 +0000)]
Highlight that getMergeValues optimization is
being suppressed here.

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

16 years agoImplement suggestions from Chris:
Owen Anderson [Tue, 1 Jul 2008 07:02:30 +0000 (07:02 +0000)]
Implement suggestions from Chris:
  - Use a more accurate heuristic for the size of the hashtable.
  - Use bitwise and instead of modulo since the size is a power of two.
  - Use new[] instead of malloc().

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

16 years agoCompilation fix
Seo Sanghyeon [Tue, 1 Jul 2008 05:27:28 +0000 (05:27 +0000)]
Compilation fix

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

16 years agoProperly handle cases where a predecessor of the block being queried on is unreachable.
Owen Anderson [Tue, 1 Jul 2008 00:40:58 +0000 (00:40 +0000)]
Properly handle cases where a predecessor of the block being queried on is unreachable.
This fixes PR2503, though we should also fix other passes not to emit this kind of code.

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

16 years agoReplace the dynamically computed std::set lookup method for subregisters with a hasht...
Owen Anderson [Tue, 1 Jul 2008 00:18:52 +0000 (00:18 +0000)]
Replace the dynamically computed std::set lookup method for subregisters with a hashtable-based
version that is computed by tblgen at the time LLVM is compiled.

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

16 years agoMinimize duplicated code in AsmPrinter::printLabel.
Dan Gohman [Tue, 1 Jul 2008 00:16:26 +0000 (00:16 +0000)]
Minimize duplicated code in AsmPrinter::printLabel.

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

16 years agoSplit ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
Dan Gohman [Tue, 1 Jul 2008 00:05:16 +0000 (00:05 +0000)]
Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.

Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.

This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.

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

16 years agoAdding some missing files to VStudio project files. Switching to use generated llvmA...
Chuck Rose III [Mon, 30 Jun 2008 22:37:57 +0000 (22:37 +0000)]
Adding some missing files to VStudio project files.  Switching to use generated llvmAsmParser.cpp/.h

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

16 years agoSuppress compiler warning.
Evan Cheng [Mon, 30 Jun 2008 22:33:56 +0000 (22:33 +0000)]
Suppress compiler warning.

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

16 years agoDon't run stack slot coloring if -fast.
Evan Cheng [Mon, 30 Jun 2008 22:33:16 +0000 (22:33 +0000)]
Don't run stack slot coloring if -fast.

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

16 years agoDon't use ISD namespace opcodes for MachineInstrs.
Dan Gohman [Mon, 30 Jun 2008 22:23:08 +0000 (22:23 +0000)]
Don't use ISD namespace opcodes for MachineInstrs.

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

16 years agoUse a simpler but equivalent form of RecordSource.
Dan Gohman [Mon, 30 Jun 2008 22:21:03 +0000 (22:21 +0000)]
Use a simpler but equivalent form of RecordSource.

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

16 years agoAdd timing report for various sub-passes under SelectionDAGISel.
Evan Cheng [Mon, 30 Jun 2008 22:10:09 +0000 (22:10 +0000)]
Add timing report for various sub-passes under SelectionDAGISel.

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

16 years agostd::ostream and std::string microoptimizations for asm printing.
Dan Gohman [Mon, 30 Jun 2008 22:03:41 +0000 (22:03 +0000)]
std::ostream and std::string microoptimizations for asm printing.

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

16 years agoMake SmallVector's grow use memcpy in common cases
Dan Gohman [Mon, 30 Jun 2008 21:45:13 +0000 (21:45 +0000)]
Make SmallVector's grow use memcpy in common cases
instead of std::uninitialized_copy, which uses memmove.

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

16 years agoUse plain operator new instead of new char[].
Dan Gohman [Mon, 30 Jun 2008 21:33:02 +0000 (21:33 +0000)]
Use plain operator new instead of new char[].

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

16 years agoUse reserve.
Dan Gohman [Mon, 30 Jun 2008 21:04:06 +0000 (21:04 +0000)]
Use reserve.

SelectionDAG::allnodes_size is linear, but that doesn't appear to
outweigh the benefit of reducing heap traffic. If it does become a
problem, we should teach SelectionDAG to keep a count of how many
nodes are live, because there are several other places where that
information would be useful as well.

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

16 years agoUpdate comments to new-style syntax.
Dan Gohman [Mon, 30 Jun 2008 21:00:56 +0000 (21:00 +0000)]
Update comments to new-style syntax.

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

16 years agoRename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect its
Dan Gohman [Mon, 30 Jun 2008 20:59:49 +0000 (20:59 +0000)]
Rename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect its
purpose, and give it a custom SDNode subclass so that it doesn't
need to have line number, column number, filename string, and
directory string, all existing as individual SDNodes to be the
operands.

This was the only user of ISD::STRING, StringSDNode, etc., so
remove those and some associated code.

This makes stop-points considerably easier to read in
-view-legalize-dags output, and reduces overhead (creating new
nodes and copying std::strings into them) on code containing
debugging information.

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

16 years agoSplit scheduling from instruction selection.
Evan Cheng [Mon, 30 Jun 2008 20:45:06 +0000 (20:45 +0000)]
Split scheduling from instruction selection.

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