oota-llvm.git
15 years agoAvoid referring to edge D after the Succs or Preds arrays have
Dan Gohman [Tue, 13 Jan 2009 19:08:45 +0000 (19:08 +0000)]
Avoid referring to edge D after the Succs or Preds arrays have
been modified, to avoid trouble in the (unlikely) scenario that
D is a reference to an element in one of those arrays.

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

15 years agoWhen replacing uses and the same node is reached
Duncan Sands [Tue, 13 Jan 2009 15:17:14 +0000 (15:17 +0000)]
When replacing uses and the same node is reached
via two paths, process it once not twice, d'oh!
Analysis, testcase and original patch thanks to
Mon Ping Wang.

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

15 years agoMark this XFAIL for the moment.
Duncan Sands [Tue, 13 Jan 2009 15:15:46 +0000 (15:15 +0000)]
Mark this XFAIL for the moment.

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

15 years agoFix some typos. Also, the WidenedVectors map
Duncan Sands [Tue, 13 Jan 2009 14:42:39 +0000 (14:42 +0000)]
Fix some typos.  Also, the WidenedVectors map
was not being cleaned by ExpungeNode.

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

15 years agoCorrect a comment - this is not a sign extension.
Duncan Sands [Tue, 13 Jan 2009 14:04:14 +0000 (14:04 +0000)]
Correct a comment - this is not a sign extension.

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

15 years agoCorrect a comment.
Duncan Sands [Tue, 13 Jan 2009 13:48:44 +0000 (13:48 +0000)]
Correct a comment.

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

15 years agoWind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,
Nick Lewycky [Tue, 13 Jan 2009 09:18:58 +0000 (09:18 +0000)]
Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,
PR3296 and PR3302.

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

15 years agoadd a new insertAfter method, patch by Tom Jablin!
Chris Lattner [Tue, 13 Jan 2009 07:43:51 +0000 (07:43 +0000)]
add a new insertAfter method, patch by Tom Jablin!

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

15 years agomake -march=cpp handle the nocapture attribute, make it assert if it
Chris Lattner [Tue, 13 Jan 2009 07:22:22 +0000 (07:22 +0000)]
make -march=cpp handle the nocapture attribute, make it assert if it
sees attributes it doesn't know.

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

15 years agoUn-tabify.
Evan Cheng [Tue, 13 Jan 2009 06:08:37 +0000 (06:08 +0000)]
Un-tabify.

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

15 years agoFix fallout from r62144. Evan, please double check this.
Owen Anderson [Tue, 13 Jan 2009 06:05:10 +0000 (06:05 +0000)]
Fix fallout from r62144.  Evan, please double check this.

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

15 years agoFIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical...
Evan Cheng [Tue, 13 Jan 2009 03:57:45 +0000 (03:57 +0000)]
FIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical register, it's not necessarily defined by a copy. We have to watch out it doesn't clobber any sub-register that might be live during its live interval. If the live interval crosses a basic block, then it's not safe to check with the less conservative check (by scanning uses and defs) because it's possible a sub-register might be live out of the block.

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

15 years agoUse DebugInfo interface to lower dbg_* intrinsics.
Devang Patel [Tue, 13 Jan 2009 00:35:13 +0000 (00:35 +0000)]
Use DebugInfo interface to lower dbg_* intrinsics.

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

15 years agoUse DebugInfo interface to lower dbg_* intrinsics.
Devang Patel [Tue, 13 Jan 2009 00:32:17 +0000 (00:32 +0000)]
Use DebugInfo interface to lower dbg_* intrinsics.

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

15 years agoStart using DebugInfo API to emit debug info.
Devang Patel [Tue, 13 Jan 2009 00:20:51 +0000 (00:20 +0000)]
Start using DebugInfo API to emit debug info.

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

15 years agoDocument several current CodeGen limitations in LangRef.html.
Dan Gohman [Mon, 12 Jan 2009 23:12:39 +0000 (23:12 +0000)]
Document several current CodeGen limitations in LangRef.html.
Patches for any of these are welcome!

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

15 years agoEmit debug info, only if at least one compile unit is seen.
Devang Patel [Mon, 12 Jan 2009 23:09:42 +0000 (23:09 +0000)]
Emit debug info, only if at least one compile unit is seen.

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

15 years agoIf multiple compile units are seen then emit them independently. In other words,...
Devang Patel [Mon, 12 Jan 2009 23:05:55 +0000 (23:05 +0000)]
If multiple compile units are seen then emit them independently. In other words, do not force all DIEs into first, whatever it is, compile unit.

Note, multiple compile unit support is not well tested (it did not work correctly until now anyway.)

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

15 years agoAvoid cast<>, use light weith wrapper directly.
Devang Patel [Mon, 12 Jan 2009 22:58:14 +0000 (22:58 +0000)]
Avoid cast<>, use light weith wrapper directly.

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

15 years agoUse SrcLineInfo from DwarfWriter. The MachineModuleInfo copy will disappear soon.
Devang Patel [Mon, 12 Jan 2009 22:54:42 +0000 (22:54 +0000)]
Use SrcLineInfo from DwarfWriter. The MachineModuleInfo copy will disappear soon.

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

15 years agoEnable recursive inlining. Reduce inlining threshold
Dale Johannesen [Mon, 12 Jan 2009 22:11:50 +0000 (22:11 +0000)]
Enable recursive inlining.  Reduce inlining threshold
back to 200; 400 seems to be too high, loses more than
it gains.

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

15 years agoAdd classof() methods to support isa<> and other related facilities.
Devang Patel [Mon, 12 Jan 2009 21:38:43 +0000 (21:38 +0000)]
Add classof() methods to support isa<> and other related facilities.

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

15 years agoThe LLVM Assembly Language Reference incorrectly stated that the
Dan Gohman [Mon, 12 Jan 2009 21:35:55 +0000 (21:35 +0000)]
The LLVM Assembly Language Reference incorrectly stated that the
prefix used for dll{import,export} is _imp__; it is actually __imp_.
Patch by Mahadevan R!

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

15 years agoFix the instructions to work even when PATH does not contain ".".
Dan Gohman [Mon, 12 Jan 2009 21:29:24 +0000 (21:29 +0000)]
Fix the instructions to work even when PATH does not contain ".".
Thanks to Martin Geisse for pointing this out!

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

15 years agoRename getABITypeSize to getTypePaddedSize, as
Duncan Sands [Mon, 12 Jan 2009 20:38:59 +0000 (20:38 +0000)]
Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.

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

15 years agoAdd DwarfWriter interface to mainipulate source location info.
Devang Patel [Mon, 12 Jan 2009 19:17:34 +0000 (19:17 +0000)]
Add DwarfWriter interface to mainipulate source location info.
( May be this info should be directly handled by the dwarf writer ? )

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

15 years agoremove some dead options.
Chris Lattner [Mon, 12 Jan 2009 19:02:50 +0000 (19:02 +0000)]
remove some dead options.

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

15 years agoClear debug info at the end of function processing.
Devang Patel [Mon, 12 Jan 2009 18:48:36 +0000 (18:48 +0000)]
Clear debug info at the end of function processing.

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

15 years agoThere is no need to maintain separate labelid list in the dwarf writer. It is not...
Devang Patel [Mon, 12 Jan 2009 18:41:00 +0000 (18:41 +0000)]
There is no need to maintain separate labelid list in the dwarf writer. It is not a good idea.

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

15 years agoRemove some dead code from the days llvm had type planes.
Rafael Espindola [Mon, 12 Jan 2009 15:53:25 +0000 (15:53 +0000)]
Remove some dead code from the days  llvm had type planes.

There might be more dead code, but with llvm-gcc bootstrap broken on linux x86-64 it is had to test :-(

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

15 years agoSecond test is only valid in 32-bit mode.
Evan Cheng [Mon, 12 Jan 2009 08:05:54 +0000 (08:05 +0000)]
Second test is only valid in 32-bit mode.

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

15 years agoTest for r62076.
Evan Cheng [Mon, 12 Jan 2009 03:46:55 +0000 (03:46 +0000)]
Test for r62076.

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

15 years agoFix PR3241: Currently EmitCopyFromReg emits a copy from the physical register to...
Evan Cheng [Mon, 12 Jan 2009 03:19:55 +0000 (03:19 +0000)]
Fix PR3241: Currently EmitCopyFromReg emits a copy from the physical register to a virtual register unless it requires an expensive cross class copy. That means we are only treating "expensive to copy" register dependency as physical register dependency.
Also future proof the scheduler to handle "normal" physical register dependencies. The code is not exercised yet.

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

15 years agoMore two-address fixes. This gets lua working with join-creation enabled.
Owen Anderson [Mon, 12 Jan 2009 03:10:40 +0000 (03:10 +0000)]
More two-address fixes.  This gets lua working with join-creation enabled.

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

15 years agomake tblgen autogenerate the nocapture intrinsics for
Chris Lattner [Mon, 12 Jan 2009 02:41:37 +0000 (02:41 +0000)]
make tblgen autogenerate the nocapture intrinsics for
llvm.memcpy/memset/memmove.  This allows removal of some
hackish code from basicaa.

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

15 years agoadd scaffolding to emit argument attributes. No functionality
Chris Lattner [Mon, 12 Jan 2009 01:27:55 +0000 (01:27 +0000)]
add scaffolding to emit argument attributes.  No functionality
change.

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

15 years agomake tblgen emit the entire Intrinsic::getAttributes method,
Chris Lattner [Mon, 12 Jan 2009 01:18:58 +0000 (01:18 +0000)]
make tblgen emit the entire Intrinsic::getAttributes method,
not a random piece of it.  No functionality change.

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

15 years agoadd nocapture attribute to llvm.mem* intrinsics and have tblgen
Chris Lattner [Mon, 12 Jan 2009 01:12:03 +0000 (01:12 +0000)]
add nocapture attribute to llvm.mem* intrinsics and have tblgen
parse them.  tblgen doesn't yet do anything with this info though.

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

15 years agoIncrease default inlining aggressiveness in partial
Dale Johannesen [Sun, 11 Jan 2009 23:11:00 +0000 (23:11 +0000)]
Increase default inlining aggressiveness in partial
compensation for turning off gcc's inliner.  This gets
us closer to the amount of inlining we were getting before.
It is not a win on everything, of course, but seems to
gain overall.

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

15 years agodrats! remove tabs
Gabor Greif [Sun, 11 Jan 2009 22:39:04 +0000 (22:39 +0000)]
drats! remove tabs

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

15 years agosimplify CallSite helper class to not consult the Instruction's
Gabor Greif [Sun, 11 Jan 2009 22:33:22 +0000 (22:33 +0000)]
simplify CallSite helper class to not consult the Instruction's
opcode on each delegation.
Instead the information is cached on construction and the cached flag used thereafter.
Introduced two predicates: isCall and isInvoke.

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

15 years agoImplement PR3313, and while I'm at it address a very FAQ.
Chris Lattner [Sun, 11 Jan 2009 20:53:49 +0000 (20:53 +0000)]
Implement PR3313, and while I'm at it address a very FAQ.

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

15 years agoDuncan is nervous about undefinedness of % with negatives. I'm
Chris Lattner [Sun, 11 Jan 2009 20:41:36 +0000 (20:41 +0000)]
Duncan is nervous about undefinedness of % with negatives.  I'm
not thrilled about 64-bit % in general, so rewrite to use * instead.

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

15 years agodo not generated GEPs into vectors where they don't already exist.
Chris Lattner [Sun, 11 Jan 2009 20:23:52 +0000 (20:23 +0000)]
do not generated GEPs into vectors where they don't already exist.
We should treat vectors as atomic types, not like arrays.

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

15 years agoMake a couple of cleanups to the instcombine bitcast/gep
Chris Lattner [Sun, 11 Jan 2009 20:15:20 +0000 (20:15 +0000)]
Make a couple of cleanups to the instcombine bitcast/gep
canonicalization transform based on duncan's comments:

1) improve the comment about %.
2) within our index loop make sure the offset stays
   within the *type size*, instead of within the *abi size*.
   This allows us to reason explicitly about landing in tail
   padding and means that issues like non-zero offsets into
   [0 x foo] types don't occur anymore.

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

15 years agoUse the spiffy new getAlignmentFromAttrs function.
Nick Lewycky [Sun, 11 Jan 2009 17:02:06 +0000 (17:02 +0000)]
Use the spiffy new getAlignmentFromAttrs function.

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

15 years agoCheckForPhysRegDependency should not return copy cost. It's not used. No functionalit...
Evan Cheng [Sun, 11 Jan 2009 08:53:35 +0000 (08:53 +0000)]
CheckForPhysRegDependency should not return copy cost. It's not used. No functionality change.

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

15 years agoFix naming of file.
Bill Wendling [Sun, 11 Jan 2009 01:25:51 +0000 (01:25 +0000)]
Fix naming of file.

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

15 years agoFix the example syntax for named sections.
Dan Gohman [Sun, 11 Jan 2009 00:40:00 +0000 (00:40 +0000)]
Fix the example syntax for named sections.

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

15 years agoThis is a dup of pr2659.ll.
Evan Cheng [Sat, 10 Jan 2009 19:06:32 +0000 (19:06 +0000)]
This is a dup of pr2659.ll.

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

15 years agoAdding unittests for SmallVector. Test by Talin.
Bill Wendling [Sat, 10 Jan 2009 12:56:31 +0000 (12:56 +0000)]
Adding unittests for SmallVector. Test by Talin.

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

15 years ago80 col violation.
Evan Cheng [Sat, 10 Jan 2009 03:33:22 +0000 (03:33 +0000)]
80 col violation.

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

15 years agoReduce initial small vector sizes.
Devang Patel [Sat, 10 Jan 2009 02:42:49 +0000 (02:42 +0000)]
Reduce initial small vector sizes.

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

15 years agoFix thinko. Create parent scope if parent descriptor is *not* null.
Devang Patel [Sat, 10 Jan 2009 02:34:18 +0000 (02:34 +0000)]
Fix thinko. Create parent scope if parent descriptor is *not* null.

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

15 years agoDuplicated node may produce a non-physical register def.
Evan Cheng [Fri, 9 Jan 2009 22:44:02 +0000 (22:44 +0000)]
Duplicated node may produce a non-physical register def.

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

15 years agoAdd test case from PR2659.
Evan Cheng [Fri, 9 Jan 2009 21:01:31 +0000 (21:01 +0000)]
Add test case from PR2659.

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

15 years agoMinor debug output tweak.
Evan Cheng [Fri, 9 Jan 2009 20:42:34 +0000 (20:42 +0000)]
Minor debug output tweak.

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

15 years agoThis has been replaced by llvm/utils/lint/cpp_lint.py, which is more
Misha Brukman [Fri, 9 Jan 2009 19:46:41 +0000 (19:46 +0000)]
This has been replaced by llvm/utils/lint/cpp_lint.py, which is more
comprehensive and can support more complex style analysis.

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

15 years agoRemoved trailing whitespace.
Misha Brukman [Fri, 9 Jan 2009 19:25:42 +0000 (19:25 +0000)]
Removed trailing whitespace.

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

15 years agoRequest DwarfWriter. This will be used to handle dbg_* intrinsics.
Devang Patel [Fri, 9 Jan 2009 19:11:50 +0000 (19:11 +0000)]
Request DwarfWriter.  This will be used to handle dbg_* intrinsics.

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

15 years agofix typo Duncan noticed.
Chris Lattner [Fri, 9 Jan 2009 18:31:39 +0000 (18:31 +0000)]
fix typo Duncan noticed.

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

15 years agoFix PR3304
Chris Lattner [Fri, 9 Jan 2009 18:18:43 +0000 (18:18 +0000)]
Fix PR3304

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

15 years agoRemoved trailing whitespace from Makefiles.
Misha Brukman [Fri, 9 Jan 2009 16:44:42 +0000 (16:44 +0000)]
Removed trailing whitespace from Makefiles.

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

15 years agoSupport llvmc plugins in out-of-tree projects.
Mikhail Glushenkov [Fri, 9 Jan 2009 16:31:01 +0000 (16:31 +0000)]
Support llvmc plugins in out-of-tree projects.

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

15 years agoAdd a --check-graph option to llvmc.
Mikhail Glushenkov [Fri, 9 Jan 2009 16:16:27 +0000 (16:16 +0000)]
Add a --check-graph option to llvmc.

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

15 years agoPR2659 was fixed by r61847. Add the testcase as a regression test.
Dan Gohman [Fri, 9 Jan 2009 08:16:12 +0000 (08:16 +0000)]
PR2659 was fixed by r61847. Add the testcase as a regression test.

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

15 years agoImplement rdar://6480391, extending of equality icmp's to avoid a truncation.
Chris Lattner [Fri, 9 Jan 2009 07:47:06 +0000 (07:47 +0000)]
Implement rdar://6480391, extending of equality icmp's to avoid a truncation.
I noticed this in the code compiled for a routine using std::map, which produced
this code:
%25 = tail call i32 @memcmp(i8* %24, i8* %23, i32 6) nounwind readonly
%.lobit.i = lshr i32 %25, 31 ; <i32> [#uses=1]
%tmp.i = trunc i32 %.lobit.i to i8 ; <i8> [#uses=1]
%toBool = icmp eq i8 %tmp.i, 0 ; <i1> [#uses=1]
br i1 %toBool, label %bb3, label %bb4
which compiled to:

call L_memcmp$stub
shrl $31, %eax
testb %al, %al
jne LBB1_11 ##

with this change, we compile it to:

call L_memcmp$stub
testl %eax, %eax
js LBB1_11

This triggers all the time in common code, with patters like this:

%169 = and i32 %ply, 1 ; <i32> [#uses=1]
%170 = trunc i32 %169 to i8 ; <i8> [#uses=1]
%toBool = icmp ne i8 %170, 0 ; <i1> [#uses=1]

  %7 = lshr i32 %6, 24 ; <i32> [#uses=1]
%9 = trunc i32 %7 to i8 ; <i8> [#uses=1]
%10 = icmp ne i8 %9, 0 ; <i1> [#uses=1]

etc

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

15 years agoRemove some old code that looks like a remanant from signed-types days.
Chris Lattner [Fri, 9 Jan 2009 07:10:58 +0000 (07:10 +0000)]
Remove some old code that looks like a remanant from signed-types days.

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

15 years agoFix PR3298, a crash in Jump Threading. Apparently even
Chris Lattner [Fri, 9 Jan 2009 06:08:12 +0000 (06:08 +0000)]
Fix PR3298, a crash in Jump Threading.  Apparently even
jump threading can have bugs, who knew? ;-)

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

15 years agothis doesn't depend on the gcc early inliner anymore.
Chris Lattner [Fri, 9 Jan 2009 05:49:27 +0000 (05:49 +0000)]
this doesn't depend on the gcc early inliner anymore.

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

15 years agoPR3290 is now fixed.
Chris Lattner [Fri, 9 Jan 2009 05:46:19 +0000 (05:46 +0000)]
PR3290 is now fixed.

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

15 years agoFix part 3/2 of PR3290, making instcombine zap (gep(bitcast)) when possible.
Chris Lattner [Fri, 9 Jan 2009 05:44:56 +0000 (05:44 +0000)]
Fix part 3/2 of PR3290, making instcombine zap (gep(bitcast)) when possible.

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

15 years agothis test should not run opt -std-compile-opts, it should run
Chris Lattner [Fri, 9 Jan 2009 05:32:00 +0000 (05:32 +0000)]
this test should not run opt -std-compile-opts, it should run
just llc.

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

15 years agoadd a helper method.
Chris Lattner [Fri, 9 Jan 2009 05:27:40 +0000 (05:27 +0000)]
add a helper method.

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

15 years agofit in 80 cols
Chris Lattner [Fri, 9 Jan 2009 04:58:01 +0000 (04:58 +0000)]
fit in 80 cols

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

15 years agomove some code, check to see if the input to the GEP is a bitcast
Chris Lattner [Fri, 9 Jan 2009 04:53:57 +0000 (04:53 +0000)]
move some code, check to see if the input to the GEP is a bitcast
(which is constant time and cheap) before checking hasAllZeroIndices.

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

15 years agoAdd load-folding table entries for MOVDQA.
Dan Gohman [Fri, 9 Jan 2009 02:40:34 +0000 (02:40 +0000)]
Add load-folding table entries for MOVDQA.

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

15 years agoWhitespace and other minor adjustments to make SSE instructions have
Dan Gohman [Fri, 9 Jan 2009 02:27:34 +0000 (02:27 +0000)]
Whitespace and other minor adjustments to make SSE instructions have
the same formatting as their corresponding SSE2 instructions, for
consistency.

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

15 years agoAdjustments to last patch based on review.
Dale Johannesen [Fri, 9 Jan 2009 01:30:11 +0000 (01:30 +0000)]
Adjustments to last patch based on review.

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

15 years ago61949 accidentally introduced an escaped newline. Fix this by making
Dan Gohman [Thu, 8 Jan 2009 23:51:48 +0000 (23:51 +0000)]
61949 accidentally introduced an escaped newline. Fix this by making
the comment a little more verbose.

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

15 years agoConvert DwarfWriter into a pass.
Devang Patel [Thu, 8 Jan 2009 23:40:34 +0000 (23:40 +0000)]
Convert DwarfWriter into a pass.
Now Users request DwarfWriter through getAnalysisUsage() instead of creating an instance of DwarfWriter object directly.

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

15 years agoDelete unnecessary parens around return values.
Dan Gohman [Thu, 8 Jan 2009 22:19:34 +0000 (22:19 +0000)]
Delete unnecessary parens around return values.

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

15 years agoFix the comment for lltok::backslash.
Dan Gohman [Thu, 8 Jan 2009 22:18:13 +0000 (22:18 +0000)]
Fix the comment for lltok::backslash.

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

15 years agoFix the path to llvm/Assembly/Parser.h in a comment.
Dan Gohman [Thu, 8 Jan 2009 22:17:05 +0000 (22:17 +0000)]
Fix the path to llvm/Assembly/Parser.h in a comment.

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

15 years agoCorrect the form of the atomic opcode names in a comment.
Dan Gohman [Thu, 8 Jan 2009 22:14:50 +0000 (22:14 +0000)]
Correct the form of the atomic opcode names in a comment.

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

15 years agoDo not inline functions with (dynamic) alloca into
Dale Johannesen [Thu, 8 Jan 2009 21:45:23 +0000 (21:45 +0000)]
Do not inline functions with (dynamic) alloca into
functions that don't already have a (dynamic) alloca.
Dynamic allocas cause inefficient codegen and we shouldn't
propagate this (behavior follows gcc).  Two existing tests
assumed such inlining would be done; they are hacked by
adding an alloca in the caller, preserving the point of
the tests.

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

15 years agoUse mayBeOverridden here, in anticipation of the
Duncan Sands [Thu, 8 Jan 2009 20:55:49 +0000 (20:55 +0000)]
Use mayBeOverridden here, in anticipation of the
day when more linkage types will be handled.

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

15 years agoValueTracker can't assume that an alloca with no specified alignment
Chris Lattner [Thu, 8 Jan 2009 19:28:38 +0000 (19:28 +0000)]
ValueTracker can't assume that an alloca with no specified alignment
will get its preferred alignment.  It has to be careful and cautiously assume
it will just get the ABI alignment.  This prevents instcombine from rounding
up the alignment of a load/store without adjusting the alignment of the alloca.

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

15 years agoone more crash from PR3281, we now diagnose:
Chris Lattner [Thu, 8 Jan 2009 19:05:36 +0000 (19:05 +0000)]
one more crash from PR3281, we now diagnose:

llvm-as: t.ll:2:39: function may not return opaque type
  %"bwmoyl" = tail call coldcc opaque @g()
                                      ^

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

15 years agoremove some exclusions that don't exist anymore.
Chris Lattner [Thu, 8 Jan 2009 19:02:03 +0000 (19:02 +0000)]
remove some exclusions that don't exist anymore.

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

15 years agothis testcase is huge and hasn't regressed ever, I don't think it is worth keeping.
Chris Lattner [Thu, 8 Jan 2009 19:01:45 +0000 (19:01 +0000)]
this testcase is huge and hasn't regressed ever, I don't think it is worth keeping.

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

15 years agoAdd DebugInfo based APIs to record source line info.
Devang Patel [Thu, 8 Jan 2009 17:19:22 +0000 (17:19 +0000)]
Add DebugInfo based APIs to record source line info.

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

15 years ago* Moved author attribution to CREDITS.TXT
Misha Brukman [Thu, 8 Jan 2009 16:40:25 +0000 (16:40 +0000)]
* Moved author attribution to CREDITS.TXT
* Removed trailing whitespace

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

15 years ago* Alphabetized #includes
Misha Brukman [Thu, 8 Jan 2009 15:50:22 +0000 (15:50 +0000)]
* Alphabetized #includes
* Removed trailing whitespace

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

15 years agoSome generic clean-ups. Also make the StringMapEntryInitializer specialization apply...
Bill Wendling [Thu, 8 Jan 2009 09:31:36 +0000 (09:31 +0000)]
Some generic clean-ups. Also make the StringMapEntryInitializer specialization apply only to the tests that are actually testing it.

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

15 years ago* Don't explicitly cast "0" to "void*". This doesn't work well with specialized
Bill Wendling [Thu, 8 Jan 2009 08:26:46 +0000 (08:26 +0000)]
* Don't explicitly cast "0" to "void*". This doesn't work well with specialized
 StringMapEntryInitializer classes. Leave it for the compiler to figure out what
 the type is and what "0" should be transformed into.

* Un-disable the unit tests which test the StringMapEntryInitializer class.

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

15 years agothe new scalarrepl changes are optimizing away a temporary alloca in
Chris Lattner [Thu, 8 Jan 2009 07:58:23 +0000 (07:58 +0000)]
the new scalarrepl changes are optimizing away a temporary alloca in
check242, which invalidates this test.  This test is an x86-32 ABI test
that is trying to be run in a target-independent way, which is not going
to work very well.  Just remove the test.

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

15 years ago80-column violation fix.
Bill Wendling [Thu, 8 Jan 2009 07:35:39 +0000 (07:35 +0000)]
80-column violation fix.

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

15 years agoadd some more crazy strlen and memcpy stuff I noticed in spec.
Chris Lattner [Thu, 8 Jan 2009 07:34:55 +0000 (07:34 +0000)]
add some more crazy strlen and memcpy stuff I noticed in spec.

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

15 years agoadd some notes about strlen craziness in eon.
Chris Lattner [Thu, 8 Jan 2009 06:52:57 +0000 (06:52 +0000)]
add some notes about strlen craziness in eon.

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