1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

51892 Commits

Author SHA1 Message Date
Sean Callanan
a3e93882f3 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
77638f25b1 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
e482e93995 Removed a few instructions that were already
covered by other definitions.

llvm-svn: 81992
2009-09-16 01:54:38 +00:00
Chris Lattner
7b52d90c9e 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
dadd71259e lit: Add a custom test format for use in clang.
llvm-svn: 81987
2009-09-16 01:34:52 +00:00
Chris Lattner
7a0fe1ca4b remove a dead variable.
llvm-svn: 81985
2009-09-16 01:29:11 +00:00
Chris Lattner
006af669b4 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
296ed7d1e1 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
7a4748ad3a inline AsmPrinter::getCurrentFunctionEHName into its only caller.
llvm-svn: 81970
2009-09-16 00:35:39 +00:00
Bob Wilson
8770c809c2 Expand some more vector operations not supported by Neon.
llvm-svn: 81969
2009-09-16 00:32:15 +00:00
Chris Lattner
8cad2c9d35 remove a dead bool.
llvm-svn: 81968
2009-09-16 00:24:31 +00:00
Chris Lattner
7a07d794ee 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
c01a94dad0 Neon does not support vector divide or remainder. Expand them.
llvm-svn: 81966
2009-09-16 00:17:28 +00:00
Chris Lattner
91c3b33e33 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
f720dd9257 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
6302039748 simplify some code
llvm-svn: 81961
2009-09-16 00:08:07 +00:00
Bob Wilson
f091792f40 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
d383d40999 Put back non-obsolete -f sections for 'opt'.
llvm-svn: 81954
2009-09-15 23:40:07 +00:00
Sean Callanan
a68b2a56bb 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
249d5fe8b9 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
c06870ad45 strength reduce a call to PrintRelDirective(true).
llvm-svn: 81942
2009-09-15 22:58:35 +00:00
Chris Lattner
8457d8c557 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
d34c7760b3 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
936a41fff1 Expand on comment.
llvm-svn: 81928
2009-09-15 21:56:46 +00:00
Sean Callanan
4dc743b7ff Updated comments per Eli's suggestion.
llvm-svn: 81923
2009-09-15 21:43:27 +00:00
Bob Wilson
9bcea11785 Convert more tests to FileCheck.
llvm-svn: 81915
2009-09-15 20:58:02 +00:00
Sean Callanan
e62a9a60c7 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
f1b6d523e4 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
ee9eb09812 Remove references to obsolete -f option.
llvm-svn: 81911
2009-09-15 20:31:35 +00:00
Daniel Dunbar
cdf090d89f Update llc/opt PODs to clarify they support .ll input.
llvm-svn: 81910
2009-09-15 20:31:28 +00:00
Daniel Dunbar
e14446813e Fix -Asserts warning.
llvm-svn: 81909
2009-09-15 20:31:12 +00:00
Daniel Dunbar
3d79f78d69 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
e7fa31031b 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
6e371fc31a Correct comment pasto
llvm-svn: 81896
2009-09-15 18:56:13 +00:00
Sean Callanan
3386a02b81 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
d00219c590 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
0f1da52ad1 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
1eac807a0b rename test
llvm-svn: 81884
2009-09-15 18:23:37 +00:00
Chris Lattner
af20df0244 convert to filecheck
llvm-svn: 81882
2009-09-15 18:23:23 +00:00
Chris Lattner
a2f99fe0ec add missing file
llvm-svn: 81881
2009-09-15 18:03:13 +00:00
Bob Wilson
a42ff3190c 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
7727a68464 Fix superreg use in ARMAsmPrinter. Approved by Anton Korobeynikov.
llvm-svn: 81878
2009-09-15 17:53:11 +00:00
Chris Lattner
31ba68c9af 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
78b99e3761 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
ccdb00720e Fix an accidental inversion of the inbounds flag.
llvm-svn: 81862
2009-09-15 16:00:30 +00:00
Dan Gohman
18a3644dde 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
780132aeca Use llvm-link -S instead of using llvm-dis.
llvm-svn: 81860
2009-09-15 15:38:31 +00:00
Dan Gohman
98752b1ba2 Give llvm-link a -S option.
llvm-svn: 81859
2009-09-15 15:35:07 +00:00
Dan Gohman
5a8cf339b0 Don't bother using a PassManager just to print a Module.
llvm-svn: 81858
2009-09-15 15:33:42 +00:00
Dan Gohman
8d6df0783e Restore a comment that was lost in the merge.
llvm-svn: 81857
2009-09-15 15:09:54 +00:00