Commit Graph

52055 Commits

Author SHA1 Message Date
Evan Cheng 6ba1931d60 Fix a bug in sdisel switch lowering code. When it updates the phi nodes in switch successor blocks, it can introduce multiple phi operands of the same value from different blocks (and may not be on the predecessor list).
This can be seen on CodeGen/Generic/2006-09-06-SwitchLowering.ll. But it's not known to cause any real regression (but I have added an assertion for it now).

llvm-svn: 82214
2009-09-18 08:16:04 +00:00
Nick Lewycky 6a3260e004 Add newlines.
llvm-svn: 82206
2009-09-18 07:36:47 +00:00
Chris Lattner 7fc4ad6a63 make this testcase check darwin32 also
llvm-svn: 82182
2009-09-17 23:56:41 +00:00
Chris Lattner 2ba262b7e8 rename test
llvm-svn: 82181
2009-09-17 23:55:12 +00:00
Chris Lattner 1bd81314e7 tolerate llvm.eh.selector.i64 on 32-bit systems and llvm.eh.selector.i32 on
64-bit systems.

llvm-svn: 82180
2009-09-17 23:54:54 +00:00
Chris Lattner bf2fd768f9 convert to filecheck
llvm-svn: 82179
2009-09-17 23:54:26 +00:00
Chris Lattner 4a1c8fc061 rename file
llvm-svn: 82178
2009-09-17 23:42:06 +00:00
Julien Lerouge f2a0d7364b Use __attribute__((__used__)) if GCC >= 3.1 (seems to be the oldest GCC
supporting this attribute).

llvm-svn: 82177
2009-09-17 23:27:10 +00:00
Devang Patel dda1ab44e0 A testcase!
llvm-svn: 82176
2009-09-17 23:05:07 +00:00
Devang Patel ea8a4b984c Fix parsing of optional metadata for 'load', 'store' and 'alloc' instructions.
llvm-svn: 82175
2009-09-17 23:04:48 +00:00
John McCall 26a96b0369 Fix a few places where PointerIntPair was using PointerLikeTypeTraits<PointerTy>
instead of the PtrTraits provided.  Allows PointerIntPair to contain a
PointerUnion safely, as long as the bits add up.

llvm-svn: 82163
2009-09-17 20:35:18 +00:00
Chris Lattner a6ebba270d pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
currently unused.

llvm-svn: 82157
2009-09-17 18:49:52 +00:00
Dan Gohman 36bad00bef Teach ScalarEvolution how to reason about no-wrap flags on loops
where the induction variable has a non-unit stride, such as {0,+,2}, and
there are expressions such as {1,+,2} inside the loop formed with
or or add nsw operators.

llvm-svn: 82151
2009-09-17 18:05:20 +00:00
Jim Grosbach 9632c14949 grammar
llvm-svn: 82150
2009-09-17 17:57:26 +00:00
Jim Grosbach d0928e8cb5 grammar
llvm-svn: 82149
2009-09-17 17:55:55 +00:00
Daniel Dunbar 0ec4ed7b74 Another try at fixing compile warnings on 4.0
llvm-svn: 82148
2009-09-17 17:46:53 +00:00
Benjamin Kramer 5ff90ed33e Initialize HasMetadata to zero.
llvm-svn: 82145
2009-09-17 14:51:57 +00:00
Daniel Dunbar 94cb6144d2 Remove test cases using -regalloc=simple.
llvm-svn: 82130
2009-09-17 06:37:07 +00:00
Evan Cheng 4ba30d9913 Remove simple regalloc. It has bit rotted.
llvm-svn: 82127
2009-09-17 05:48:07 +00:00
Chris Lattner ac6271e3f4 add a version of the APFloat constructor that initializes to 0.0
llvm-svn: 82110
2009-09-17 01:08:43 +00:00
Evan Cheng f56b0482c4 Fix PR4910: Broken logic in coalescer means when a physical register liveness is being shortened, the sub-registers were not. The symptom is the register allocator could not find a free register for this particular test.
llvm-svn: 82108
2009-09-17 00:57:15 +00:00
Daniel Dunbar c7012fa1e8 Some platforms may need malloc.h for alloca.
llvm-svn: 82100
2009-09-17 00:14:44 +00:00
Daniel Dunbar 487d1c8138 Update CMake.
llvm-svn: 82097
2009-09-17 00:06:48 +00:00
Sean Callanan cc774e7476 Added the LODS (load byte into register, usually
as part string parsing) instructions to the Intel
instruction tables.

llvm-svn: 82089
2009-09-16 22:59:28 +00:00
Daniel Dunbar 4498168753 Add StringRef::{rfind, rsplit}
llvm-svn: 82087
2009-09-16 22:38:48 +00:00
Sean Callanan 73645ac10c Added the LAR (load segment access rights)
instructions to the Intel instruction tables.

llvm-svn: 82084
2009-09-16 21:55:34 +00:00
Sean Callanan 7865f79011 Added the LOOP family of instructions to the Intel
instruction tables.

llvm-svn: 82083
2009-09-16 21:50:07 +00:00
Sean Callanan ca968cf1f0 Added an alternate form of register-register CMP
to the Intel instruction tables.

llvm-svn: 82081
2009-09-16 21:11:23 +00:00
Devang Patel 44b3a87f78 Fix typo.
llvm-svn: 82080
2009-09-16 21:09:07 +00:00
Devang Patel 852c9b6627 At iSel time, update DebugLoc based on debug info attached with an instruction.
llvm-svn: 82077
2009-09-16 20:39:11 +00:00
Dan Gohman 0f64d71d99 Add a new pass for doing late hoisting of floating-point and vector
constants out of loops. These aren't covered by the regular LICM
pass, because in LLVM IR constants don't require separate
instructions. They're not always covered by the MachineLICM pass
either, because it doesn't know how to unfold folded constant-pool
loads. This is somewhat experimental at this point, and off by
default.

llvm-svn: 82076
2009-09-16 20:25:11 +00:00
Devang Patel dec23fd825 Print debug info attached with an instruction.
llvm-svn: 82075
2009-09-16 20:21:17 +00:00
Bob Wilson 5d8cfb217c Expand vector floating-point conversions not supported by NEON.
llvm-svn: 82074
2009-09-16 20:20:44 +00:00
Dan Gohman e8d0150398 Now that llc can read .ll files directly, teach it to recognize .ll as
an extension, so that the default output filename for foo.ll is foo.s,
not foo.ll.s

llvm-svn: 82071
2009-09-16 19:18:41 +00:00
Devang Patel 820640d39f Provide a way to extract location info from DILocation.
llvm-svn: 82064
2009-09-16 18:20:05 +00:00
Devang Patel 0d9950e315 Parse debug info attached with an instruction.
llvm-svn: 82063
2009-09-16 18:18:06 +00:00
Devang Patel 13fb91e900 Add an interface to attach debugging information with an instruction.
llvm-svn: 82062
2009-09-16 18:16:11 +00:00
Devang Patel d5497a4bf8 Add llvm::Metadata to manage metadata used in a context.
This interface will be used to attach metadata with an instruction.

llvm-svn: 82060
2009-09-16 18:09:00 +00:00
Kevin Enderby ecd879a2d5 Fixed some problems with the logic of parsing line comments by adding
isAtStartOfComment and using that instead in two places where a loop
to check if the char was in MAI.getCommentString().

llvm-svn: 82059
2009-09-16 18:08:00 +00:00
Kevin Enderby c0edda3184 Fix incorrect assert that should be a user error for code like 'mov $0, %%eax'.
llvm-svn: 82054
2009-09-16 17:18:29 +00:00
Dan Gohman bd0050810c Change FoldPHIArgBinOpIntoPHI to decline folding if it would introduce two
phis, similar to the FoldPHIArgGEPIntoPHI change.

Also, delete some comments that don't reflect the code.

llvm-svn: 82053
2009-09-16 16:50:24 +00:00
Dan Gohman e5acc61f03 Fix the comment in this test.
llvm-svn: 82051
2009-09-16 16:33:59 +00:00
Xerxes Ranby a0f1088134 Make cmake generated llvm-config output correct JIT backend for non X86 targets.
llvm-svn: 82049
2009-09-16 14:36:35 +00:00
Benjamin Kramer 6f3d4e900b Don't sort the vector when it is empty. This should fix some expensive checking
failures.

llvm-svn: 82040
2009-09-16 11:43:12 +00:00
Andreas Neustifter 41c1103273 Reapplied r81355 with the problems fixed.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086737.html and
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086746.html)

llvm-svn: 82039
2009-09-16 11:35:50 +00:00
Xerxes Ranby 230c717e0b updated lib/CodeGen/CMakeLists.txt to unbreak cmake build after r82018
llvm-svn: 82038
2009-09-16 10:18:36 +00:00
Andreas Neustifter f8cb758ba8 Preserve ProfileInfo during CodeGenPrepare.
llvm-svn: 82034
2009-09-16 09:26:52 +00:00
Chris Lattner 05f4039763 move FnStubs/GVSTubs/HiddenGVStub handling out of the X86 asmprinter
and use MachineModuleInfoMachO instead.

llvm-svn: 82022
2009-09-16 06:25:03 +00:00
Chris Lattner 3828c2fa80 revert a hunk of r82018 that wasn't supposed to go in yet.
llvm-svn: 82020
2009-09-16 06:04:53 +00:00
Chris Lattner f3f54ffc89 add a new MachineModuleInfoMachO class, which is the per-module
stuff common across all macho targets.

llvm-svn: 82018
2009-09-16 06:03:48 +00:00
Chris Lattner e18a53890a apparently russians are really hard to sort or something!
llvm-svn: 82016
2009-09-16 05:42:12 +00:00
Chris Lattner 60e7c3de64 I can sort, no really.
llvm-svn: 82015
2009-09-16 05:37:13 +00:00
Chris Lattner 89094f2b37 make more clear since it is sorted by last name now.
llvm-svn: 82014
2009-09-16 05:36:54 +00:00
Chris Lattner 66b1ab1a9f Doug is now the code owner for most of the Clang frontend.
llvm-svn: 82013
2009-09-16 05:36:07 +00:00
Chris Lattner 07fc26d63c the pointer MMI keeps will start out with object-file format specific stuff
llvm-svn: 82012
2009-09-16 05:26:00 +00:00
Chris Lattner 273215733c tidy up
llvm-svn: 82011
2009-09-16 05:25:43 +00:00
Chris Lattner 46dcaadb4a rearrange X86ATTAsmPrinter::doFinalization, making a scan of
the global variable list only happen for COFF targets.

llvm-svn: 82010
2009-09-16 05:20:33 +00:00
Chris Lattner 890ceff6ec Ted is christened as the owner of the clang static analyzer.
llvm-svn: 82008
2009-09-16 04:59:30 +00:00
Chris Lattner 8df79f2681 remove the AsmPrinter::printMCInst hook hack now that
we have MCInstPrinter.

llvm-svn: 82006
2009-09-16 04:57:15 +00:00
Shantonu Sen b15840a6d6 fix cmake build
llvm-svn: 81999
2009-09-16 04:44:00 +00:00
Chris Lattner c6a889d0b6 use an accessor to simplify code.
llvm-svn: 81997
2009-09-16 04:12:47 +00:00
Nate Begeman 1ae49ee7ca Do not try and sink a load whose chain result has more than one use, when
trying to create RMW opportunities in the x86 backend.  This can cause a 
cycle to appear in the graph, since the other uses may eventually feed into
the TokenFactor we are sinking the load below.

llvm-svn: 81996
2009-09-16 03:20:46 +00:00
Sean Callanan 771a1f1720 Added the ENTER instruction, which sets up a stack
frame, to the Intel instruction tables.

llvm-svn: 81995
2009-09-16 02:57:13 +00:00
Sean Callanan 0fdee53266 Added the definitions for one-bit left shifts to
the Intel instruction tables.

The patterns will stay blank because ADD reg, reg
is faster, but having the encoding available is
useful for the disassembler.

llvm-svn: 81994
2009-09-16 02:28:43 +00:00
Dan Gohman 3b7ce109ec Don't sink gep operators through phi nodes if the result would require
more than one phi, since that leads to higher register pressure on
entry to the phi. This is especially problematic when the phi is in
a loop header, as it increases register pressure throughout the loop.

llvm-svn: 81993
2009-09-16 02:01:52 +00:00
Sean Callanan 1c28c4db58 Removed a few instructions that were already
covered by other definitions.

llvm-svn: 81992
2009-09-16 01:54:38 +00:00
Chris Lattner b866602f06 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();

llvm-svn: 81991
2009-09-16 01:46:41 +00:00
Daniel Dunbar 8d2aa38377 lit: Add a custom test format for use in clang.
llvm-svn: 81987
2009-09-16 01:34:52 +00:00
Chris Lattner 0d3f6962a1 remove a dead variable.
llvm-svn: 81985
2009-09-16 01:29:11 +00:00
Chris Lattner 6a833f6806 add a helper method for creating MCSymbol and MCSymbolRefExpr at
the same time.

llvm-svn: 81984
2009-09-16 01:26:31 +00:00
Sean Callanan e739ac8900 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.

llvm-svn: 81979
2009-09-16 01:13:52 +00:00
Chris Lattner 6b99ae882b inline AsmPrinter::getCurrentFunctionEHName into its only caller.
llvm-svn: 81970
2009-09-16 00:35:39 +00:00
Bob Wilson 6cc46577f4 Expand some more vector operations not supported by Neon.
llvm-svn: 81969
2009-09-16 00:32:15 +00:00
Chris Lattner 727ad714e2 remove a dead bool.
llvm-svn: 81968
2009-09-16 00:24:31 +00:00
Chris Lattner d106abfce7 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*.

llvm-svn: 81967
2009-09-16 00:17:39 +00:00
Bob Wilson 4ed397c141 Neon does not support vector divide or remainder. Expand them.
llvm-svn: 81966
2009-09-16 00:17:28 +00:00
Chris Lattner 4e465598f0 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).
 

llvm-svn: 81965
2009-09-16 00:14:19 +00:00
Chris Lattner dd5a989034 eliminate the horrid AsmPrinter::getGlobalLinkName method, inlining
it into all of its call sites and simplifying them.

llvm-svn: 81962
2009-09-16 00:08:41 +00:00
Chris Lattner 3045f9e57b simplify some code
llvm-svn: 81961
2009-09-16 00:08:07 +00:00
Bob Wilson 194a2518e5 Expand all v2f64 arithmetic operations for Neon.
Radar 7200803.  (This should also fix the
SingleSource/UnitTests/Vector/sumarray-dbl test.)

llvm-svn: 81959
2009-09-15 23:55:57 +00:00
Daniel Dunbar e7430efb62 Put back non-obsolete -f sections for 'opt'.
llvm-svn: 81954
2009-09-15 23:40:07 +00:00
Sean Callanan f8f6479388 Added far return instructions (that is, returns to
code in other segments) to the Intel instruction
tables.

llvm-svn: 81953
2009-09-15 23:37:51 +00:00
Chris Lattner 2251293788 remove some horrible MAI hooks which fortunately turn out to be always empty.
llvm-svn: 81946
2009-09-15 23:11:32 +00:00
Chris Lattner 7b40df7589 strength reduce a call to PrintRelDirective(true).
llvm-svn: 81942
2009-09-15 22:58:35 +00:00
Chris Lattner f2471ec967 add hooks to hang target-specific goop off MachineModuleInfo,
move MachineFunctionInfo virtual method out of line to give it
a home.

llvm-svn: 81940
2009-09-15 22:44:26 +00:00
Nate Begeman fbb88b180c Do not add the SVOffset to the Node CSE ID. The same pointer argument cannot have different
SVOffsets.

llvm-svn: 81937
2009-09-15 22:30:11 +00:00
Eric Christopher 17f54d0f42 Expand on comment.
llvm-svn: 81928
2009-09-15 21:56:46 +00:00
Sean Callanan 7a27b9342c Updated comments per Eli's suggestion.
llvm-svn: 81923
2009-09-15 21:43:27 +00:00
Bob Wilson 0bf35c25fe Convert more tests to FileCheck.
llvm-svn: 81915
2009-09-15 20:58:02 +00:00
Sean Callanan 79b570de9d 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.

llvm-svn: 81914
2009-09-15 20:53:57 +00:00
Daniel Dunbar 316b4a0206 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.

llvm-svn: 81912
2009-09-15 20:31:46 +00:00
Daniel Dunbar 3ef7d8f4b4 Remove references to obsolete -f option.
llvm-svn: 81911
2009-09-15 20:31:35 +00:00
Daniel Dunbar b87ddb53e5 Update llc/opt PODs to clarify they support .ll input.
llvm-svn: 81910
2009-09-15 20:31:28 +00:00
Daniel Dunbar 9367ec8644 Fix -Asserts warning.
llvm-svn: 81909
2009-09-15 20:31:12 +00:00
Daniel Dunbar 42d25debb4 lit: When finding nested test suites, check first in the execpath in case there
is a site configuration.

llvm-svn: 81902
2009-09-15 20:09:17 +00:00
Nate Begeman 178135c88b 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. 

llvm-svn: 81897
2009-09-15 19:05:41 +00:00
Jim Grosbach 7801e75e5e Correct comment pasto
llvm-svn: 81896
2009-09-15 18:56:13 +00:00
Sean Callanan e8ea876cc3 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.

llvm-svn: 81895
2009-09-15 18:47:29 +00:00
Dale Johannesen c092b76d63 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.

llvm-svn: 81888
2009-09-15 18:32:14 +00:00
Chris Lattner db4916a123 fix PR4984 by ensuring that fastisel adds properly sign extended GEP displacement
values to machineinstrs.

llvm-svn: 81886
2009-09-15 18:27:02 +00:00
Chris Lattner c25359e1a3 rename test
llvm-svn: 81884
2009-09-15 18:23:37 +00:00
Chris Lattner 2503b50e4d convert to filecheck
llvm-svn: 81882
2009-09-15 18:23:23 +00:00
Chris Lattner 7ff4a94c4b add missing file
llvm-svn: 81881
2009-09-15 18:03:13 +00:00
Bob Wilson 967bf27de2 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.

llvm-svn: 81879
2009-09-15 17:56:18 +00:00
Sandeep Patel f3369c22a7 Fix superreg use in ARMAsmPrinter. Approved by Anton Korobeynikov.
llvm-svn: 81878
2009-09-15 17:53:11 +00:00
Chris Lattner 840c700654 several major improvements to the sparc backend: support for weak linkage
and PIC codegen.  Patch by Venkatraman Govindaraju!

llvm-svn: 81877
2009-09-15 17:46:24 +00:00
Dan Gohman 94262db4d4 Teach ValueTracking how to look through GlobalAliases. GlobalAliases are
not folded in the constant folder because the constant folder doesn't
simplify ConstantExpr operands.

llvm-svn: 81864
2009-09-15 16:14:44 +00:00
Dan Gohman 0ea0e1b4af Fix an accidental inversion of the inbounds flag.
llvm-svn: 81862
2009-09-15 16:00:30 +00:00
Dan Gohman e4532f30b1 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.

llvm-svn: 81861
2009-09-15 15:58:07 +00:00
Dan Gohman f3a9e18dd6 Use llvm-link -S instead of using llvm-dis.
llvm-svn: 81860
2009-09-15 15:38:31 +00:00
Dan Gohman 2b09de986c Give llvm-link a -S option.
llvm-svn: 81859
2009-09-15 15:35:07 +00:00
Dan Gohman 972c9c5e0a Don't bother using a PassManager just to print a Module.
llvm-svn: 81858
2009-09-15 15:33:42 +00:00
Dan Gohman d29cafc083 Restore a comment that was lost in the merge.
llvm-svn: 81857
2009-09-15 15:09:54 +00:00
Dan Gohman 1f58f0e187 Fix apostrophos.
llvm-svn: 81856
2009-09-15 15:08:33 +00:00
Nick Lewycky 7465cd769c Add more newlines to make up for the ones removed from the end of instructions.
llvm-svn: 81851
2009-09-15 07:08:25 +00:00
Evan Cheng edb2287722 Forgot this.
llvm-svn: 81850
2009-09-15 07:05:12 +00:00
Evan Cheng a38ff3edae 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. :-(

llvm-svn: 81849
2009-09-15 06:45:16 +00:00
Chris Lattner d7490a4763 convert to filecheck
llvm-svn: 81848
2009-09-15 06:34:29 +00:00
Nick Lewycky c5cb3bd927 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.

llvm-svn: 81846
2009-09-15 06:28:26 +00:00
Chris Lattner ee8f74f5d1 fix PR4963: folding insertvalue would sometimes turn a packed struct into
an unpacked one.

llvm-svn: 81845
2009-09-15 06:28:12 +00:00
Chris Lattner e0987215f0 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).

llvm-svn: 81843
2009-09-15 05:40:35 +00:00
Chris Lattner e9a4992399 add newline to debug dump
llvm-svn: 81840
2009-09-15 05:14:57 +00:00
Chris Lattner d4d966f500 make -debug-pass=Executions show information about what call graph nodes
are in the SCC for each execution of a CGSCC pass.

llvm-svn: 81838
2009-09-15 05:03:04 +00:00
Chris Lattner f82f27be3f add some missing quotes in debug output
llvm-svn: 81836
2009-09-15 04:45:26 +00:00
Chris Lattner 2b979ef128 switch scciterator to use DenseMap instead of std::map
llvm-svn: 81834
2009-09-15 04:37:49 +00:00
Chris Lattner 30fceaba05 this is failing on linux hosts, force a triple.
llvm-svn: 81833
2009-09-15 04:27:29 +00:00
Ted Kremenek 8e780355b7 Remove invalid add_dependencies line to unbreak the CMake build.
llvm-svn: 81827
2009-09-15 04:06:36 +00:00
Mikhail Glushenkov 0adf07eb9e 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.

llvm-svn: 81826
2009-09-15 03:39:45 +00:00
Chris Lattner 170c116aa7 merge one more in.
llvm-svn: 81824
2009-09-15 02:27:23 +00:00
Chris Lattner 42aaa6e443 merge some more cmov tests into cmov.ll
llvm-svn: 81823
2009-09-15 02:25:21 +00:00
Chris Lattner baf78e5b52 merge two cmov tests into one.
llvm-svn: 81822
2009-09-15 02:22:47 +00:00
Dan Gohman 520a6856ba 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.

llvm-svn: 81821
2009-09-15 01:22:01 +00:00
Nate Begeman d41f8fd2b3 Remove incorrect CSE code from r81813.
llvm-svn: 81819
2009-09-15 00:38:09 +00:00
Sean Callanan 050e0cdb9a Modified the Intel instruction tables to include
versions of CALL and JMP with segmented addresses
provided in-line, as pairs of immediates.

llvm-svn: 81818
2009-09-15 00:35:17 +00:00
Kevin Enderby ccab317837 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.

llvm-svn: 81817
2009-09-15 00:27:25 +00:00
Nate Begeman 879d8f1c3e 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.

llvm-svn: 81816
2009-09-15 00:18:30 +00:00
Nate Begeman 01c1e1152d Teach the legalizer to propagate the original alignment of loads and store when
it splits them.

llvm-svn: 81815
2009-09-15 00:14:28 +00:00
Dan Gohman 65829a4ccb On x86-64, the 32-bit cmov doesn't actually clear the high 32-bit of
its result if the condition is false.

llvm-svn: 81814
2009-09-15 00:14:11 +00:00
Nate Begeman 02a685a914 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.  

llvm-svn: 81813
2009-09-15 00:13:12 +00:00
Dan Gohman f9eafce3af When extending a memset range past the front, set the alignment of the
memset region to the alignment of the new start address.

llvm-svn: 81810
2009-09-14 23:39:10 +00:00
Erick Tryzelaar b4e19177cb Expose initializing the native target for the execution engine.
llvm-svn: 81800
2009-09-14 21:54:32 +00:00
Erick Tryzelaar c8a18f97bb Make sure to initialize the fpm in the ocaml tutorial.
llvm-svn: 81799
2009-09-14 21:54:15 +00:00
Evan Cheng 7f789596f3 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.

llvm-svn: 81796
2009-09-14 21:33:42 +00:00
Bill Wendling 6dcc9d1b4b 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.

llvm-svn: 81785
2009-09-14 20:52:37 +00:00
Dan Gohman 1113741a03 Update a comment to match the source. PseudoSourceValues are now
obtained via accessor functions.

llvm-svn: 81782
2009-09-14 20:40:10 +00:00
Jim Grosbach 04f9d2e264 trivial whitespace cleanup
llvm-svn: 81773
2009-09-14 17:27:35 +00:00
Chris Lattner dda095ec4a add PR#
llvm-svn: 81770
2009-09-14 16:49:26 +00:00
Eric Christopher d8530f35f5 Enable the jit for llvm-config.
Patch by Xerxes Rånby!

llvm-svn: 81768
2009-09-14 16:38:49 +00:00
Daniel Dunbar 3f0dfbcf7a Add a valgrind suppressions file for x86_64/linux/4.3.3.
llvm-svn: 81766
2009-09-14 16:10:32 +00:00
Daniel Dunbar d200b758a5 Add a VALGRIND_EXTRA_ARGS makefile variable, with the obvious semantics.
llvm-svn: 81764
2009-09-14 15:27:43 +00:00