Commit Graph

67293 Commits

Author SHA1 Message Date
Daniel Dunbar d8df76eaeb Disable some parts of the profiling-tool-chain test, which is currently failing
on a self-hosted build (although it seems to work on non-self hosted). I'll work
with Andreas to figure this out.

llvm-svn: 80947
2009-09-03 21:09:53 +00:00
Daniel Dunbar abf2bb683a Remove dead greps.
llvm-svn: 80946
2009-09-03 20:59:02 +00:00
Bob Wilson 5c7d9ca53d Overhaul the TwoAddressInstructionPass to simplify the logic, especially
for the complicated case where one register is tied to multiple destinations.
This avoids the extra scan of instruction operands that was introduced by
my recent change.  I also pulled some code out into a separate
TryInstructionTransform method, added more comments, and renamed some
variables.

Besides all those changes, this takes care of a FIXME in the code regarding
an assumption about there being a single tied use of a register when
converting to a 3-address form.  I'm not aware of cases where that assumption
is violated, but the code now only attempts to transform an instruction,
either by commuting its operands or by converting to a 3-address form,
for the simple case where there is a single pair of tied operands.

llvm-svn: 80945
2009-09-03 20:58:42 +00:00
Daniel Dunbar c7b06b3edf Support building for a single target architecture.
llvm-svn: 80943
2009-09-03 20:49:22 +00:00
Dan Gohman ed8f32022e Smallvectorize switchExitBlocks.
llvm-svn: 80942
2009-09-03 20:36:13 +00:00
Devang Patel 794a40dd61 There is not any need to copy metadata while merging modules.
llvm-svn: 80941
2009-09-03 20:35:57 +00:00
Dan Gohman d0d5e685da Recognize more opportunities to use SSE min and max instructions,
swapping the operands if necessary.

llvm-svn: 80940
2009-09-03 20:34:31 +00:00
Daniel Dunbar 3c8a7dfada Use -lc -lm to link with (in tests) on non-Darwin.
llvm-svn: 80939
2009-09-03 20:09:38 +00:00
Daniel Dunbar f9812f75d0 Don't use -arch on non-Darwin.
llvm-svn: 80938
2009-09-03 20:03:21 +00:00
Daniel Dunbar da208e779b Convert tabs to spaces.
llvm-svn: 80937
2009-09-03 20:03:14 +00:00
Mon P Wang eadd21ea3c Test cases for vector shifts changes r80935
Changed the old vector shift test to use FileCheck

llvm-svn: 80936
2009-09-03 19:57:35 +00:00
Mon P Wang 3e82117210 Fixed a few problems with vector shifts
- when transforming a vector shift of a non-immediate scalar shift amount, zero
    extend the i32 shift amount to i64 since the vector shift reads 64 bits
  - when transforming i16 vectors to use a vector shift, zero extend i16 shift amount
  - improve the code quality in some cases when transforming vectors to use a vector shift

llvm-svn: 80935
2009-09-03 19:56:25 +00:00
Fariborz Jahanian 3501bcec7d Issue diagnostics in variety of situations involving
reference/const data members when user has declared
the constructor. This necessitated some non-minor
refactoring.

llvm-svn: 80934
2009-09-03 19:36:46 +00:00
Daniel Dunbar fe07aecd37 Don't use '%ll', this doesn't workin on Win32.
llvm-svn: 80933
2009-09-03 19:23:49 +00:00
Steve Naroff c0683b909a Add ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().
llvm-svn: 80932
2009-09-03 18:19:54 +00:00
Dan Gohman 319cc69f88 Add a -disable-16bit flag and associated support for experimenting with
disabling the use of 16-bit operations on x86. This doesn't yet work for
inline asms with 16-bit constraints, vectors with 16-bit elements,
trampoline code, and perhaps other obscurities, but it's enough to try
some experiments.

llvm-svn: 80930
2009-09-03 17:18:51 +00:00
Kevin Enderby 7d91218c75 Removed the non-target independent AsmToken::Register enum constant
from MCAsmLexer.h in preparation of supporting other targets.  Changed the
X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking
for AsmToken::Percent when parsing in places that used AsmToken::Register.
Then changed X86ATTAsmParser::ParseRegister to parse out registers as an
AsmToken::Percent followed by an AsmToken::Identifier.

llvm-svn: 80929
2009-09-03 17:15:07 +00:00
Devang Patel 85dac4771f Use WeakVH to hold dead mdnodes. Check use_empty() before deleting a node.
llvm-svn: 80928
2009-09-03 17:03:47 +00:00
Dan Gohman 728a81ab18 Make bugpoint use ParseIRFile instead of doing the same thing manually.
llvm-svn: 80927
2009-09-03 16:32:58 +00:00
Dan Gohman 4c1bdcf5d7 Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verify
that these passes are properly preserved.

Fix several transformation passes that claimed to preserve LoopSimplify
form but weren't.

llvm-svn: 80926
2009-09-03 16:31:42 +00:00
Douglas Gregor c26e0f626b Improved handling for dependent, qualified member access expressions, e.g.,
t->Base::f

where t has a dependent type. We save the nested-name-specifier in the
CXXUnresolvedMemberExpr then, during instantiation, substitute into
the nested-name-specifier with the (transformed) object type of t, so
that we get name lookup into the type of the object expression.

Note that we do not yet retain information about name lookup into the
lexical scope of the member access expression, so several regression
tests are still disabled.

llvm-svn: 80925
2009-09-03 16:14:30 +00:00
Dan Gohman a7326b5ba5 Remove some unnecessary -f options.
llvm-svn: 80924
2009-09-03 16:11:53 +00:00
Dan Gohman 3a0ce3e639 Move getUniqueExitBlocks from LoopBase to Loop, since they depend on
LoopSimplify form, which is currently only available on Loops (and
not MachineLoops). Also, move the code out of the header file.

llvm-svn: 80923
2009-09-03 16:10:48 +00:00
Dan Gohman 0054b460ff Use IRReader.h in opt, to support reading of LLVM Assembly files directly.
llvm-svn: 80922
2009-09-03 16:00:08 +00:00
Steve Naroff 38c1a7ba12 - Add back some harmless code that part of a reverted commit (r80859). I'll investigate the lifetime snafu (with ASTUnit) separately.
- Traverse category methods, add a "class ref" and make the little test harness a bit more flexible.

llvm-svn: 80921
2009-09-03 15:49:00 +00:00
Dan Gohman 22571485b3 Change PHINode::hasConstantValue to have a DominatorTree argument
instead of a bool argument, and to do the dominator check itself.
This makes it eaiser to use when DominatorTree information is
available.

llvm-svn: 80920
2009-09-03 15:34:35 +00:00
Dan Gohman 96a26bd35a Don't try to verify a LoopPass analysis if the loop has been deleted.
llvm-svn: 80919
2009-09-03 15:09:24 +00:00
Dan Gohman 237d9e5213 Remove references to expression "handles", which are no longer used.
llvm-svn: 80918
2009-09-03 15:00:26 +00:00
Benjamin Kramer 13d048fdff CppBackend: avoid printing unnecessary whitespace.
llvm-svn: 80917
2009-09-03 14:58:24 +00:00
Douglas Gregor b3286fe685 Save/load POSIXThreads flag for PCH
llvm-svn: 80916
2009-09-03 14:36:33 +00:00
Duncan Sands 0edc7100ba Keep track of how many memmove calls were turned into
memcpy calls.

llvm-svn: 80915
2009-09-03 13:37:16 +00:00
Edward O'Callaghan 6e8ae17e23 Adding FreeBSD to supported platforms list. Credit to Roman Divacky for testing.
llvm-svn: 80914
2009-09-03 11:13:06 +00:00
Edward O'Callaghan 665671ec89 Fix some files that got left behind in early changeset to unnamed unions fix. Credit to Roman Divacky.
llvm-svn: 80913
2009-09-03 09:12:20 +00:00
Andreas Neustifter d194e13b8d Fix build warning.
llvm-svn: 80912
2009-09-03 09:11:10 +00:00
Andreas Neustifter 7e86c3856b Code Cleanup.
Removed inverted flag form MaximumSpanningTree, also do not handle so much
information to MaximumSpanningTree.

llvm-svn: 80911
2009-09-03 08:52:52 +00:00
Daniel Dunbar 213f8f4860 Filter out -fno-rtti from CXXFLAGS as well (in an expensive checks build).
llvm-svn: 80910
2009-09-03 08:41:19 +00:00
Andreas Neustifter b68e921c25 Code Cleanup.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086139.html)

llvm-svn: 80909
2009-09-03 08:41:05 +00:00
Daniel Dunbar f563ac919b Reapply profiling tests.
llvm-svn: 80908
2009-09-03 07:38:00 +00:00
Daniel Dunbar 0dc21e4713 Remove undefined behavior when loading optimal edge profile info.
llvm-svn: 80907
2009-09-03 07:37:42 +00:00
Chris Lattner 51a0712538 don't call getOffset() on jump tables, this fixes three failing olden benchmarks
with the new asmprinter.

llvm-svn: 80906
2009-09-03 07:36:42 +00:00
Chris Lattner c7b00730ad Implement support for X86II::MO_GOT_ABSOLUTE_ADDRESS. We get very
different formatting from the old asmprinter, but it should be 
semantically the same.  We used to get:

	popl	%eax
	addl	$_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$6.$piclabel], %eax
...

Now we get:

	popl	%eax
.Lpicbaseref6:
	addl	$(_GLOBAL_OFFSET_TABLE_ + (.Lpicbaseref6 - .Lllvm$6.$piclabel)), %eax
...

llvm-svn: 80905
2009-09-03 07:30:56 +00:00
Evan Cheng 1b38952c99 Reference to hidden symbols do not have to go through non-lazy pointer in non-pic mode. rdar://7187172.
llvm-svn: 80904
2009-09-03 07:04:02 +00:00
Nick Lewycky 88214fbd12 Remove VISIBILITY_HIDDEN from this file.
llvm-svn: 80903
2009-09-03 06:43:15 +00:00
Chris Lattner cdb6fd2c7c merge all the basic linux/32 pic tests together into one test.
llvm-svn: 80902
2009-09-03 06:29:23 +00:00
Chris Lattner 4f101f98d1 rename test
llvm-svn: 80901
2009-09-03 06:16:49 +00:00
Chris Lattner 438380aa4d use a darwin triple
llvm-svn: 80900
2009-09-03 06:15:11 +00:00
Chris Lattner 41bf56de79 TAI -> MAI
llvm-svn: 80899
2009-09-03 06:13:54 +00:00
Chris Lattner 17b3a93ad0 adjust expected lines.
llvm-svn: 80898
2009-09-03 06:13:45 +00:00
Chris Lattner cdeb8d147d improve comments.
llvm-svn: 80897
2009-09-03 06:00:00 +00:00
Daniel Dunbar 3a0637b06b Revert "Visit function/method bodies and issue callback for parameters and local
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.

llvm-svn: 80896
2009-09-03 05:59:50 +00:00