Commit Graph

32214 Commits

Author SHA1 Message Date
Ted Kremenek
83d255e43e Remove invalid add_dependencies line to unbreak the CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 04:06:36 +00:00
Mikhail Glushenkov
6db0e3a981 Get rid of GetProcessId in Win32/Program.inc.
GetProcessId was introduced only in XP. As a bonus, this change makes Program
objects copyable, since Program is now basically a PID.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 03:39:45 +00:00
Dan Gohman
1e038a8494 Don't pull a load through a callseq_start if the load's chain
has multiple uses, as one of the other uses may be on a path
to a different node above the callseq_start, because that
leads to a cyclic graph. This problem is exposed when
-combiner-global-alias-analysis is used. This fixes PR4880.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81821 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 01:22:01 +00:00
Nate Begeman
71524d716a Remove incorrect CSE code from r81813.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 00:38:09 +00:00
Sean Callanan
76f14be685 Modified the Intel instruction tables to include
versions of CALL and JMP with segmented addresses
provided in-line, as pairs of immediates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81818 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 00:35:17 +00:00
Kevin Enderby
ca9c42c4da Added the first bits of the ARM target assembler to llvm-mc. For now it only
parses the .word directive as 4 bytes and ARMAsmParser::ParseInstruction will
give an error is called.  Broke out the test of the .word directive into two
different test cases, one for x86 and one for arm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81817 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 00:27:25 +00:00
Nate Begeman
b6aef5c867 Substantially speed up combiner-aa in the following ways:
1. Switch from an std::set to a SmallPtrSet for visited chain nodes.
2. Do not force the recursive flattening of token factor nodes, regardless of
   use count.
3. Immediately process newly created TokenFactor nodes.

Also, improve combiner-aa by teaching it that loads to non-overlapping offsets
of relatively aligned objects cannot alias.

These changes result in a >5x speedup for combiner-aa on most testcases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 00:18:30 +00:00
Nate Begeman
9cae7053c0 Teach the legalizer to propagate the original alignment of loads and store when
it splits them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 00:14:28 +00:00
Dan Gohman
907355caf8 On x86-64, the 32-bit cmov doesn't actually clear the high 32-bit of
its result if the condition is false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 00:14:11 +00:00
Nate Begeman
e6798372ea Add an "original alignment" field to load and store nodes. This enables the
DAG Combiner to disambiguate chains for loads and stores of types which are
 broken up by the Legalizer into smaller pieces.  


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 00:13:12 +00:00
Dan Gohman
264d245851 When extending a memset range past the front, set the alignment of the
memset region to the alignment of the new start address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 23:39:10 +00:00
Evan Cheng
752195e3c6 Add early coalescing to liveintervals. This is work in progress and is known to miscompute some tests. Read it at your own rish, I have aged 10 year while writing this.
The gist of this is if source of some of the copies that feed into a phi join is defined by the phi join, we'd like to eliminate them. However, if any of the non-identity source overlaps the live interval of the phi join then the coalescer won't be able to coalesce them. The early coalescer's job is to eliminate the identity copies by partially-coalescing the two live intervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81796 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 21:33:42 +00:00
Bill Wendling
43488710a8 Pull the creation of the "RewindFunction" function out of the loop. It's only
created once, so shouldn't be stuck in the middle of the loop. Also early exit
if there are no uses of UnwindInst in the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81785 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 20:52:37 +00:00
Jim Grosbach
a672403993 trivial whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 17:27:35 +00:00
Chris Lattner
c2b0d484dc add PR#
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81770 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 16:49:26 +00:00
Daniel Dunbar
3228484b5f Update CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81757 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 05:22:47 +00:00
Chris Lattner
662316c997 PIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 03:15:54 +00:00
Chris Lattner
90edac0e8b Change MCAsmStreamer to take an MCInstPrinter instead of a
full AsmPrinter, and change TargetRegistry to keep track
of registered MCInstPrinters.

llvm-mc is still linking in the entire
target foo to get the code emitter stuff, but this is an
important step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81754 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 03:02:37 +00:00
Nick Lewycky
af7263d51e Fix a pair of comment typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 02:25:34 +00:00
Nick Lewycky
5df6ffd948 Fifth time's a charm! Remove ourselves as abstract type listeners once we've
been told that the type is no longer abstract.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81749 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 02:25:19 +00:00
Chris Lattner
c493fb2f4d Give MCInstPrinter a MCAsmInfo member, make X86ATTInstPrinter
be a MCInstPrinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 01:49:26 +00:00
Chris Lattner
65b0b297db add a new MCInstPrinter class, move the (trivial) MCDisassmbler ctor inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 01:43:38 +00:00
Chris Lattner
f92c95f307 tidy up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 01:34:40 +00:00
Nick Lewycky
adc3142fdd Don't leak! Always remove oneself as a listener after adding oneself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 00:36:52 +00:00
Nick Lewycky
bc6836bbe3 Actually remove old types from the set.
Also break the type verification stuff into its own TypeSet to keep the
Verifier pass from becoming an AbstractTypeUser.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81729 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 23:45:39 +00:00
Chris Lattner
6a6570a312 kill off the last use of TRI::AsmName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81727 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 22:42:03 +00:00
Chris Lattner
56d77c7022 add some special case handling for strangely named x86 registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 22:41:48 +00:00
Chris Lattner
1b6570e527 'printMCInst' doesn't print newlines after instructions anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81723 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 22:24:34 +00:00
Daniel Dunbar
f5382ab518 Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81718 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 21:31:07 +00:00
Nick Lewycky
6735b1c5c4 Storing a set of PATypeHolders is a bad idea because their sort order will
change as types are refined. Remove abstract types from CheckedTypes when they
we're informed that they have been refined. The only way types get refined in
the verifier is when later function passes start optimizing. Fixes PR4970.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81716 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 21:07:59 +00:00
Chris Lattner
762ccea600 remove all but one reference to TargetRegisterDesc::AsmName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:31:40 +00:00
Chris Lattner
d95148f073 the tblgen produced 'getRegisterName' method does not access
the object, make it static instead of const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:19:22 +00:00
Chris Lattner
c510f4cb6e switch the x86 asmprinters to use getRegisterName instead
of getting it from TRI, inst printing now is codegen context
free!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81710 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:15:16 +00:00
Chris Lattner
05af2616d0 make tblgen produce a function that returns the name for a physreg.
Nothing is using this info yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:08:00 +00:00
Chris Lattner
f806c23a9a eliminate an extraneous use of TRI::getAsmName in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 19:48:37 +00:00
Chris Lattner
a1cb09e4b9 make intel asmprinter use TRI::getAsmName instead of TRI::getName like
all the other targets.  Add support for weak/linkonce linkage so it doesn't
crash on basically all nontrivial testcases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 19:44:38 +00:00
Chris Lattner
cae05cb324 split MCInst printing out of the X86ATTInstPrinter
class into its own X86ATTInstPrinter class.  The inst
printer now has just one dependence on the code generator
(TRI).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 19:30:11 +00:00
Chris Lattner
73d28f4aee reduce indentation with early exit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 19:10:08 +00:00
Chris Lattner
7c30191393 remove MAI::JumpTableSpecialLabelPrefix now that MAI
has real information about linker private linkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 19:02:16 +00:00
Chris Lattner
2055bb31a5 delete the fixme too! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81689 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:50:22 +00:00
Chris Lattner
4c66f729c9 merge the linux cpool/jtbl pic tests into pic.ll and convert to filecheck.
Change the picbase symbol on non-darwin systems from ".Lllvm$4.$piclabel" to
".L4$pb".  The actual name doesn't matter and the darwin name is shorter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81688 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:46:37 +00:00
Chris Lattner
09abd1ccfc make X86ATTAsmPrinter::PrintPICBaseSymbol forward to X86MCInstLower.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:33:59 +00:00
Chris Lattner
70a54c07a0 replace printBasicBlockLabel with EmitBasicBlockStart,
now that printBasicBlockLabel is only used for starting
a MBB.  This allows elimination of a bunch of arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:25:37 +00:00
Chris Lattner
4afcedfad1 fix MCSymbol printing on darwin to exactly match the mangler (handling of \n and " in a symbol name).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81683 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:11:09 +00:00
Chris Lattner
e19f978323 Make the MC symbol printer and llvm::Mangler exactly agree on mangling
for systems that don't support quoting (PR4966).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81682 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:04:46 +00:00
Chris Lattner
325d3dcfe4 convert some uses of printBasicBlockLabel to use GetMBBSymbol
instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 17:14:04 +00:00
Anton Korobeynikov
2a52122b30 Fix merge problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81658 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 01:12:15 +00:00
Anton Korobeynikov
20c35ec427 Define proper subreg sets for arm - this should fix bunch of subtle problems
with subreg - superreg mapping and also fix PR4965.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81657 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 00:59:43 +00:00
Daniel Dunbar
299f11f662 Experimental fix for PR4960.
- Could we just always implement this as __clear_cache for __GNUC__?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12 23:29:02 +00:00
Chris Lattner
7cb384dcca devirtualize AsmPrinter::printBasicBlockLabel since it is never overridden.
Move GetMBBSymbol up to AsmPrinter and make printBasicBlockLabel use it so that
we only have one place that decides what to name bb labels.  Hopefully various
clients of printBasicBlockLabel can start using GetMBBSymbol instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12 23:02:08 +00:00