oota-llvm.git
15 years agoAdd operator->, patch by Ben Laurie!
Chris Lattner [Thu, 12 Feb 2009 17:14:49 +0000 (17:14 +0000)]
Add operator->, patch by Ben Laurie!

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

15 years agoadd PR
Chris Lattner [Thu, 12 Feb 2009 17:04:57 +0000 (17:04 +0000)]
add PR

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

15 years agoThis code doesn't actually use the ExitingBlocks list.
Dan Gohman [Thu, 12 Feb 2009 16:36:26 +0000 (16:36 +0000)]
This code doesn't actually use the ExitingBlocks list.

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

15 years agoIt's (currently) not safe to keep certain physical registers live across basic blocks...
Evan Cheng [Thu, 12 Feb 2009 10:32:17 +0000 (10:32 +0000)]
It's (currently) not safe to keep certain physical registers live across basic blocks, e.g. x86 fp stack registers.

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

15 years agoOops. Last second clean up messed things up.
Evan Cheng [Thu, 12 Feb 2009 09:52:13 +0000 (09:52 +0000)]
Oops. Last second clean up messed things up.

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

15 years agoIf availability info is kept when fallthrough into a bb, add the available registers...
Evan Cheng [Thu, 12 Feb 2009 09:43:23 +0000 (09:43 +0000)]
If availability info is kept when fallthrough into a bb, add the available registers to live-in set.

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

15 years agoReplace one of burr scheduling heuristic with something more sensible. Now calcMaxScr...
Evan Cheng [Thu, 12 Feb 2009 08:59:45 +0000 (08:59 +0000)]
Replace one of burr scheduling heuristic with something more sensible. Now calcMaxScratches simply compute the number of true data dependencies. This actually improve a couple of tests in dejagnu suite as many tests in llvm nightly test suite.

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

15 years agoFix MingW build: define GTEST_OS_WINDOWS if OS is MingW, but disable
Julien Lerouge [Thu, 12 Feb 2009 08:02:35 +0000 (08:02 +0000)]
Fix MingW build: define GTEST_OS_WINDOWS if OS is MingW, but disable
exceptions.

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

15 years agoFix MingW build, patch by Kenneth Boyd!
Julien Lerouge [Thu, 12 Feb 2009 07:39:10 +0000 (07:39 +0000)]
Fix MingW build, patch by Kenneth Boyd!

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

15 years agoFix a nasty bug (PR3550) where the inline pass could incorrectly mark
Chris Lattner [Thu, 12 Feb 2009 07:06:42 +0000 (07:06 +0000)]
Fix a nasty bug (PR3550) where the inline pass could incorrectly mark
calls with the tail marker when inlining them through an invoke.  Patch,
testcase, and perfect analysis by Jay Foad!

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

15 years agoimprove naming of values in GVN, patch by Jay Foad!
Chris Lattner [Thu, 12 Feb 2009 07:00:35 +0000 (07:00 +0000)]
improve naming of values in GVN, patch by Jay Foad!

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

15 years agofix PR3537: if resetting bbi back to the start of a block, we need to
Chris Lattner [Thu, 12 Feb 2009 06:56:08 +0000 (06:56 +0000)]
fix PR3537: if resetting bbi back to the start of a block, we need to
forget about already inserted expressions.

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

15 years agorename test to avoid messing with tab completion of dates.
Chris Lattner [Thu, 12 Feb 2009 06:54:55 +0000 (06:54 +0000)]
rename test to avoid messing with tab completion of dates.

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

15 years agoAdd method 'isSingleton()' to ImmutableSet. This returns true if the set contains...
Ted Kremenek [Thu, 12 Feb 2009 05:17:02 +0000 (05:17 +0000)]
Add method 'isSingleton()' to ImmutableSet.  This returns true if the set contains exactly one element.

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

15 years agoDon't mark all args to strtod and friends as nocapture.
Nick Lewycky [Thu, 12 Feb 2009 03:18:34 +0000 (03:18 +0000)]
Don't mark all args to strtod and friends as nocapture.

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

15 years agoMove debug loc info along when the spiller creates new instructions.
Bill Wendling [Thu, 12 Feb 2009 00:02:55 +0000 (00:02 +0000)]
Move debug loc info along when the spiller creates new instructions.

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

15 years agoApparently some MachineBasicBlock's don't have corresponding llvm basic blocks.
Evan Cheng [Wed, 11 Feb 2009 23:42:39 +0000 (23:42 +0000)]
Apparently some MachineBasicBlock's don't have corresponding llvm basic blocks.

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

15 years agoRemove a bogus assertion. It's possible a live-in available value is used by a previo...
Evan Cheng [Wed, 11 Feb 2009 23:41:57 +0000 (23:41 +0000)]
Remove a bogus assertion. It's possible a live-in available value is used by a previous instruction.

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

15 years agothe two non-mask arguments to a shufflevector must be the same width, but they do...
Nate Begeman [Wed, 11 Feb 2009 22:36:25 +0000 (22:36 +0000)]
the two non-mask arguments to a shufflevector must be the same width, but they do not have to be the same
width as the result value.

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

15 years agoEdit description of floating point constants to
Dale Johannesen [Wed, 11 Feb 2009 22:14:51 +0000 (22:14 +0000)]
Edit description of floating point constants to
reflect reality.  Acknowledgements to John Clements
for prodding me into this.

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

15 years agoFill in a glaring omission in derived User classes, namely
Gabor Greif [Wed, 11 Feb 2009 22:09:00 +0000 (22:09 +0000)]
Fill in a glaring omission in derived User classes, namely
add efficient versions of op_begin and op_end. Up to now always those from User have been
called, which in most cases follow an indirection (OperandList) even if the exact Instruction
type is known.

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

15 years agoPropagate DebugLoc info for spiller call-backs.
Bill Wendling [Wed, 11 Feb 2009 21:51:19 +0000 (21:51 +0000)]
Propagate DebugLoc info for spiller call-backs.

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

15 years agoFix a comment.
Dan Gohman [Wed, 11 Feb 2009 21:32:08 +0000 (21:32 +0000)]
Fix a comment.

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

15 years agoDon't use special heuristics for nodes with no data predecessors
Dan Gohman [Wed, 11 Feb 2009 21:29:39 +0000 (21:29 +0000)]
Don't use special heuristics for nodes with no data predecessors
unless they actually have data successors, and likewise for nodes
with no data successors unless they actually have data precessors.

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

15 years agoAdd FoldingSet profile method for bools. Patch by Ben Laurie!
Ted Kremenek [Wed, 11 Feb 2009 20:53:17 +0000 (20:53 +0000)]
Add FoldingSet profile method for bools.  Patch by Ben Laurie!

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

15 years agoUpdate to match space changes in .ll
Daniel Dunbar [Wed, 11 Feb 2009 20:48:21 +0000 (20:48 +0000)]
Update to match space changes in .ll

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

15 years agoDelete the heuristic for non-livein CopyFromReg nodes. Non-liveinness
Dan Gohman [Wed, 11 Feb 2009 20:25:59 +0000 (20:25 +0000)]
Delete the heuristic for non-livein CopyFromReg nodes. Non-liveinness
is determined by whether the node has a Flag operand. However, if the
node does have a Flag operand, it will be glued to its register's
def, so the heuristic would end up spuriously applying to whatever
node is the def.

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

15 years agoDon't try to set an EFLAGS operand to dead if no instruction was created.
Dan Gohman [Wed, 11 Feb 2009 19:50:24 +0000 (19:50 +0000)]
Don't try to set an EFLAGS operand to dead if no instruction was created.
This fixes a bug introduced by r61215.

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

15 years agoMake a transformation added in 63266 a bit less aggressive.
Dale Johannesen [Wed, 11 Feb 2009 19:19:41 +0000 (19:19 +0000)]
Make a transformation added in 63266 a bit less aggressive.
It was transforming (x&y)==y to (x&y)!=0 in the case where
y is variable and known to have at most one bit set (e.g. z&1).
This is not correct; the expressions are not equivalent when y==0.
I believe this patch salvages what can be salvaged, including
all the cases in bt.ll.  Dan, please review.
Fixes gcc.c-torture/execute/20040709-[12].c

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

15 years agoRevert r64300 and r64301. These were causing the following errors respectively:
Bill Wendling [Wed, 11 Feb 2009 18:19:24 +0000 (18:19 +0000)]
Revert r64300 and r64301. These were causing the following errors respectively:

During llvm-gcc bootstrap:

Undefined symbols:
  "llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from:
      (anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&)
        in libLLVMipa.a(CallGraphSCCPass.o)
  "llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from:
      (anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&)
        in libLLVMipa.a(CallGraphSCCPass.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1

During an LLVM release build:

/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction names with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction information with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td assembly writer with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Compiling InstructionCombining.cpp for Release build
if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3  -fno-exceptions  -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter  -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \
           then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans

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

15 years agoRevert r64299: it breaks the build when configured
Duncan Sands [Wed, 11 Feb 2009 13:23:49 +0000 (13:23 +0000)]
Revert r64299: it breaks the build when configured
without --enable-pic, like my nightly tester.

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

15 years agoThese uses of "inline" can cause strange link-time
Duncan Sands [Wed, 11 Feb 2009 12:25:15 +0000 (12:25 +0000)]
These uses of "inline" can cause strange link-time
failures when building with optimization.  Just get
rid of them.

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

15 years agoMake sure the SCC pass manager initializes any contained
Duncan Sands [Wed, 11 Feb 2009 09:58:43 +0000 (09:58 +0000)]
Make sure the SCC pass manager initializes any contained
function pass managers.  Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.

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

15 years agoTry this. Darwin -> LTO, PIC -> LTO + possibly gold too.
Nick Lewycky [Wed, 11 Feb 2009 08:44:13 +0000 (08:44 +0000)]
Try this. Darwin -> LTO, PIC -> LTO + possibly gold too.

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

15 years agoImplement PR3495: local spiller optimization. The local spiller can now keep availabi...
Evan Cheng [Wed, 11 Feb 2009 08:24:21 +0000 (08:24 +0000)]
Implement PR3495: local spiller optimization. The local spiller can now keep availability information over BB boundaries. It visits BB's in depth first order. After visiting a BB if it find a successor which has a single predecessor it visits the successor next without clearing the availability information. This allows the successor to omit reloads or change them into copies.

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

15 years agoWhen scheduling a block in parts, keep track of the overall
Dan Gohman [Wed, 11 Feb 2009 04:27:20 +0000 (04:27 +0000)]
When scheduling a block in parts, keep track of the overall
instruction index across each part. Instruction indices are used
to make live range queries, and live ranges can extend beyond
scheduling region boundaries.

Refactor the ScheduleDAGSDNodes class some more so that it
doesn't have to worry about this additional information.

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

15 years ago62987 disables LTO build on darwin.
Devang Patel [Wed, 11 Feb 2009 02:34:33 +0000 (02:34 +0000)]
62987 disables LTO build on darwin.
Revert 62987 for now. Nicolas please investigate.

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

15 years agoIf llvm.dbg.region.end is disappearing then remove corresponding llvm.dbg.func.start...
Devang Patel [Wed, 11 Feb 2009 01:29:06 +0000 (01:29 +0000)]
If llvm.dbg.region.end is disappearing then remove corresponding llvm.dbg.func.start also.

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

15 years agoDon't print extra spaces in vector and array constants. This makes
Dan Gohman [Wed, 11 Feb 2009 00:25:25 +0000 (00:25 +0000)]
Don't print extra spaces in vector and array constants. This makes
them visually more consistent with vector and array types.

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

15 years agoIt isn't necessary to explicitly clear the contents of std::vector
Dan Gohman [Wed, 11 Feb 2009 00:18:15 +0000 (00:18 +0000)]
It isn't necessary to explicitly clear the contents of std::vector
and DenseMap members in a destructor. And tidy up a comment.

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

15 years agoDon't try to strip a file we just moved.
Bill Wendling [Wed, 11 Feb 2009 00:14:53 +0000 (00:14 +0000)]
Don't try to strip a file we just moved.

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

15 years agoUse iterators to iterate through the Preds array instead of
Dan Gohman [Wed, 11 Feb 2009 00:12:28 +0000 (00:12 +0000)]
Use iterators to iterate through the Preds array instead of
an index. This code is on the hot-path because the current
way SDep edges are uniqued has quadratic complexity.

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

15 years agoConsider any instruction that modifies the stack pointer to be
Dan Gohman [Tue, 10 Feb 2009 23:29:38 +0000 (23:29 +0000)]
Consider any instruction that modifies the stack pointer to be
a scheduling region boundary.  This isn't necessary for
correctness; it helps with compile time, as it avoids the need
for data- and anti-dependencies from all spills and reloads on
the stack-pointer modification.

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

15 years agoFactor out more code for computing register live-range informationfor
Dan Gohman [Tue, 10 Feb 2009 23:27:53 +0000 (23:27 +0000)]
Factor out more code for computing register live-range informationfor
scheduling, and generalize is so that preserves state across
scheduling regions. This fixes incorrect live-range information around
terminators and labels, which are effective region boundaries.

In place of looking for terminators to anchor inter-block dependencies,
introduce special entry and exit scheduling units for this purpose.

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

15 years agoIgnore dbg intrinsic while folding unconditional branch.
Devang Patel [Tue, 10 Feb 2009 22:14:17 +0000 (22:14 +0000)]
Ignore dbg intrinsic while folding unconditional branch.

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

15 years agoHandle llvm.x86.sse2.maskmov.dqu in 64-bit.
Evan Cheng [Tue, 10 Feb 2009 22:06:28 +0000 (22:06 +0000)]
Handle llvm.x86.sse2.maskmov.dqu in 64-bit.

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

15 years ago80 col violations.
Evan Cheng [Tue, 10 Feb 2009 21:39:44 +0000 (21:39 +0000)]
80 col violations.

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

15 years agoThis is now done using a real i33, rather than
Duncan Sands [Tue, 10 Feb 2009 20:44:15 +0000 (20:44 +0000)]
This is now done using a real i33, rather than
an emulated one.  Adjust the check.

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

15 years agoUse early exits. Reduce indentation.
Devang Patel [Tue, 10 Feb 2009 19:28:07 +0000 (19:28 +0000)]
Use early exits. Reduce indentation.

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

15 years agoUse const, to support platforms where strrchr returns a const char *.
Dan Gohman [Tue, 10 Feb 2009 17:56:28 +0000 (17:56 +0000)]
Use const, to support platforms where strrchr returns a const char *.
This fixes PR3535.

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

15 years agoAnswer a common FAQ:
Dan Gohman [Tue, 10 Feb 2009 17:26:53 +0000 (17:26 +0000)]
Answer a common FAQ:
"Can I compile C or C++ code to platform-independent LLVM bitcode?"

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

15 years agoPacify gcc-4.3 (thinks IsConstant may be used
Duncan Sands [Tue, 10 Feb 2009 16:24:55 +0000 (16:24 +0000)]
Pacify gcc-4.3 (thinks IsConstant may be used
uninitialized).

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

15 years agoFix PR3457: Ignore control successors when looking for closest scheduled successor...
Evan Cheng [Tue, 10 Feb 2009 08:30:11 +0000 (08:30 +0000)]
Fix PR3457: Ignore control successors when looking for closest scheduled successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated.

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

15 years ago Do not clone llvm.dbg.func.start and corresponding llvm.dbg.region.end during inlining.
Devang Patel [Tue, 10 Feb 2009 07:48:18 +0000 (07:48 +0000)]
 Do not clone llvm.dbg.func.start and corresponding llvm.dbg.region.end during inlining.

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

15 years agoEnable scalar replacement of AllocaInst whose one of the user is dbg info.
Devang Patel [Tue, 10 Feb 2009 07:00:59 +0000 (07:00 +0000)]
Enable scalar replacement of AllocaInst whose one of the user is dbg info.

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

15 years agoValidate file id.
Devang Patel [Tue, 10 Feb 2009 06:04:08 +0000 (06:04 +0000)]
Validate file id.

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

15 years agoFunction temporaries can not overlap with retval or args.See the comment in source...
Sanjiv Gupta [Tue, 10 Feb 2009 04:20:26 +0000 (04:20 +0000)]
Function temporaries can not overlap with retval or args.See the comment in source code to know the reason. Anything having .auto. in its name is local to a function in nature irrespective of the linkage specified. print static local variables in module level IDATA section.

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

15 years agoImplement FpSET_ST1_*.
Evan Cheng [Mon, 9 Feb 2009 23:32:07 +0000 (23:32 +0000)]
Implement FpSET_ST1_*.

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

15 years agoIf the target cannot issue a copy for the given source and dest registers, abort...
Evan Cheng [Mon, 9 Feb 2009 22:47:36 +0000 (22:47 +0000)]
If the target cannot issue a copy for the given source and dest registers, abort instead of silently continue.

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

15 years agoFix PR 3471, and some cleanups.
Dale Johannesen [Mon, 9 Feb 2009 22:14:15 +0000 (22:14 +0000)]
Fix PR 3471, and some cleanups.

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

15 years agoSimplify code.
Evan Cheng [Mon, 9 Feb 2009 21:01:06 +0000 (21:01 +0000)]
Simplify code.

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

15 years agoMake sure constant subscript is truncated to ptr size if it may not fit.
Evan Cheng [Mon, 9 Feb 2009 20:54:38 +0000 (20:54 +0000)]
Make sure constant subscript is truncated to ptr size if it may not fit.

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

15 years agoincorporate review feedback
Gabor Greif [Mon, 9 Feb 2009 20:27:45 +0000 (20:27 +0000)]
incorporate review feedback

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

15 years agoUse doxygen comment syntax.
Dan Gohman [Mon, 9 Feb 2009 18:12:09 +0000 (18:12 +0000)]
Use doxygen comment syntax.

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

15 years agoUse slightly more correct grammar in error messages.
Dan Gohman [Mon, 9 Feb 2009 17:41:21 +0000 (17:41 +0000)]
Use slightly more correct grammar in error messages.

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

15 years ago80-column violations.
Mikhail Glushenkov [Mon, 9 Feb 2009 17:11:05 +0000 (17:11 +0000)]
80-column violations.

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

15 years agomake sure that BranchInst::getSuccessor() does not assert in cast<>
Gabor Greif [Mon, 9 Feb 2009 15:45:06 +0000 (15:45 +0000)]
make sure that BranchInst::getSuccessor() does not assert in cast<>
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.

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

15 years agoFix comment.
Bill Wendling [Mon, 9 Feb 2009 12:31:40 +0000 (12:31 +0000)]
Fix comment.

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

15 years agoThese function return 'void'. Don't have 'return' return anything.
Bill Wendling [Mon, 9 Feb 2009 12:31:26 +0000 (12:31 +0000)]
These function return 'void'. Don't have 'return' return anything.

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

15 years agofix typo, patch by Jonathan Brandmeyer!
Chris Lattner [Mon, 9 Feb 2009 10:00:56 +0000 (10:00 +0000)]
fix typo, patch by Jonathan Brandmeyer!

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

15 years agoTestcase for PR2437.
Duncan Sands [Mon, 9 Feb 2009 09:41:49 +0000 (09:41 +0000)]
Testcase for PR2437.

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

15 years agoRe-enable machine sinking pass now that the coalescer bugs and the AnalyzeBrnach...
Evan Cheng [Mon, 9 Feb 2009 08:45:39 +0000 (08:45 +0000)]
Re-enable machine sinking pass now that the coalescer bugs and the AnalyzeBrnach bug are fixed.

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

15 years agoFix another case ShortenDeadCopySrcLiveRange is shortening too much. No test case...
Evan Cheng [Mon, 9 Feb 2009 08:37:45 +0000 (08:37 +0000)]
Fix another case ShortenDeadCopySrcLiveRange is shortening too much. No test case possible since I don't know what to grep for. :-(

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

15 years agoTurns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
Evan Cheng [Mon, 9 Feb 2009 07:14:22 +0000 (07:14 +0000)]
Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
suprise to some callers, e.g. register coalescer. For now, add an parameter
that tells AnalyzeBranch whether it's safe to modify the mbb. A better
solution is out there, but I don't have time to deal with it right now.

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

15 years agoStrip the LTO dylib.
Bill Wendling [Mon, 9 Feb 2009 06:42:40 +0000 (06:42 +0000)]
Strip the LTO dylib.

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

15 years agoSmall fix for the 'strip' command. Do a list of .so files.
Bill Wendling [Mon, 9 Feb 2009 04:01:11 +0000 (04:01 +0000)]
Small fix for the 'strip' command. Do a list of .so files.

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

15 years agoEliminate a 'control reaches end of non-void function' warning.
Evan Cheng [Mon, 9 Feb 2009 03:07:24 +0000 (03:07 +0000)]
Eliminate a 'control reaches end of non-void function' warning.

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

15 years agoDon't run 'strip' on files that aren't there.
Bill Wendling [Mon, 9 Feb 2009 02:18:35 +0000 (02:18 +0000)]
Don't run 'strip' on files that aren't there.

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

15 years agoRemove warnings about not being able to delete something. Don't run lipo on gccas...
Bill Wendling [Mon, 9 Feb 2009 02:13:33 +0000 (02:13 +0000)]
Remove warnings about not being able to delete something. Don't run lipo on gccas, gccld, and llvm-config scripts.

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

15 years agomention rdynamic, PR3431, patch by Stein Roger Skafløtten!
Chris Lattner [Mon, 9 Feb 2009 00:04:40 +0000 (00:04 +0000)]
mention rdynamic, PR3431, patch by Stein Roger Skafløtten!

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

15 years agoDocument llvm.umul.with.overflow indicating that it's badly broken and not intended...
Bill Wendling [Sun, 8 Feb 2009 23:00:09 +0000 (23:00 +0000)]
Document llvm.umul.with.overflow indicating that it's badly broken and not intended for use.

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

15 years agoRename dg.exp to llvmc.exp. This is so I can ignore it during a make check if I want to.
Bill Wendling [Sun, 8 Feb 2009 22:52:50 +0000 (22:52 +0000)]
Rename dg.exp to llvmc.exp. This is so I can ignore it during a make check if I want to.

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

15 years ago80-column violation.
Mikhail Glushenkov [Sun, 8 Feb 2009 22:48:07 +0000 (22:48 +0000)]
80-column violation.

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

15 years agoAdd a Sleep() function.
Mikhail Glushenkov [Sun, 8 Feb 2009 22:47:39 +0000 (22:47 +0000)]
Add a Sleep() function.

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

15 years agoI can't type today apparently.
Chris Lattner [Sun, 8 Feb 2009 22:21:28 +0000 (22:21 +0000)]
I can't type today apparently.

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

15 years agoAdd Emacs hints to Alarm.inc.
Mikhail Glushenkov [Sun, 8 Feb 2009 21:10:57 +0000 (21:10 +0000)]
Add Emacs hints to Alarm.inc.

Also removes some trailing whitespace and fixes one 80-column violation.

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

15 years agoadd a note.
Chris Lattner [Sun, 8 Feb 2009 20:44:19 +0000 (20:44 +0000)]
add a note.

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

15 years agofix typo
Chris Lattner [Sun, 8 Feb 2009 20:00:15 +0000 (20:00 +0000)]
fix typo

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

15 years agofix typo
Chris Lattner [Sun, 8 Feb 2009 19:59:51 +0000 (19:59 +0000)]
fix typo

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

15 years agoreject void pointers with a nice error:
Chris Lattner [Sun, 8 Feb 2009 19:56:22 +0000 (19:56 +0000)]
reject void pointers with a nice error:

llvm-as: t.ll:2:15: pointers to void are invalid, use i8* instead
%X = type void*
              ^

instead of asserting and dying.

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

15 years agodocument pointer type constraints, PR3513
Chris Lattner [Sun, 8 Feb 2009 19:53:29 +0000 (19:53 +0000)]
document pointer type constraints, PR3513

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

15 years agoThe 'false.c' test must depend on llvm-g++.
Mikhail Glushenkov [Sun, 8 Feb 2009 11:44:37 +0000 (11:44 +0000)]
The 'false.c' test must depend on llvm-g++.

Also, turn on Objective-C/C++ tests.
This should fix http://llvm.org/bugs/show_bug.cgi?id=3499.

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

15 years agoFix PR3486. Fix a bug in code that manually patch physical register live interval...
Evan Cheng [Sun, 8 Feb 2009 11:04:35 +0000 (11:04 +0000)]
Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register.

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

15 years agoStrengthen the previous check.
Evan Cheng [Sun, 8 Feb 2009 08:24:28 +0000 (08:24 +0000)]
Strengthen the previous check.

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

15 years agor64073 commit message is lost. Here it is:
Evan Cheng [Sun, 8 Feb 2009 08:00:36 +0000 (08:00 +0000)]
r64073 commit message is lost. Here it is:
Right now if the coalesced copy def is dead and its src is a kill, and that
there are now other uses within the live range, the coalescer would mark the
def of the source register as dead. But it should also check if there are
other kills which means the value has other uses not in the live range.

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

15 years agogit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64073 91177308-0d34-0410...
Evan Cheng [Sun, 8 Feb 2009 07:48:37 +0000 (07:48 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64073 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixes from feedback.
Bill Wendling [Sun, 8 Feb 2009 04:04:40 +0000 (04:04 +0000)]
Fixes from feedback.

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

15 years agoDocument the 'llvm.OP.with.overflow' intrinsics.
Bill Wendling [Sun, 8 Feb 2009 01:40:31 +0000 (01:40 +0000)]
Document the 'llvm.OP.with.overflow' intrinsics.

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

15 years agoMistakenly turned this on.
Bill Wendling [Sun, 8 Feb 2009 01:32:00 +0000 (01:32 +0000)]
Mistakenly turned this on.

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

15 years agoRevert r63999. It was breaking self-hosting builds.
Bill Wendling [Sun, 8 Feb 2009 00:58:05 +0000 (00:58 +0000)]
Revert r63999. It was breaking self-hosting builds.

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