Evan Cheng [Thu, 23 Apr 2009 20:39:31 +0000 (20:39 +0000)]
Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69919
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 23 Apr 2009 20:18:13 +0000 (20:18 +0000)]
Fix an obvious type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69918
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 19:39:41 +0000 (19:39 +0000)]
Explicitly pass -tailcallopt=false to these tests so that they
work as intended no matter what the default setting of that
option is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69911
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 23 Apr 2009 18:04:04 +0000 (18:04 +0000)]
Testcase for 69795.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69901
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 15:22:28 +0000 (15:22 +0000)]
Fix an error in this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69893
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 15:16:49 +0000 (15:16 +0000)]
Change SCEVExpander's expandCodeFor to provide more flexibility
with the persistent insertion point, and change IndVars to make
use of it. This fixes a bug where IndVars was holding on to a
stale insertion point and forcing the SCEVExpander to continue to
use it.
This fixes PR4038.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69892
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 23 Apr 2009 10:34:58 +0000 (10:34 +0000)]
Banksel immediate constant will always immediately follow the GA/ES, so scan an insn from beginnin to find out the banksel operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69883
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 23 Apr 2009 05:15:08 +0000 (05:15 +0000)]
Simplify trunc(extend(x)) in SCEVs, just for completeness. Also fix some odd
whitespace in the same file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69870
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:33:42 +0000 (04:33 +0000)]
Testcase for PR3909.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69868
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:30:52 +0000 (04:30 +0000)]
Testcase for PR2639.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69867
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:26:42 +0000 (04:26 +0000)]
Testcase for PR2537.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69866
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:24:19 +0000 (04:24 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69865
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:21:14 +0000 (04:21 +0000)]
Testcase for PR3085.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69863
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:14:03 +0000 (04:14 +0000)]
Add testcase from PR3086.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69862
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 00:57:37 +0000 (00:57 +0000)]
Add support for printing MO_ExternalSymbol operands in
memory operand tuples. This doesn't ever come up in normal
code however.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69848
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 00:28:31 +0000 (00:28 +0000)]
Add more ulimit limits, to catch more kinds of runaway behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69847
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 00:15:26 +0000 (00:15 +0000)]
Use the testcase from PR2791.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69846
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 22 Apr 2009 23:39:28 +0000 (23:39 +0000)]
Make sure both operands have binary instructions have the same type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69844
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 22 Apr 2009 23:09:16 +0000 (23:09 +0000)]
A few more places where the check of use_empty is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69842
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 22 Apr 2009 22:45:37 +0000 (22:45 +0000)]
Avoid deferencing use_begin() if value does not have a use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69836
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 22 Apr 2009 22:17:51 +0000 (22:17 +0000)]
Allow defm to inherit from multiple multiclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69832
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 22 Apr 2009 20:18:10 +0000 (20:18 +0000)]
Implement !nameconcat to concatenate strings and look up the resulting
name in the symbol table, returning an object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69822
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 22 Apr 2009 18:55:17 +0000 (18:55 +0000)]
Testcase for PR2958.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69818
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 22 Apr 2009 18:51:05 +0000 (18:51 +0000)]
Fix cut-n-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69816
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 22 Apr 2009 16:42:54 +0000 (16:42 +0000)]
Implement multiclass inheritance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69810
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 16:20:48 +0000 (16:20 +0000)]
Simplify trivial cast-of-cast SCEVs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69809
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 16:11:16 +0000 (16:11 +0000)]
SCEVExpander's InsertCastOfTo knows how to move existing cast
instructions in order to avoid inserting new ones. However, if
the cast instruction is the SCEVExpander's InsertPt, this
causes subsequently emitted instructions to be inserted near
the cast, and not at the location of the original insert point.
Fix this by adjusting the insert point in such cases.
This fixes PR4009.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69808
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 16:05:50 +0000 (16:05 +0000)]
Use BasicBlock::iterator instead of Instruction* for insert points,
to better handle inserting instructions at the end of a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69807
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 16:00:36 +0000 (16:00 +0000)]
Make SCEVExpanders private methods private, instead of protected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69806
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 15:57:18 +0000 (15:57 +0000)]
Use CloneModule's ValueMap in more places, instead of looking
up functions by name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69805
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 15:55:31 +0000 (15:55 +0000)]
ISD::ADD_PARTS is gone; use ISD::SMUL_LOHI as an example instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69804
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 22 Apr 2009 12:02:36 +0000 (12:02 +0000)]
Make the function begin label start after ther data pointer.
The address of data frame for function can be obtained by subtracting 2 from the function begin label.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69801
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 22 Apr 2009 10:39:51 +0000 (10:39 +0000)]
These tests are x86 specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69798
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 Apr 2009 08:50:12 +0000 (08:50 +0000)]
Real fix for PR3549, by using caching for predecessor counts in addition to the predecessors themselves. This halves the time
to optimize the testcase, beyond what my previous patch did.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69792
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 Apr 2009 08:46:33 +0000 (08:46 +0000)]
Add caching of predecessor counts as well as predecessors themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69791
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 Apr 2009 08:09:13 +0000 (08:09 +0000)]
Use PredIteratorCache in LCSSA, which gives a 37% overall speedup on the testcase from PR3549. More improvements to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69788
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 Apr 2009 07:16:54 +0000 (07:16 +0000)]
Fix for PR3946, in which SmallVector could behave strangely in corner cases.
Patch by Peter Johnson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69785
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 21 Apr 2009 23:37:18 +0000 (23:37 +0000)]
use predicate instead of hand-rolled loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69752
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 23:15:49 +0000 (23:15 +0000)]
De-pImpl-ify ScalarEvolution. The pImpl pattern doesn't provide much
practical benefit in the case of ScalarEvolution, and it's otherwise
a nuisance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69749
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 21 Apr 2009 22:46:52 +0000 (22:46 +0000)]
It has finally happened. Spiller is now using live interval info.
This fixes a very subtle bug. vr defined by an implicit_def is allowed overlap with any register since it doesn't actually modify anything. However, if it's used as a two-address use, its live range can be extended and it can be spilled. The spiller must take care not to emit a reload for the vn number that's defined by the implicit_def. This is both a correctness and performance issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69743
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 20:18:36 +0000 (20:18 +0000)]
When turning (ashr(shl(x, n), n)) into sext(trunc(x)), the width of the
type to truncate to should be the number of bits of the value that are
preserved, not the number that are clobbered with sign-extension.
This fixes regressions in ldecod.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69704
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 21 Apr 2009 19:46:10 +0000 (19:46 +0000)]
Support --with-llvmgccdir and friends in llvmc, take 2.
Should now work when building with objdir != srcdir and when llvm-gcc is not
available.
Thanks to Duncan Sands for testing and advice!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69700
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 21 Apr 2009 17:21:01 +0000 (17:21 +0000)]
Test case for revision 69683.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69684
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 21 Apr 2009 16:52:12 +0000 (16:52 +0000)]
fix a crash on a pointless but valid zero-length memset, rdar://
6808691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69680
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 21 Apr 2009 16:04:56 +0000 (16:04 +0000)]
Silence warnings.
Patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69679
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 21 Apr 2009 16:04:41 +0000 (16:04 +0000)]
Drop obsolete reference to __eprintf.
Patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69678
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 21 Apr 2009 16:04:14 +0000 (16:04 +0000)]
'The "or die" is intended to catch the case where nm returned a
non-zero exit status, so nm will already have printed some error
messages.'
Patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69677
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Apr 2009 09:44:39 +0000 (09:44 +0000)]
Get rid of what looks like a copy-and-pasted typo.
Spotted by gcc-4.5.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69673
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Apr 2009 08:22:09 +0000 (08:22 +0000)]
TLS_addr64 and TLS_addr32 define RDI and EAX. They don't use them.
This fixes PR4002.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69672
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 21 Apr 2009 05:54:51 +0000 (05:54 +0000)]
Handle direct aggregate type arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69665
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 02:26:00 +0000 (02:26 +0000)]
Teach ScalarEvolution how to recognize zext-inreg and sext-inreg,
as they appear in LLVM IR. This isn't particularly interesting
on its own; this is just setting up some infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69655
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 01:41:18 +0000 (01:41 +0000)]
This FIXME is fixed, now that SCEV understands pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69651
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 01:25:57 +0000 (01:25 +0000)]
Factor out a common base class from SCEVTruncateExpr, SCEVZeroExtendExpr,
and SCEVSignExtendExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69649
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 01:11:19 +0000 (01:11 +0000)]
Usage getAnalysisToUpdate for TargetData, per PR760.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69645
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 01:07:12 +0000 (01:07 +0000)]
Introduce encapsulation for ScalarEvolution's TargetData object, and refactor
the code to minimize dependencies on TargetData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69644
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 00:55:22 +0000 (00:55 +0000)]
Move some assertion checks so they can do more complete checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69643
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 00:47:46 +0000 (00:47 +0000)]
Convert ScalarEvolution to use raw_ostream instead of OStream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69640
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 21 Apr 2009 00:08:56 +0000 (00:08 +0000)]
Fix Visual Studio 2008 build failure.
Patch by Marius Wachtler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69637
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 22:54:34 +0000 (22:54 +0000)]
Make X86's copyRegToReg able to handle copies to and from subclasses.
This makes the extra copyRegToReg calls in ScheduleDAGSDNodesEmit.cpp
unnecessary. Derived from a patch by Jakob Stoklund Olesen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69635
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 22:51:43 +0000 (22:51 +0000)]
Simplify this code. getConstant knows how to make
broadcasted vector constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69634
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 20 Apr 2009 22:49:59 +0000 (22:49 +0000)]
No, we are not avoiding -O3, just -fstrict-aliasing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69633
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 20 Apr 2009 22:19:33 +0000 (22:19 +0000)]
Adjust loop size estimate for full unrolling;
GEP's don't usually become instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69631
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 20 Apr 2009 22:16:40 +0000 (22:16 +0000)]
One Mac OS X, just build with -O3 but without -fstrict-aliasing (which is kinda broken).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69630
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 20:50:13 +0000 (20:50 +0000)]
Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:
clang: error: unable to make temporary file: /etc/cc: can't make
unique filename: Permission denied
instead of
clang: error: unable to make temporary file: /etc/cc: can't make
unique filenamePermission denied
for example.
Also, audited the uses of MakeErrMsg to make the prefix strings
consistent (not end with newline/punctuation/space/": ").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69626
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 20:34:38 +0000 (20:34 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69624
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 20 Apr 2009 18:36:57 +0000 (18:36 +0000)]
Move duplicated AddLiveIn function from X86 and ARM backends to be a method
in the MachineFunction class, renaming it to addLiveIn for consistency with
the same method in MachineBasicBlock. Thanks for Anton for suggesting this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69615
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 20 Apr 2009 18:07:22 +0000 (18:07 +0000)]
Match C backend only if it explicitly requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69613
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Mon, 20 Apr 2009 17:48:16 +0000 (17:48 +0000)]
Remove clang since its conditionally there already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69610
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 20 Apr 2009 17:27:09 +0000 (17:27 +0000)]
Revise my previous change 68996 as suggested by Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69607
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 20 Apr 2009 17:23:48 +0000 (17:23 +0000)]
- Remove an arbitrary spill weight tweak that should not have been there.
- Find more reloads from SS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69606
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Mon, 20 Apr 2009 16:59:35 +0000 (16:59 +0000)]
Emit the auto variables of a function into a different section than parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69605
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 16:26:25 +0000 (16:26 +0000)]
It's not necessary for PrintModulePass to flush the output streams
now that errs() is properly non-buffered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69602
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 16:19:02 +0000 (16:19 +0000)]
Use .empty() instead of .size().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69599
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 16:10:33 +0000 (16:10 +0000)]
Don't discard an AssemblyAnnotationWriter when writing GlobalValues,
which include Functions, where it can be quite useful to use an
AssemblyAnnotationWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69598
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 20 Apr 2009 16:03:21 +0000 (16:03 +0000)]
These bitfields were being miscompiled on some
64 bit platforms when building with optimization.
So replace them by a hand-coded implementation.
This fixes PR3822.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69597
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 15:55:38 +0000 (15:55 +0000)]
Implement operator<<(raw_ostream &OS, const Type &T).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 20 Apr 2009 08:01:12 +0000 (08:01 +0000)]
Added a linearscan register allocation optimization. When the register allocator spill an interval with multiple uses in the same basic block, it creates a different virtual register for each of the reloads. e.g.
%reg1498<def> = MOV32rm %reg1024, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0]
%reg1506<def> = MOV32rm %reg1024, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0]
%reg1486<def> = MOV32rr %reg1506
%reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead>
%reg1510<def> = MOV32rm %reg1024, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0]
=>
%reg1498<def> = MOV32rm %reg2036, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0]
%reg1506<def> = MOV32rm %reg2037, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0]
%reg1486<def> = MOV32rr %reg1506
%reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead>
%reg1510<def> = MOV32rm %reg2038, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0]
From linearscan's point of view, each of reg2036, 2037, and 2038 are separate registers, each is "killed" after a single use. The reloaded register is available and it's often clobbered right away. e.g. In thise case reg1498 is allocated EAX while reg2036 is allocated RAX. This means we end up with multiple reloads from the same stack slot in the same basic block.
Now linearscan recognize there are other reloads from same SS in the same BB. So it'll "downgrade" RAX (and its aliases) after reg2036 is allocated until the next reload (reg2037) is done. This greatly increase the likihood reloads from SS are reused.
This speeds up sha1 from OpenSSL by 5.8%. It is also an across the board win for SPEC2000 and 2006.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69585
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 20 Apr 2009 07:34:17 +0000 (07:34 +0000)]
Make all raw_ostreams support the tell() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69583
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Mon, 20 Apr 2009 06:05:54 +0000 (06:05 +0000)]
Before trying to introduce/eliminate cast/ext/trunc to make indices type as
pointer type, make sure that the pointer size is a valid sequential index type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69574
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 19 Apr 2009 18:32:03 +0000 (18:32 +0000)]
Use an AssertingVH to detect the case where the Function was deleted but
freeMachineCodeForFunction was never called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69531
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 19 Apr 2009 18:20:21 +0000 (18:20 +0000)]
Fix missing text in doxygen documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69529
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 19 Apr 2009 06:40:30 +0000 (06:40 +0000)]
Now that BUILD_VECTOR operands are allowed to be
bigger than the vector element type, turn checking
of the operand type back on again, appropriately
adjusted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69516
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 19 Apr 2009 06:23:05 +0000 (06:23 +0000)]
Remove the SimpleTy enumerated type field from the MVT
value type union: this field was causing problems for
some compilers on 64 bit systems, presumably because
SimpleTy is 32 bits wide while the other fields are
64 bits wide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69515
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 19 Apr 2009 00:22:35 +0000 (00:22 +0000)]
Add some assertions.
Fixes segfaults in some corner cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69494
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 18 Apr 2009 21:45:27 +0000 (21:45 +0000)]
Revert 69474 and 69475. They are causing failures during a bootstrap on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69478
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sat, 18 Apr 2009 20:55:55 +0000 (20:55 +0000)]
Reconfigure.
Turns out that doing this by hand is easier than using autoreconf:-).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69475
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sat, 18 Apr 2009 20:55:28 +0000 (20:55 +0000)]
Add a configure check for llvm-gcc (reapply).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69474
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 20:49:22 +0000 (20:49 +0000)]
testcase for PR3898
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69473
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 20:48:07 +0000 (20:48 +0000)]
Fix PR3898, which manifests as failures on are an Xcore,
patch by Jakob Stoklund Olesen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69472
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 18 Apr 2009 20:16:54 +0000 (20:16 +0000)]
Don't try to make BUILD_VECTOR operands have the same
type as the vector element type: allow them to be of
a wider integer type than the element type all the way
through the system, and not just as far as LegalizeDAG.
This should be safe because it used to be this way
(the old type legalizer would produce such nodes), so
backends should be able to handle it. In fact only
targets which have legal vector types with an illegal
promoted element type will ever see this (eg: <4 x i16>
on ppc). This fixes a regression with the new type
legalizer (vec_splat.ll). Also, treat SCALAR_TO_VECTOR
the same as BUILD_VECTOR. After all, it is just a
special case of BUILD_VECTOR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69467
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 18 Apr 2009 18:11:26 +0000 (18:11 +0000)]
Generalize to support more ARM types.
Configure was not actually regenerated, but the change last time only touched
this one line, so I'm being lazy and cheating by fixing it manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69453
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 18 Apr 2009 17:58:19 +0000 (17:58 +0000)]
Add a ScalarEvolution::getCouldNotCompute() function, and use it
instead of allocating and leaking new SCEVCouldNotCompute objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69452
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 18 Apr 2009 17:57:20 +0000 (17:57 +0000)]
More const qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69451
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 18 Apr 2009 17:56:28 +0000 (17:56 +0000)]
Use more const qualifiers with SCEV interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69450
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 18 Apr 2009 15:41:38 +0000 (15:41 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69447
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 18 Apr 2009 15:34:25 +0000 (15:34 +0000)]
Detect beagleboard as ARM. The $target is "armv7l".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69446
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 18 Apr 2009 12:40:19 +0000 (12:40 +0000)]
Make it clearer that llvm-gcc is not needed for
building llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69441
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 18 Apr 2009 11:20:33 +0000 (11:20 +0000)]
Temporarily revert r69438 and r69439. These were causing failures during a
release build of llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69440
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sat, 18 Apr 2009 09:59:26 +0000 (09:59 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69439
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sat, 18 Apr 2009 09:57:58 +0000 (09:57 +0000)]
Add a configure check for llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69438
91177308-0d34-0410-b5e6-
96231b3b80d8