oota-llvm.git
14 years agoBig change #1 for personality function references:
Chris Lattner [Wed, 16 Sep 2009 01:46:41 +0000 (01:46 +0000)]
Big change #1 for personality function references:
Eliminate the PersonalityPrefix/Suffix & NeedsIndirectEncoding
fields from MAI: they aren't part of the asm syntax, they are
related to the structure of the object file.

To replace their functionality, add a new
TLOF::getSymbolForDwarfGlobalReference method which asks targets
to decide how to reference a global from EH in a pc-relative way.

The default implementation just returns the symbol.  The default
darwin implementation references the symbol through an indirect
$non_lazy_ptr stub.  The bizarro x86-64 darwin specialization
handles the weird "foo@GOTPCREL+4" hack.

DwarfException.cpp now uses this to emit the reference to the
symbol in the right way, and this also eliminates another
horrible hack from DwarfException.cpp:

-    if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL"))
-      O << "-" << MAI->getPCSymbol();

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

14 years agolit: Add a custom test format for use in clang.
Daniel Dunbar [Wed, 16 Sep 2009 01:34:52 +0000 (01:34 +0000)]
lit: Add a custom test format for use in clang.

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

14 years agoremove a dead variable.
Chris Lattner [Wed, 16 Sep 2009 01:29:11 +0000 (01:29 +0000)]
remove a dead variable.

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

14 years agoadd a helper method for creating MCSymbol and MCSymbolRefExpr at
Chris Lattner [Wed, 16 Sep 2009 01:26:31 +0000 (01:26 +0000)]
add a helper method for creating MCSymbol and MCSymbolRefExpr at
the same time.

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

14 years agoAdded a variety of floating-point and SSE instructions.
Sean Callanan [Wed, 16 Sep 2009 01:13:52 +0000 (01:13 +0000)]
Added a variety of floating-point and SSE instructions.
All of these do not have patterns (they're for the
disassembler).

Many of the floating-point instructions will probably
be rolled into definitions that have patterns, and may
eventually be superseded by mdefs.  So I put them
together and left a comment.

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

14 years agoinline AsmPrinter::getCurrentFunctionEHName into its only caller.
Chris Lattner [Wed, 16 Sep 2009 00:35:39 +0000 (00:35 +0000)]
inline AsmPrinter::getCurrentFunctionEHName into its only caller.

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

14 years agoExpand some more vector operations not supported by Neon.
Bob Wilson [Wed, 16 Sep 2009 00:32:15 +0000 (00:32 +0000)]
Expand some more vector operations not supported by Neon.

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

14 years agoremove a dead bool.
Chris Lattner [Wed, 16 Sep 2009 00:24:31 +0000 (00:24 +0000)]
remove a dead bool.

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

14 years agoEliminate AsmPrinter::EmitExternalGlobal, inlining its (now)
Chris Lattner [Wed, 16 Sep 2009 00:17:39 +0000 (00:17 +0000)]
Eliminate AsmPrinter::EmitExternalGlobal, inlining its (now)
one implementation into its one caller.  This eliminates a totally
awesome and gratuitous hack where we casted a Function* to
GlobalVariable*.

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

14 years agoNeon does not support vector divide or remainder. Expand them.
Bob Wilson [Wed, 16 Sep 2009 00:17:28 +0000 (00:17 +0000)]
Neon does not support vector divide or remainder.  Expand them.

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

14 years agoeliminate the PPC backend's implementation of EmitExternalGlobal
Chris Lattner [Wed, 16 Sep 2009 00:14:19 +0000 (00:14 +0000)]
eliminate the PPC backend's implementation of EmitExternalGlobal
and use PersonalityPrefix/Suffix to achieve the same effect (like
the x86 backend).

This changes the code generated for ppc static mode, but guess what,
we were generating this before:

.byte 0x9B                                        ; Personality (indirect pcrel sdata4)
.long ___gxx_personality_v0-.                     ; Personality

which is not correct! (it is not an 'indirect' reference).

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

14 years agoeliminate the horrid AsmPrinter::getGlobalLinkName method, inlining
Chris Lattner [Wed, 16 Sep 2009 00:08:41 +0000 (00:08 +0000)]
eliminate the horrid AsmPrinter::getGlobalLinkName method, inlining
it into all of its call sites and simplifying them.

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

14 years agosimplify some code
Chris Lattner [Wed, 16 Sep 2009 00:08:07 +0000 (00:08 +0000)]
simplify some code

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

14 years agoExpand all v2f64 arithmetic operations for Neon.
Bob Wilson [Tue, 15 Sep 2009 23:55:57 +0000 (23:55 +0000)]
Expand all v2f64 arithmetic operations for Neon.
Radar 7200803.  (This should also fix the
SingleSource/UnitTests/Vector/sumarray-dbl test.)

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

14 years agoPut back non-obsolete -f sections for 'opt'.
Daniel Dunbar [Tue, 15 Sep 2009 23:40:07 +0000 (23:40 +0000)]
Put back non-obsolete -f sections for 'opt'.

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

14 years agoAdded far return instructions (that is, returns to
Sean Callanan [Tue, 15 Sep 2009 23:37:51 +0000 (23:37 +0000)]
Added far return instructions (that is, returns to
code in other segments) to the Intel instruction
tables.

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

14 years agoremove some horrible MAI hooks which fortunately turn out to be always empty.
Chris Lattner [Tue, 15 Sep 2009 23:11:32 +0000 (23:11 +0000)]
remove some horrible MAI hooks which fortunately turn out to be always empty.

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

14 years agostrength reduce a call to PrintRelDirective(true).
Chris Lattner [Tue, 15 Sep 2009 22:58:35 +0000 (22:58 +0000)]
strength reduce a call to PrintRelDirective(true).

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

14 years agoadd hooks to hang target-specific goop off MachineModuleInfo,
Chris Lattner [Tue, 15 Sep 2009 22:44:26 +0000 (22:44 +0000)]
add hooks to hang target-specific goop off MachineModuleInfo,
move MachineFunctionInfo virtual method out of line to give it
a home.

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

14 years agoDo not add the SVOffset to the Node CSE ID. The same pointer argument cannot have...
Nate Begeman [Tue, 15 Sep 2009 22:30:11 +0000 (22:30 +0000)]
Do not add the SVOffset to the Node CSE ID.  The same pointer argument cannot have different
SVOffsets.

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

14 years agoExpand on comment.
Eric Christopher [Tue, 15 Sep 2009 21:56:46 +0000 (21:56 +0000)]
Expand on comment.

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

14 years agoUpdated comments per Eli's suggestion.
Sean Callanan [Tue, 15 Sep 2009 21:43:27 +0000 (21:43 +0000)]
Updated comments per Eli's suggestion.

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

14 years agoConvert more tests to FileCheck.
Bob Wilson [Tue, 15 Sep 2009 20:58:02 +0000 (20:58 +0000)]
Convert more tests to FileCheck.

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

14 years agoAdded register-to-register ADD instructions to the
Sean Callanan [Tue, 15 Sep 2009 20:53:57 +0000 (20:53 +0000)]
Added register-to-register ADD instructions to the
Intel tables, where the source operand is
specified by the R/M field and the destination
operand by the Reg field.

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

14 years agoDrop the raw_ostream required buffer size to 1.
Daniel Dunbar [Tue, 15 Sep 2009 20:31:46 +0000 (20:31 +0000)]
Drop the raw_ostream required buffer size to 1.

 - As best I can tell, we have eliminated all the code which used to require a
   larger buffer size.

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

14 years agoRemove references to obsolete -f option.
Daniel Dunbar [Tue, 15 Sep 2009 20:31:35 +0000 (20:31 +0000)]
Remove references to obsolete -f option.

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

14 years agoUpdate llc/opt PODs to clarify they support .ll input.
Daniel Dunbar [Tue, 15 Sep 2009 20:31:28 +0000 (20:31 +0000)]
Update llc/opt PODs to clarify they support .ll input.

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

14 years agoFix -Asserts warning.
Daniel Dunbar [Tue, 15 Sep 2009 20:31:12 +0000 (20:31 +0000)]
Fix -Asserts warning.

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

14 years agolit: When finding nested test suites, check first in the execpath in case there
Daniel Dunbar [Tue, 15 Sep 2009 20:09:17 +0000 (20:09 +0000)]
lit: When finding nested test suites, check first in the execpath in case there
is a site configuration.

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

14 years agoBetter solution for tracking both the original alignment of the access, and the curre...
Nate Begeman [Tue, 15 Sep 2009 19:05:41 +0000 (19:05 +0000)]
Better solution for tracking both the original alignment of the access, and the current alignment based
on the source value offset.  This avoids increasing the size of mem nodes.

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

14 years agoCorrect comment pasto
Jim Grosbach [Tue, 15 Sep 2009 18:56:13 +0000 (18:56 +0000)]
Correct comment pasto

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

14 years agoAdded a new register class for segment registers
Sean Callanan [Tue, 15 Sep 2009 18:47:29 +0000 (18:47 +0000)]
Added a new register class for segment registers
to the Intel register table.
Added 16- and 64-bit MOVs to and from the segment
registers to the Intel instruction tables.

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

14 years agoChange the marker byte for stubs from 0xcd to 0xce (another form of
Dale Johannesen [Tue, 15 Sep 2009 18:32:14 +0000 (18:32 +0000)]
Change the marker byte for stubs from 0xcd to 0xce (another form of
interrupt instruction, which shouldn't arise any other way).  0xcd is
also used by JITMemoryManager to initialize the buffer to garbage,
which means it could appear following a noreturn call even when
that is not a stub, confusing X86CompilationCallback2.  PR 4929.

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

14 years agofix PR4984 by ensuring that fastisel adds properly sign extended GEP displacement
Chris Lattner [Tue, 15 Sep 2009 18:27:02 +0000 (18:27 +0000)]
fix PR4984 by ensuring that fastisel adds properly sign extended GEP displacement
values to machineinstrs.

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

14 years agorename test
Chris Lattner [Tue, 15 Sep 2009 18:23:37 +0000 (18:23 +0000)]
rename test

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

14 years agoconvert to filecheck
Chris Lattner [Tue, 15 Sep 2009 18:23:23 +0000 (18:23 +0000)]
convert to filecheck

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

14 years agoadd missing file
Chris Lattner [Tue, 15 Sep 2009 18:03:13 +0000 (18:03 +0000)]
add missing file

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

14 years agoHandle AddrMode4 for Thumb2 in rewriteT2FrameIndex. This occurs for
Bob Wilson [Tue, 15 Sep 2009 17:56:18 +0000 (17:56 +0000)]
Handle AddrMode4 for Thumb2 in rewriteT2FrameIndex.  This occurs for
VLDM/VSTM instructions, and without this check, the code assumes that an
offset is allowed, as it would be with VLDR/VSTR.  The asm printer,
however, silently drops the offset, producing incorrect code.  Since the
address register in this case is either the stack or frame pointer, the
spill location ends up conflicting with some other stack slot or with
outgoing arguments on the stack.

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

14 years agoFix superreg use in ARMAsmPrinter. Approved by Anton Korobeynikov.
Sandeep Patel [Tue, 15 Sep 2009 17:53:11 +0000 (17:53 +0000)]
Fix superreg use in ARMAsmPrinter. Approved by Anton Korobeynikov.

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

14 years agoseveral major improvements to the sparc backend: support for weak linkage
Chris Lattner [Tue, 15 Sep 2009 17:46:24 +0000 (17:46 +0000)]
several major improvements to the sparc backend: support for weak linkage
and PIC codegen.  Patch by Venkatraman Govindaraju!

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

14 years agoTeach ValueTracking how to look through GlobalAliases. GlobalAliases are
Dan Gohman [Tue, 15 Sep 2009 16:14:44 +0000 (16:14 +0000)]
Teach ValueTracking how to look through GlobalAliases. GlobalAliases are
not folded in the constant folder because the constant folder doesn't
simplify ConstantExpr operands.

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

14 years agoFix an accidental inversion of the inbounds flag.
Dan Gohman [Tue, 15 Sep 2009 16:00:30 +0000 (16:00 +0000)]
Fix an accidental inversion of the inbounds flag.

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

14 years agoWhen a constant's type is refined, update the constant in place
Dan Gohman [Tue, 15 Sep 2009 15:58:07 +0000 (15:58 +0000)]
When a constant's type is refined, update the constant in place
instead of cloning and RAUWing it.

 - Make AbstractTypeUser a friend of Value so that it can offer
   its subclasses a way to update a Value's type in place. This
   is better than a universally visible setType method on Value,
   and it's sufficient for the immediate need.

 - Eliminate the constant "convert" functions. This eliminates a
   lot of logic duplication, and fixes a complicated bug where a
   constant can't actually be cloned during the type refinement
   process because some of the types that its folder needs are
   half-destroyed, being in the middle of refinement themselves.

 - Move the getValType functions from being static overloaded
   functions in Constants.cpp to be members of class template
   specializations in ConstantsContext.h. This means that the
   code ends up getting instantiated twice, however it also
   makes it possible to eliminate all "convert" functions, so
   it's not a big net code size increase. And if desired, the
   duplicate instantiations could be eliminated with some
   reorganization.

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

14 years agoUse llvm-link -S instead of using llvm-dis.
Dan Gohman [Tue, 15 Sep 2009 15:38:31 +0000 (15:38 +0000)]
Use llvm-link -S instead of using llvm-dis.

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

14 years agoGive llvm-link a -S option.
Dan Gohman [Tue, 15 Sep 2009 15:35:07 +0000 (15:35 +0000)]
Give llvm-link a -S option.

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

14 years agoDon't bother using a PassManager just to print a Module.
Dan Gohman [Tue, 15 Sep 2009 15:33:42 +0000 (15:33 +0000)]
Don't bother using a PassManager just to print a Module.

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

14 years agoRestore a comment that was lost in the merge.
Dan Gohman [Tue, 15 Sep 2009 15:09:54 +0000 (15:09 +0000)]
Restore a comment that was lost in the merge.

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

14 years agoFix apostrophos.
Dan Gohman [Tue, 15 Sep 2009 15:08:33 +0000 (15:08 +0000)]
Fix apostrophos.

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

14 years agoAdd more newlines to make up for the ones removed from the end of instructions.
Nick Lewycky [Tue, 15 Sep 2009 07:08:25 +0000 (07:08 +0000)]
Add more newlines to make up for the ones removed from the end of instructions.

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

14 years agoForgot this.
Evan Cheng [Tue, 15 Sep 2009 07:05:12 +0000 (07:05 +0000)]
Forgot this.

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

14 years agoAnother try at early partial coalescing. Identity phi source copies (their sources...
Evan Cheng [Tue, 15 Sep 2009 06:45:16 +0000 (06:45 +0000)]
Another try at early partial coalescing. Identity phi source copies (their sources are defined by phi join def) are coalesced. And the phi join copy is backward copy propagated into the other copies.

Still miscompiling some tests. :-(

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

14 years agoconvert to filecheck
Chris Lattner [Tue, 15 Sep 2009 06:34:29 +0000 (06:34 +0000)]
convert to filecheck

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

14 years agoForbid arrays of function-type and structures with function-typed fields.
Nick Lewycky [Tue, 15 Sep 2009 06:28:26 +0000 (06:28 +0000)]
Forbid arrays of function-type and structures with function-typed fields.

While I'm there, change code that does:
  SomeTy == Type::getFooType(Context)
into:
  SomeTy->getTypeID() == FooTyID
to decrease the amount of useless type creation which may involve locking, etc.

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

14 years agofix PR4963: folding insertvalue would sometimes turn a packed struct into
Chris Lattner [Tue, 15 Sep 2009 06:28:12 +0000 (06:28 +0000)]
fix PR4963: folding insertvalue would sometimes turn a packed struct into
an unpacked one.

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

14 years agoadd a new CallGraphNode::replaceCallEdge method and use it from
Chris Lattner [Tue, 15 Sep 2009 05:40:35 +0000 (05:40 +0000)]
add a new CallGraphNode::replaceCallEdge method and use it from
argpromote to avoid invalidating an iterator.  This fixes PR4977.
All clang tests now pass with expensive checking (on my system
at least).

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

14 years agoadd newline to debug dump
Chris Lattner [Tue, 15 Sep 2009 05:14:57 +0000 (05:14 +0000)]
add newline to debug dump

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

14 years agomake -debug-pass=Executions show information about what call graph nodes
Chris Lattner [Tue, 15 Sep 2009 05:03:04 +0000 (05:03 +0000)]
make -debug-pass=Executions show information about what call graph nodes
are in the SCC for each execution of a CGSCC pass.

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

14 years agoadd some missing quotes in debug output
Chris Lattner [Tue, 15 Sep 2009 04:45:26 +0000 (04:45 +0000)]
add some missing quotes in debug output

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

14 years agoswitch scciterator to use DenseMap instead of std::map
Chris Lattner [Tue, 15 Sep 2009 04:37:49 +0000 (04:37 +0000)]
switch scciterator to use DenseMap instead of std::map

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

14 years agothis is failing on linux hosts, force a triple.
Chris Lattner [Tue, 15 Sep 2009 04:27:29 +0000 (04:27 +0000)]
this is failing on linux hosts, force a triple.

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

14 years agoRemove invalid add_dependencies line to unbreak the CMake build.
Ted Kremenek [Tue, 15 Sep 2009 04:06:36 +0000 (04:06 +0000)]
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

14 years agoGet rid of GetProcessId in Win32/Program.inc.
Mikhail Glushenkov [Tue, 15 Sep 2009 03:39:45 +0000 (03:39 +0000)]
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

14 years agomerge one more in.
Chris Lattner [Tue, 15 Sep 2009 02:27:23 +0000 (02:27 +0000)]
merge one more in.

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

14 years agomerge some more cmov tests into cmov.ll
Chris Lattner [Tue, 15 Sep 2009 02:25:21 +0000 (02:25 +0000)]
merge some more cmov tests into cmov.ll

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

14 years agomerge two cmov tests into one.
Chris Lattner [Tue, 15 Sep 2009 02:22:47 +0000 (02:22 +0000)]
merge two cmov tests into one.

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

14 years agoDon't pull a load through a callseq_start if the load's chain
Dan Gohman [Tue, 15 Sep 2009 01:22:01 +0000 (01:22 +0000)]
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

14 years agoRemove incorrect CSE code from r81813.
Nate Begeman [Tue, 15 Sep 2009 00:38:09 +0000 (00:38 +0000)]
Remove incorrect CSE code from r81813.

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

14 years agoModified the Intel instruction tables to include
Sean Callanan [Tue, 15 Sep 2009 00:35:17 +0000 (00:35 +0000)]
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

14 years agoAdded the first bits of the ARM target assembler to llvm-mc. For now it only
Kevin Enderby [Tue, 15 Sep 2009 00:27:25 +0000 (00:27 +0000)]
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

14 years agoSubstantially speed up combiner-aa in the following ways:
Nate Begeman [Tue, 15 Sep 2009 00:18:30 +0000 (00:18 +0000)]
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

14 years agoTeach the legalizer to propagate the original alignment of loads and store when
Nate Begeman [Tue, 15 Sep 2009 00:14:28 +0000 (00:14 +0000)]
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

14 years agoOn x86-64, the 32-bit cmov doesn't actually clear the high 32-bit of
Dan Gohman [Tue, 15 Sep 2009 00:14:11 +0000 (00:14 +0000)]
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

14 years agoAdd an "original alignment" field to load and store nodes. This enables the
Nate Begeman [Tue, 15 Sep 2009 00:13:12 +0000 (00:13 +0000)]
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

14 years agoWhen extending a memset range past the front, set the alignment of the
Dan Gohman [Mon, 14 Sep 2009 23:39:10 +0000 (23:39 +0000)]
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

14 years agoExpose initializing the native target for the execution engine.
Erick Tryzelaar [Mon, 14 Sep 2009 21:54:32 +0000 (21:54 +0000)]
Expose initializing the native target for the execution engine.

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

14 years agoMake sure to initialize the fpm in the ocaml tutorial.
Erick Tryzelaar [Mon, 14 Sep 2009 21:54:15 +0000 (21:54 +0000)]
Make sure to initialize the fpm in the ocaml tutorial.

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

14 years agoAdd early coalescing to liveintervals. This is work in progress and is known to misco...
Evan Cheng [Mon, 14 Sep 2009 21:33:42 +0000 (21:33 +0000)]
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

14 years agoPull the creation of the "RewindFunction" function out of the loop. It's only
Bill Wendling [Mon, 14 Sep 2009 20:52:37 +0000 (20:52 +0000)]
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

14 years agoUpdate a comment to match the source. PseudoSourceValues are now
Dan Gohman [Mon, 14 Sep 2009 20:40:10 +0000 (20:40 +0000)]
Update a comment to match the source. PseudoSourceValues are now
obtained via accessor functions.

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

14 years agotrivial whitespace cleanup
Jim Grosbach [Mon, 14 Sep 2009 17:27:35 +0000 (17:27 +0000)]
trivial whitespace cleanup

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

14 years agoadd PR#
Chris Lattner [Mon, 14 Sep 2009 16:49:26 +0000 (16:49 +0000)]
add PR#

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

14 years agoEnable the jit for llvm-config.
Eric Christopher [Mon, 14 Sep 2009 16:38:49 +0000 (16:38 +0000)]
Enable the jit for llvm-config.

Patch by Xerxes RĂ„nby!

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

14 years agoAdd a valgrind suppressions file for x86_64/linux/4.3.3.
Daniel Dunbar [Mon, 14 Sep 2009 16:10:32 +0000 (16:10 +0000)]
Add a valgrind suppressions file for x86_64/linux/4.3.3.

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

14 years agoAdd a VALGRIND_EXTRA_ARGS makefile variable, with the obvious semantics.
Daniel Dunbar [Mon, 14 Sep 2009 15:27:43 +0000 (15:27 +0000)]
Add a VALGRIND_EXTRA_ARGS makefile variable, with the obvious semantics.

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

14 years agoUpdate CMake dependencies.
Daniel Dunbar [Mon, 14 Sep 2009 05:22:54 +0000 (05:22 +0000)]
Update CMake dependencies.

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

14 years agoUpdate CMake.
Daniel Dunbar [Mon, 14 Sep 2009 05:22:47 +0000 (05:22 +0000)]
Update CMake.

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

14 years agoPIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart.
Chris Lattner [Mon, 14 Sep 2009 03:15:54 +0000 (03:15 +0000)]
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

14 years agoChange MCAsmStreamer to take an MCInstPrinter instead of a
Chris Lattner [Mon, 14 Sep 2009 03:02:37 +0000 (03:02 +0000)]
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

14 years agoTeach 'make check-lit' to run unittests.
Daniel Dunbar [Mon, 14 Sep 2009 02:39:01 +0000 (02:39 +0000)]
Teach 'make check-lit' to run unittests.

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

14 years agoAttempt to fix some 4.0.0 build warnings.
Daniel Dunbar [Mon, 14 Sep 2009 02:38:53 +0000 (02:38 +0000)]
Attempt to fix some 4.0.0 build warnings.

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

14 years agolit: Give test formats control over test discovery.
Daniel Dunbar [Mon, 14 Sep 2009 02:38:46 +0000 (02:38 +0000)]
lit: Give test formats control over test discovery.

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

14 years agoFix a pair of comment typos.
Nick Lewycky [Mon, 14 Sep 2009 02:25:34 +0000 (02:25 +0000)]
Fix a pair of comment typos.

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

14 years agoFifth time's a charm! Remove ourselves as abstract type listeners once we've
Nick Lewycky [Mon, 14 Sep 2009 02:25:19 +0000 (02:25 +0000)]
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

14 years agoGive MCInstPrinter a MCAsmInfo member, make X86ATTInstPrinter
Chris Lattner [Mon, 14 Sep 2009 01:49:26 +0000 (01:49 +0000)]
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

14 years agoadd a new MCInstPrinter class, move the (trivial) MCDisassmbler ctor inline.
Chris Lattner [Mon, 14 Sep 2009 01:43:38 +0000 (01:43 +0000)]
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

14 years agotidy up a bit.
Chris Lattner [Mon, 14 Sep 2009 01:34:40 +0000 (01:34 +0000)]
tidy up a bit.

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

14 years agoslightly increase prettiness.
Chris Lattner [Mon, 14 Sep 2009 01:27:50 +0000 (01:27 +0000)]
slightly increase prettiness.

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

14 years agoemit the register table as a massive string to avoid relocations.
Chris Lattner [Mon, 14 Sep 2009 01:26:18 +0000 (01:26 +0000)]
emit the register table as a massive string to avoid relocations.

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

14 years agomove StringToOffsetTable out to its own header.
Chris Lattner [Mon, 14 Sep 2009 01:19:16 +0000 (01:19 +0000)]
move StringToOffsetTable out to its own header.

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

14 years agofactor string table generation out to its own class. This changes
Chris Lattner [Mon, 14 Sep 2009 01:16:36 +0000 (01:16 +0000)]
factor string table generation out to its own class.  This changes
the encoding of the AsmStrs table saving a byte or two.

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