Commit Graph

51464 Commits

Author SHA1 Message Date
David Goodwin d93c668f00 Calls clobber FPSCR.
llvm-svn: 80956
2009-09-03 22:12:28 +00:00
Ted Kremenek 9dee94f8fb Make ImmutableMap/ImmutableSet quicker by only canonicalizing the tree after an
Add or Remove operation complete, and not while building the intermediate tree.
This trades a little bit more memory usage for less accesses to the FoldingSet.  On a benchmark for the clang static analyzer, this shaves off another 13% of execution time when using field/array sensitivity.

llvm-svn: 80955
2009-09-03 22:07:30 +00:00
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
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
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
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
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
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
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
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
Chris Lattner 1945453843 fix MCSymbol printing to exactly match the normal mangler rules so
we can diff .s files.

llvm-svn: 80894
2009-09-03 05:57:47 +00:00
Chris Lattner 7a53b96394 remove extraneous hack.
llvm-svn: 80893
2009-09-03 05:54:00 +00:00
Daniel Dunbar c3a0aba120 Make these functions static and local.
llvm-svn: 80892
2009-09-03 05:47:34 +00:00
Daniel Dunbar 76628def06 Tweak comment.
llvm-svn: 80891
2009-09-03 05:47:22 +00:00
Chris Lattner f4366a3998 Thread an MCAsmInfo pointer through the various MC printing APIs,
and fix a few things using << on MCSymbols to use ->print(). No
functionality change other than unbreaking my previous patch.

llvm-svn: 80890
2009-09-03 05:46:51 +00:00
Chris Lattner 1a67fe8862 just use dump()
llvm-svn: 80889
2009-09-03 05:39:09 +00:00
Chris Lattner 1800dff44e inline insertion operators.
llvm-svn: 80888
2009-09-03 05:33:01 +00:00
Chris Lattner 27266f164f In C++, code is not allowed to call main. In C it is, this
simplifylibcalls optimization is thus valid for C++ but not C.
It's not important enough to worry about for C++ apps, so just
remove it.

rdar://7191924

llvm-svn: 80887
2009-09-03 05:19:59 +00:00
Chris Lattner 954b9cd41f merge globaladdress symbol processing stuff into other stuff. Now
all global variable operand flag processing stuff is shared between
different operand types.

llvm-svn: 80886
2009-09-03 05:06:07 +00:00
Evan Cheng 155deabbcb Unbreak x86_64 build.
llvm-svn: 80885
2009-09-03 05:01:00 +00:00
Chris Lattner 6370d5606c Split the "operand -> symbol" logic from the "get offset and other munging
from operand" logic.  GlobalAddress still todo.

llvm-svn: 80884
2009-09-03 04:56:20 +00:00
Chris Lattner 5daf61910e implement lowering support for constant pool index operands, this gets a bunch more
olden programs working.

llvm-svn: 80881
2009-09-03 04:44:53 +00:00
Evan Cheng 47455a79ae X86JITInfo::getLazyResolverFunction() should not read cpu id to determine whether sse is available. Just use consult subtarget.
No functionality changes.

llvm-svn: 80880
2009-09-03 04:37:05 +00:00
Ted Kremenek 231dd7169d Set the 'cached digest' flag after computing the digest for an
ImutAVLTree.  This was accidentally left out, and essentially caused
digest caching to be ignored in ImmutableMap and ImmutableSet (this
bug was detected from shark traces that showed ComputeDigest was in
the hot path in the clang static analyzer).

This reduces the running time of the clang static analyzer on an
example benchmark by ~32% for both RegionStore (field-sensitivty) and
BasicStore (without field-sensitivity).

llvm-svn: 80877
2009-09-03 04:21:34 +00:00
Chris Lattner 11c989cc47 update test for alignment value in hex
llvm-svn: 80876
2009-09-03 04:03:44 +00:00
Chris Lattner f16a122213 output alignment value in hex so that we get:
.align 3, 0x90
instead of,
  .align 3, 144

suggested by eric.

llvm-svn: 80875
2009-09-03 04:01:10 +00:00
Chris Lattner 620713c5b4 simplify this by using SmallString::str(), much nicer!
llvm-svn: 80874
2009-09-03 03:54:02 +00:00
Lang Hames 0b3720b3c3 Fixed a test that ensures the LocalRewriter does not attempt to
avoid reloads by reusing clobbered registers.

This was causing issues in 256.bzip2 when compiled with PIC for
a while (starting at r78217), though the problem has since been masked. 

llvm-svn: 80872
2009-09-03 02:52:02 +00:00
Gabor Greif 2d60e1ec0c back out my recent commit (r80858), it seems to break self-hosting buildbot's stage 2 configure
llvm-svn: 80871
2009-09-03 02:02:59 +00:00
Devang Patel f7188325ef Now Bitcode reader bug is fixed. Reapply 80839.
Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.

llvm-svn: 80868
2009-09-03 01:39:20 +00:00
Devang Patel 116b4a0cb3 Add new value for given index in MDValuePtrs.
llvm-svn: 80867
2009-09-03 01:38:02 +00:00
Daniel Dunbar 18d6959f39 Improve llvm::getHostTriple for some cases where the LLVM_HOSTTRIPLE is not
reliable.

llvm-svn: 80863
2009-09-03 01:10:13 +00:00
Gabor Greif 14dfba6d66 re-commit r66920 (which has been backed out in r66953) I may have more luck this time. I'll back out if needed...
llvm-svn: 80858
2009-09-03 00:18:58 +00:00
Sean Callanan f400442927 Added opaque 32-, 48-, and 80-bit memory operand types to the X86
instruction tables to support segmented addressing (and other objects
of obscure type).
Modified the X86 assembly printers to handle these new operand types.
Added JMP and CALL instructions that use segmented addresses.

llvm-svn: 80857
2009-09-03 00:04:47 +00:00
Daniel Dunbar fc39586b4f Show derived host triple in --version.
llvm-svn: 80855
2009-09-02 23:52:38 +00:00
Shantonu Sen 96995e8179 Improve support for cross-hosted builds of LLVM.
--build=triple and other configure options are passed
to the BuildTools/ sub-invocation more consistently

llvm-svn: 80854
2009-09-02 23:52:23 +00:00
Douglas Gregor ef7c1fd909 Unbreak my CMake build. Say you'll link again.
llvm-svn: 80842
2009-09-02 22:45:31 +00:00
Devang Patel c180029be4 Revert 80839 for now. It causes test failures.
llvm-svn: 80841
2009-09-02 21:49:26 +00:00
Devang Patel 36309cd391 Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.

llvm-svn: 80839
2009-09-02 21:22:09 +00:00
Anton Korobeynikov f0da41c3e4 More missed vdup patterns
llvm-svn: 80838
2009-09-02 21:21:28 +00:00
Dan Gohman c76bfb777e Switch llc from ParseBitcodeFile to ParseIRFile. This lets llc
transparently read either LLVM Assembly or LLVM Bitcode files.

llvm-svn: 80829
2009-09-02 19:35:19 +00:00
Dan Gohman a7e8799c72 Add a comment noting the memory ownership rules.
llvm-svn: 80827
2009-09-02 19:21:56 +00:00
Dan Gohman b7cb99bf50 Add convenience functions for reading in LLVM IR that autodetect
and LLVM Assembly and LLVM Bitcode and automatically call the
corresponding reader.

llvm-svn: 80809
2009-09-02 17:54:06 +00:00
Chris Lattner 7bd37b47c8 switch from std::string to SmallString + raw_svector_ostream.
llvm-svn: 80807
2009-09-02 17:37:38 +00:00
Chris Lattner 74f4ca7cb2 split mcinst lowering stuff out to its own file.
llvm-svn: 80806
2009-09-02 17:35:12 +00:00
Dan Gohman 957b1316e6 Fix the syntax of add/sub/mul nsw/nuw and sdiv exact.
llvm-svn: 80805
2009-09-02 17:31:42 +00:00
Dan Gohman ae58e72018 Add const qualifiers for isBitcodeWrapper, and add new functions
isRawBitcode and isBitcode to allow clients to test whether a given
memory buffer holds a bitcode image.

llvm-svn: 80804
2009-09-02 17:21:29 +00:00
Dan Gohman 77ac99dc31 Refactor common code from ParseAssemblyString and ParseAssemblyFile,
to expose a low-level interface for parsing from an existing MemoryBuffer.

llvm-svn: 80803
2009-09-02 17:18:19 +00:00
Dan Gohman 87d69e80b1 Add const qualifiers to dominates' arguments.
llvm-svn: 80801
2009-09-02 17:05:05 +00:00
Andreas Neustifter 69e2afe030 Removed temporarily because of breaking Darwin builds.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086214.html)

llvm-svn: 80799
2009-09-02 16:47:24 +00:00
Bob Wilson bc751989f1 Rearrange code to eliminate redundancy and avoid gotos.
llvm-svn: 80798
2009-09-02 16:35:35 +00:00
Nuno Lopes 2baa6a38d2 plug another leak in LLParser::PerFunctionState::SetInstName()
llvm-svn: 80792
2009-09-02 15:02:57 +00:00
Andreas Neustifter da6b0fa8ed Changed profiling-tool-chain.ll test to use optimal-edge-profiling instead of
edge-profiling, this is more useful since the loading of the
optimal-edge-profiling is more complicated.
The edge-profiling is tested in edge-profiling.ll where only the
instrumentation is tested.

llvm-svn: 80791
2009-09-02 14:24:08 +00:00
Nuno Lopes 2fcee70aeb plug memory leak in LLParser::PerFunctionState::SetInstName() by deleting a value after replacing it
llvm-svn: 80790
2009-09-02 14:22:03 +00:00
Andreas Neustifter ae866b0c66 Sort edges in MaximumSpanningTree more stable in case of equal weight.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090824/085890.html)

llvm-svn: 80789
2009-09-02 14:03:11 +00:00
Andreas Neustifter 964fa2bdac Changed set of BlocksToInstrument to set of InsertedBlocks that do not have to
be instrumented.

llvm-svn: 80788
2009-09-02 13:59:05 +00:00
Andreas Neustifter 4469c164d0 Code cleanups and added comments.
llvm-svn: 80781
2009-09-02 12:38:39 +00:00
Torok Edwin 82131d6ad7 Opaque types didn't work if llvm_is_multithreaded().
AlwaysOpaqueTy is always NULL at this point, and it causes an assertion failure.
Fix it by using the just constructed tmp instead.

llvm-svn: 80780
2009-09-02 12:23:05 +00:00
Torok Edwin 18e03dd70c Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
r80406, and readd a -print-dbginfo test.

llvm-svn: 80778
2009-09-02 11:13:56 +00:00
Sandeep Patel 68c5f477fa Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Chris Lattner defbbc9105 Fix month.
llvm-svn: 80769
2009-09-02 06:34:22 +00:00
Chris Lattner 4916267c97 fix PR4815: some cases where DeleteDeadInstruction can delete
the instruction BBI points to.

llvm-svn: 80768
2009-09-02 06:31:02 +00:00
Chris Lattner 09a79dcfdf clean up this code a bit.
llvm-svn: 80767
2009-09-02 06:15:37 +00:00
Chris Lattner 2dd09dbdf7 eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861
llvm-svn: 80766
2009-09-02 06:11:42 +00:00
Chris Lattner d5f4fcceae refactor select 'sched insertion' out to its own method.
llvm-svn: 80764
2009-09-02 05:57:00 +00:00
Chris Lattner cc8c581a5b Add support for modeling whether or not the processor has support for
conditional moves as a subtarget feature.  This is the easy part of 
PR4841.

llvm-svn: 80763
2009-09-02 05:53:04 +00:00
Chris Lattner 950e60ea97 fix PR4848 an infinite loop when indexing down through a recursive gep
and we get the original pointer type.  This doesn't mean that we're
at the first pointer being indexed.  Correct the predicate.

llvm-svn: 80762
2009-09-02 05:35:45 +00:00
Chris Lattner 64b5842986 fix PR4837, some bugs folding vector compares. These
return a vector of i1, not i1 itself.

llvm-svn: 80761
2009-09-02 05:12:37 +00:00
Chris Lattner 65fb597793 revert my patch, duncan points out what is wrong with my logic. Add
a comment so that I don't change this in the future :)

llvm-svn: 80760
2009-09-02 04:39:04 +00:00
Chris Lattner 8f23276431 one more try at making this simpler, hopefully it won't break everything :)
llvm-svn: 80759
2009-09-02 04:34:06 +00:00
Duncan Sands 5632d96176 Complicate Chris's simplification, avoiding complaints
about singular iterators when building with expensive
checks turned on.

llvm-svn: 80757
2009-09-02 03:48:41 +00:00